Fossil

Check-in [f23d509b]
Login

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

Overview
Comment:Better solution than [344a3331d34d896], which doesn't involve runtime-detection. Works with both Openssl 1.0.2 and 1.1.x.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: f23d509b4866d380f524b443054e0bd5590872e5e97f232e2cb72cd1618d63d7
User & Date: jan.nijtmans 2019-05-20 12:43:56
Original Comment: Better solution than [344a3331d34d896], which doesn't involve runtime-detection. Works with both Openssl 1.0.1 and 1.1.0.
Context
2019-05-23
19:29
Since libressl abuses OPENSSL_VERSION_NUMBER, don't let fossil being confused by that. Leaf check-in: 06cb09dd user: jan.nijtmans tags: branch-2.8
2019-05-20
20:33
Add a new test case to the graph-test-1.wiki file that verifies that when a fork occurs, the longest chain of check-ins occurs directly above the fork. That test case is currently failing and needs to be fixed. check-in: cfadf71f user: drh tags: trunk
12:43
Better solution than [344a3331d34d896], which doesn't involve runtime-detection. Works with both Openssl 1.0.2 and 1.1.x. check-in: f23d509b user: jan.nijtmans tags: trunk
2019-05-18
21:05
Back out check-in [344a3331d34d896] because it does not work with openssl-1.0.1. check-in: f08b93da user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to auto.def.

374
375
376
377
378
379
380
381
382
383
384
385
386
387
388

        # Silence OpenSSL deprecation warnings on Mac OS X 10.7.
        if {[string match *-darwin* [get-define host]]} {
            if {[cctest -cflags {-Wdeprecated-declarations}]} {
                define-append EXTRA_CFLAGS -Wdeprecated-declarations
            }
        }
        cc-check-function-in-lib BIO_ADDR_hostname_string ssl
    } else {
        user-error "OpenSSL not found. Consider --with-openssl=none to disable HTTPS support"
    }
} else {
    if {[info exists ::zlib_lib]} {
        define-append LIBS $::zlib_lib
    }







<







374
375
376
377
378
379
380

381
382
383
384
385
386
387

        # Silence OpenSSL deprecation warnings on Mac OS X 10.7.
        if {[string match *-darwin* [get-define host]]} {
            if {[cctest -cflags {-Wdeprecated-declarations}]} {
                define-append EXTRA_CFLAGS -Wdeprecated-declarations
            }
        }

    } else {
        user-error "OpenSSL not found. Consider --with-openssl=none to disable HTTPS support"
    }
} else {
    if {[info exists ::zlib_lib]} {
        define-append LIBS $::zlib_lib
    }

Changes to src/http_ssl.c.

385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
  }

  /* Set the Global.zIpAddr variable to the server we are talking to.
  ** This is used to populate the ipaddr column of the rcvfrom table,
  ** if any files are received from the server.
  */
  {
#ifdef HAVE_BIO_ADDR_HOSTNAME_STRING
    char *ip = BIO_ADDR_hostname_string(BIO_get_conn_address(iBio),1);
    g.zIpAddr = mprintf("%s", ip);
    OPENSSL_free(ip);
#else
    /* IPv4 only code */
    const unsigned char *ip;
    ip = (const unsigned char*)BIO_ptr_ctrl(iBio,BIO_C_GET_CONNECT,2);







|







385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
  }

  /* Set the Global.zIpAddr variable to the server we are talking to.
  ** This is used to populate the ipaddr column of the rcvfrom table,
  ** if any files are received from the server.
  */
  {
#if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10100000L
    char *ip = BIO_ADDR_hostname_string(BIO_get_conn_address(iBio),1);
    g.zIpAddr = mprintf("%s", ip);
    OPENSSL_free(ip);
#else
    /* IPv4 only code */
    const unsigned char *ip;
    ip = (const unsigned char*)BIO_ptr_ctrl(iBio,BIO_C_GET_CONNECT,2);