• Heikki Linnakangas's avatar
    Support OpenSSL 1.1.0. · 593d4e47
    Heikki Linnakangas authored
    Changes needed to build at all:
    
    - Check for SSL_new in configure, now that SSL_library_init is a macro.
    - Do not access struct members directly. This includes some new code in
      pgcrypto, to use the resource owner mechanism to ensure that we don't
      leak OpenSSL handles, now that we can't embed them in other structs
      anymore.
    - RAND_SSLeay() -> RAND_OpenSSL()
    
    Changes that were needed to silence deprecation warnings, but were not
    strictly necessary:
    
    - RAND_pseudo_bytes() -> RAND_bytes().
    - SSL_library_init() and OpenSSL_config() -> OPENSSL_init_ssl()
    - ASN1_STRING_data() -> ASN1_STRING_get0_data()
    - DH_generate_parameters() -> DH_generate_parameters()
    - Locking callbacks are not needed with OpenSSL 1.1.0 anymore. (Good
      riddance!)
    
    Also change references to SSLEAY_VERSION_NUMBER with OPENSSL_VERSION_NUMBER,
    for the sake of consistency. OPENSSL_VERSION_NUMBER has existed since time
    immemorial.
    
    Fix SSL test suite to work with OpenSSL 1.1.0. CA certificates must have
    the "CA:true" basic constraint extension now, or OpenSSL will refuse them.
    Regenerate the test certificates with that. The "openssl" binary, used to
    generate the certificates, is also now more picky, and throws an error
    if an X509 extension is specified in "req_extensions", but that section
    is empty.
    
    Backpatch to all supported branches, per popular demand. In back-branches,
    we still support OpenSSL 0.9.7 and above. OpenSSL 0.9.6 should still work
    too, but I didn't test it. In master, we only support 0.9.8 and above.
    
    Patch by Andreas Karlsson, with additional changes by me.
    
    Discussion: <20160627151604.GD1051@msg.df7cb.de>
    593d4e47
server-no-names.config 387 Bytes