Fossil

Check-in [04168f51]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix Debian bug 847556: Cannot clone/sync over HTTPS
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:04168f51704ed023060ac039d3cab7eebc62884e8a1b59db89830b0da2e6cfb1
User & Date: jan.nijtmans 2017-03-14 12:11:48
Context
2017-03-14
14:38
Fix build on mingw-w64 (which DOES have strtok_r) check-in: 6f523169 user: jan.nijtmans tags: trunk
12:17
merge trunk check-in: bec0c4f0 user: jan.nijtmans tags: openssl-1.1
12:11
Fix Debian bug 847556: Cannot clone/sync over HTTPS check-in: 04168f51 user: jan.nijtmans tags: trunk
01:55
Merge in small fixes to the test suite and plan to continue improving the suite in the trunk. Also kludge login.c on MinGW which has no strtok_r() available in its libc by supplying a public domain one. There certainly is a better way to deal with this, but this unbreaks the build on Windows broken by [315cf2436]. check-in: 93d52a01 user: rberteig tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/http_ssl.c.

250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
...
291
292
293
294
295
296
297
298
299

300
301
302
303
304
305
306
    X509_STORE_add_cert(SSL_CTX_get_cert_store(sslCtx), cert);
    X509_free(cert);
    hasSavedCertificate = 1;
  }

  if( pUrlData->useProxy ){
    int rc;
    BIO *sBio;
    char *connStr;
    connStr = mprintf("%s:%d", g.url.name, pUrlData->port);
    sBio = BIO_new_connect(connStr);
    free(connStr);
    if( BIO_do_connect(sBio)<=0 ){
      ssl_set_errmsg("SSL: cannot connect to proxy %s:%d (%s)",
            pUrlData->name, pUrlData->port, ERR_reason_error_string(ERR_get_error()));
      ssl_close();
      return 1;
    }
................................................................................
                  "continuing without it.\n");
  }
#endif

  SSL_set_mode(ssl, SSL_MODE_AUTO_RETRY);

  if( !pUrlData->useProxy ){
    BIO_set_conn_hostname(iBio, pUrlData->name);
    BIO_ctrl(iBio,BIO_C_SET_CONNECT,3,(char *)&pUrlData->port);

    if( BIO_do_connect(iBio)<=0 ){
      ssl_set_errmsg("SSL: cannot connect to host %s:%d (%s)",
          pUrlData->name, pUrlData->port, ERR_reason_error_string(ERR_get_error()));
      ssl_close();
      return 1;
    }
  }







<
<
|
|







 







|
|
>







250
251
252
253
254
255
256


257
258
259
260
261
262
263
264
265
...
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
    X509_STORE_add_cert(SSL_CTX_get_cert_store(sslCtx), cert);
    X509_free(cert);
    hasSavedCertificate = 1;
  }

  if( pUrlData->useProxy ){
    int rc;


    char *connStr = mprintf("%s:%d", g.url.name, pUrlData->port);
    BIO *sBio = BIO_new_connect(connStr);
    free(connStr);
    if( BIO_do_connect(sBio)<=0 ){
      ssl_set_errmsg("SSL: cannot connect to proxy %s:%d (%s)",
            pUrlData->name, pUrlData->port, ERR_reason_error_string(ERR_get_error()));
      ssl_close();
      return 1;
    }
................................................................................
                  "continuing without it.\n");
  }
#endif

  SSL_set_mode(ssl, SSL_MODE_AUTO_RETRY);

  if( !pUrlData->useProxy ){
    char *connStr = mprintf("%s:%d", pUrlData->name, pUrlData->port);
    BIO_set_conn_hostname(iBio, connStr);
    free(connStr);
    if( BIO_do_connect(iBio)<=0 ){
      ssl_set_errmsg("SSL: cannot connect to host %s:%d (%s)",
          pUrlData->name, pUrlData->port, ERR_reason_error_string(ERR_get_error()));
      ssl_close();
      return 1;
    }
  }