Fossil

Check-in [06cb09dd]
Login

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

Overview
Comment:Since libressl abuses OPENSSL_VERSION_NUMBER, don't let fossil being confused by that.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | branch-2.8
Files: files | file ages | folders
SHA3-256: 06cb09dde7d287e1761ed7f5556d42206ff655cb2da6289a66d889817de5dd58
User & Date: jan.nijtmans 2019-05-23 19:29:45
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
06:44
Since libressl abuses OPENSSL_VERSION_NUMBER, don't let fossil being confused by that. check-in: 5c40d6b0 user: jan.nijtmans tags: trunk
2019-05-20
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-17
14:04
(cherry-pick): Fix the openssl-1.1.1b build procedures. check-in: e5616cda user: jan.nijtmans tags: branch-2.8
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
400
401
402
  }

  /* 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.
  */
  {
  /* As soon as libressl implements BIO_ADDR_hostname_string/BIO_get_conn_address.
   * check here for the correct LIBRESSL_VERSION_NUMBER too. For now: disable */
  #if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10100000L \
      && !defined(LIBRESSL_VERSION_NUMBER)
    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);