mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-03-17 20:58:34 +02:00
Require OpenSSL >= 1.1.1.
Versions below 1.1.1 are quite old and no longer need to be supported. Also add a missing const in tlsAsn1ToStr().
This commit is contained in:
parent
b71d4b53d6
commit
cf8625d24b
@ -161,7 +161,7 @@ lib_lz4 = dependency('liblz4')
|
||||
configuration.set('HAVE_LIBLZ4', true, description: 'Is liblz4 present?')
|
||||
|
||||
# Find required openssl library
|
||||
lib_openssl = dependency('openssl')
|
||||
lib_openssl = dependency('openssl', version : '>=1.1.1')
|
||||
|
||||
# Find required pq library
|
||||
lib_pq = dependency('libpq')
|
||||
|
@ -59,14 +59,8 @@ cryptoInit(void)
|
||||
ERR_load_crypto_strings();
|
||||
OpenSSL_add_all_algorithms();
|
||||
|
||||
// SSL initialization depends on the version of OpenSSL
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
OPENSSL_config(NULL);
|
||||
SSL_library_init();
|
||||
SSL_load_error_strings();
|
||||
#else
|
||||
// Initialization
|
||||
OPENSSL_init_ssl(OPENSSL_INIT_LOAD_CONFIG, NULL);
|
||||
#endif
|
||||
|
||||
// Mark crypto as initialized
|
||||
cryptoInitDone = true;
|
||||
|
@ -16,7 +16,7 @@ TLS Common
|
||||
|
||||
/**********************************************************************************************************************************/
|
||||
FN_EXTERN String *
|
||||
tlsAsn1ToStr(ASN1_STRING *const nameAsn1)
|
||||
tlsAsn1ToStr(const ASN1_STRING *const nameAsn1)
|
||||
{
|
||||
FUNCTION_TEST_BEGIN();
|
||||
FUNCTION_TEST_PARAM_P(VOID, nameAsn1);
|
||||
@ -29,11 +29,7 @@ tlsAsn1ToStr(ASN1_STRING *const nameAsn1)
|
||||
FUNCTION_TEST_RETURN( // {vm_covered}
|
||||
STRING,
|
||||
strNewZN(
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
(const char *)ASN1_STRING_data(nameAsn1),
|
||||
#else
|
||||
(const char *)ASN1_STRING_get0_data(nameAsn1),
|
||||
#endif
|
||||
(size_t)ASN1_STRING_length(nameAsn1)));
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,7 @@ TLS Common
|
||||
Functions
|
||||
***********************************************************************************************************************************/
|
||||
// Convert an ASN1 string used in certificates to a String
|
||||
FN_EXTERN String *tlsAsn1ToStr(ASN1_STRING *nameAsn1);
|
||||
FN_EXTERN String *tlsAsn1ToStr(const ASN1_STRING *nameAsn1);
|
||||
|
||||
// Get common name from a certificate
|
||||
FN_EXTERN String *tlsCertCommonName(X509 *certificate);
|
||||
|
@ -249,11 +249,7 @@ storageGcsAuthJwt(StorageGcs *const this, const time_t timeBegin)
|
||||
FINALLY()
|
||||
{
|
||||
BIO_free((BIO *)bio);
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
EVP_MD_CTX_cleanup((EVP_MD_CTX *)sign);
|
||||
#else
|
||||
EVP_MD_CTX_free((EVP_MD_CTX *)sign);
|
||||
#endif
|
||||
EVP_PKEY_free((EVP_PKEY *)privateKey);
|
||||
}
|
||||
TRY_END();
|
||||
|
Loading…
x
Reference in New Issue
Block a user