Fossil SCM

Merge the ssl_peer_ip branch into trunk.

drh 2011-09-01 21:51 trunk merge
Commit 8b9c933c283a472298ec32ebf76604951d9bfb9d
1 file changed +11
--- src/http_ssl.c
+++ src/http_ssl.c
@@ -280,10 +280,21 @@
280280
if( blob_str(&ans)[0]=='a' ) {
281281
ssl_save_certificate(cert);
282282
}
283283
blob_reset(&ans);
284284
}
285
+
286
+ /* Set the Global.zIpAddr variable to the server we are talking to.
287
+ ** This is used to populate the ipaddr column of the rcvfrom table,
288
+ ** if any files are received from the server.
289
+ */
290
+ {
291
+ /* IPv4 only code */
292
+ const unsigned char *ip = (const unsigned char *) BIO_get_conn_ip(iBio);
293
+ g.zIpAddr = mprintf("%d.%d.%d.%d", ip[0], ip[1], ip[2], ip[3]);
294
+ }
295
+
285296
X509_free(cert);
286297
return 0;
287298
}
288299
289300
/*
290301
--- src/http_ssl.c
+++ src/http_ssl.c
@@ -280,10 +280,21 @@
280 if( blob_str(&ans)[0]=='a' ) {
281 ssl_save_certificate(cert);
282 }
283 blob_reset(&ans);
284 }
 
 
 
 
 
 
 
 
 
 
 
285 X509_free(cert);
286 return 0;
287 }
288
289 /*
290
--- src/http_ssl.c
+++ src/http_ssl.c
@@ -280,10 +280,21 @@
280 if( blob_str(&ans)[0]=='a' ) {
281 ssl_save_certificate(cert);
282 }
283 blob_reset(&ans);
284 }
285
286 /* Set the Global.zIpAddr variable to the server we are talking to.
287 ** This is used to populate the ipaddr column of the rcvfrom table,
288 ** if any files are received from the server.
289 */
290 {
291 /* IPv4 only code */
292 const unsigned char *ip = (const unsigned char *) BIO_get_conn_ip(iBio);
293 g.zIpAddr = mprintf("%d.%d.%d.%d", ip[0], ip[1], ip[2], ip[3]);
294 }
295
296 X509_free(cert);
297 return 0;
298 }
299
300 /*
301

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button