Fossil SCM

Fix [https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=847556#10|Debian bug 847556]: Cannot clone/sync over HTTPS

jan.nijtmans 2017-03-14 12:11 trunk
Commit 04168f51704ed023060ac039d3cab7eebc62884e8a1b59db89830b0da2e6cfb1
1 file changed +5 -6
+5 -6
--- src/http_ssl.c
+++ src/http_ssl.c
@@ -252,14 +252,12 @@
252252
hasSavedCertificate = 1;
253253
}
254254
255255
if( pUrlData->useProxy ){
256256
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);
261259
free(connStr);
262260
if( BIO_do_connect(sBio)<=0 ){
263261
ssl_set_errmsg("SSL: cannot connect to proxy %s:%d (%s)",
264262
pUrlData->name, pUrlData->port, ERR_reason_error_string(ERR_get_error()));
265263
ssl_close();
@@ -293,12 +291,13 @@
293291
#endif
294292
295293
SSL_set_mode(ssl, SSL_MODE_AUTO_RETRY);
296294
297295
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);
300299
if( BIO_do_connect(iBio)<=0 ){
301300
ssl_set_errmsg("SSL: cannot connect to host %s:%d (%s)",
302301
pUrlData->name, pUrlData->port, ERR_reason_error_string(ERR_get_error()));
303302
ssl_close();
304303
return 1;
305304
--- 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

Keyboard Shortcuts

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