mirror of https://github.com/citusdata/citus.git
Fix preprocessor conditionals for OpenSSL version checks in SSL setup functions
parent
05432519e2
commit
c9cc28c0a1
|
@ -245,7 +245,7 @@ CreateCertificatesWhenNeeded()
|
||||||
* PostgreSQL itself will perform its full SSL setup when it reloads
|
* PostgreSQL itself will perform its full SSL setup when it reloads
|
||||||
* its configuration with ssl enabled.
|
* its configuration with ssl enabled.
|
||||||
*/
|
*/
|
||||||
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
|
#if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10100000L
|
||||||
|
|
||||||
/* OpenSSL 1.1.0+ */
|
/* OpenSSL 1.1.0+ */
|
||||||
OPENSSL_init_ssl(OPENSSL_INIT_LOAD_CONFIG, NULL);
|
OPENSSL_init_ssl(OPENSSL_INIT_LOAD_CONFIG, NULL);
|
||||||
|
@ -255,7 +255,7 @@ CreateCertificatesWhenNeeded()
|
||||||
SSL_library_init();
|
SSL_library_init();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
|
#if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10100000L
|
||||||
sslContext = SSL_CTX_new(TLS_method());
|
sslContext = SSL_CTX_new(TLS_method());
|
||||||
#else
|
#else
|
||||||
sslContext = SSL_CTX_new(SSLv23_method());
|
sslContext = SSL_CTX_new(SSLv23_method());
|
||||||
|
@ -389,7 +389,7 @@ CreateCertificate(EVP_PKEY *privateKey)
|
||||||
* would fail right after an upgrade. Instead of working until the certificate
|
* would fail right after an upgrade. Instead of working until the certificate
|
||||||
* expiration date and then suddenly erroring out.
|
* expiration date and then suddenly erroring out.
|
||||||
*/
|
*/
|
||||||
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
|
#if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10100000L
|
||||||
|
|
||||||
/* New mutable accessors (present in 1.1, 3.x). */
|
/* New mutable accessors (present in 1.1, 3.x). */
|
||||||
X509_gmtime_adj(X509_getm_notBefore(certificate), 0);
|
X509_gmtime_adj(X509_getm_notBefore(certificate), 0);
|
||||||
|
|
Loading…
Reference in New Issue