Fossil SCM
Merge the ssl_peer_ip branch into trunk.
Commit
8b9c933c283a472298ec32ebf76604951d9bfb9d
Parent
bd04a489258ee6e…
1 file changed
+11
+11
| --- src/http_ssl.c | ||
| +++ src/http_ssl.c | ||
| @@ -280,10 +280,21 @@ | ||
| 280 | 280 | if( blob_str(&ans)[0]=='a' ) { |
| 281 | 281 | ssl_save_certificate(cert); |
| 282 | 282 | } |
| 283 | 283 | blob_reset(&ans); |
| 284 | 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 | + | |
| 285 | 296 | X509_free(cert); |
| 286 | 297 | return 0; |
| 287 | 298 | } |
| 288 | 299 | |
| 289 | 300 | /* |
| 290 | 301 |
| --- 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 |