Fossil SCM
Fix [https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=847556#10|Debian bug 847556]: Cannot clone/sync over HTTPS
Commit
04168f51704ed023060ac039d3cab7eebc62884e8a1b59db89830b0da2e6cfb1
Parent
93d52a010f07a08…
1 file changed
+5
-6
+5
-6
| --- src/http_ssl.c | ||
| +++ src/http_ssl.c | ||
| @@ -252,14 +252,12 @@ | ||
| 252 | 252 | hasSavedCertificate = 1; |
| 253 | 253 | } |
| 254 | 254 | |
| 255 | 255 | if( pUrlData->useProxy ){ |
| 256 | 256 | int rc; |
| 257 | - BIO *sBio; | |
| 258 | - char *connStr; | |
| 259 | - connStr = mprintf("%s:%d", g.url.name, pUrlData->port); | |
| 260 | - sBio = BIO_new_connect(connStr); | |
| 257 | + char *connStr = mprintf("%s:%d", g.url.name, pUrlData->port); | |
| 258 | + BIO *sBio = BIO_new_connect(connStr); | |
| 261 | 259 | free(connStr); |
| 262 | 260 | if( BIO_do_connect(sBio)<=0 ){ |
| 263 | 261 | ssl_set_errmsg("SSL: cannot connect to proxy %s:%d (%s)", |
| 264 | 262 | pUrlData->name, pUrlData->port, ERR_reason_error_string(ERR_get_error())); |
| 265 | 263 | ssl_close(); |
| @@ -293,12 +291,13 @@ | ||
| 293 | 291 | #endif |
| 294 | 292 | |
| 295 | 293 | SSL_set_mode(ssl, SSL_MODE_AUTO_RETRY); |
| 296 | 294 | |
| 297 | 295 | if( !pUrlData->useProxy ){ |
| 298 | - BIO_set_conn_hostname(iBio, pUrlData->name); | |
| 299 | - BIO_ctrl(iBio,BIO_C_SET_CONNECT,3,(char *)&pUrlData->port); | |
| 296 | + char *connStr = mprintf("%s:%d", pUrlData->name, pUrlData->port); | |
| 297 | + BIO_set_conn_hostname(iBio, connStr); | |
| 298 | + free(connStr); | |
| 300 | 299 | if( BIO_do_connect(iBio)<=0 ){ |
| 301 | 300 | ssl_set_errmsg("SSL: cannot connect to host %s:%d (%s)", |
| 302 | 301 | pUrlData->name, pUrlData->port, ERR_reason_error_string(ERR_get_error())); |
| 303 | 302 | ssl_close(); |
| 304 | 303 | return 1; |
| 305 | 304 |
| --- src/http_ssl.c | |
| +++ src/http_ssl.c | |
| @@ -252,14 +252,12 @@ | |
| 252 | hasSavedCertificate = 1; |
| 253 | } |
| 254 | |
| 255 | if( pUrlData->useProxy ){ |
| 256 | int rc; |
| 257 | BIO *sBio; |
| 258 | char *connStr; |
| 259 | connStr = mprintf("%s:%d", g.url.name, pUrlData->port); |
| 260 | sBio = BIO_new_connect(connStr); |
| 261 | free(connStr); |
| 262 | if( BIO_do_connect(sBio)<=0 ){ |
| 263 | ssl_set_errmsg("SSL: cannot connect to proxy %s:%d (%s)", |
| 264 | pUrlData->name, pUrlData->port, ERR_reason_error_string(ERR_get_error())); |
| 265 | ssl_close(); |
| @@ -293,12 +291,13 @@ | |
| 293 | #endif |
| 294 | |
| 295 | SSL_set_mode(ssl, SSL_MODE_AUTO_RETRY); |
| 296 | |
| 297 | if( !pUrlData->useProxy ){ |
| 298 | BIO_set_conn_hostname(iBio, pUrlData->name); |
| 299 | BIO_ctrl(iBio,BIO_C_SET_CONNECT,3,(char *)&pUrlData->port); |
| 300 | if( BIO_do_connect(iBio)<=0 ){ |
| 301 | ssl_set_errmsg("SSL: cannot connect to host %s:%d (%s)", |
| 302 | pUrlData->name, pUrlData->port, ERR_reason_error_string(ERR_get_error())); |
| 303 | ssl_close(); |
| 304 | return 1; |
| 305 |
| --- src/http_ssl.c | |
| +++ src/http_ssl.c | |
| @@ -252,14 +252,12 @@ | |
| 252 | hasSavedCertificate = 1; |
| 253 | } |
| 254 | |
| 255 | if( pUrlData->useProxy ){ |
| 256 | int rc; |
| 257 | char *connStr = mprintf("%s:%d", g.url.name, pUrlData->port); |
| 258 | BIO *sBio = BIO_new_connect(connStr); |
| 259 | free(connStr); |
| 260 | if( BIO_do_connect(sBio)<=0 ){ |
| 261 | ssl_set_errmsg("SSL: cannot connect to proxy %s:%d (%s)", |
| 262 | pUrlData->name, pUrlData->port, ERR_reason_error_string(ERR_get_error())); |
| 263 | ssl_close(); |
| @@ -293,12 +291,13 @@ | |
| 291 | #endif |
| 292 | |
| 293 | SSL_set_mode(ssl, SSL_MODE_AUTO_RETRY); |
| 294 | |
| 295 | if( !pUrlData->useProxy ){ |
| 296 | char *connStr = mprintf("%s:%d", pUrlData->name, pUrlData->port); |
| 297 | BIO_set_conn_hostname(iBio, connStr); |
| 298 | free(connStr); |
| 299 | if( BIO_do_connect(iBio)<=0 ){ |
| 300 | ssl_set_errmsg("SSL: cannot connect to host %s:%d (%s)", |
| 301 | pUrlData->name, pUrlData->port, ERR_reason_error_string(ERR_get_error())); |
| 302 | ssl_close(); |
| 303 | return 1; |
| 304 |