[mod_openssl] replace deprecated openssl funcs
replace deprecated openssl funcs reported when #define OPENSSL_NO_DEPRECATED
This commit is contained in:
parent
f7f800c5cc
commit
1eb60deb9f
|
@ -670,7 +670,11 @@ PEM_ASN1_read_bio_secmem(d2i_of_void *d2i, const char *name, BIO *bp, void **x,
|
|||
ret = d2i(x, &p, len);
|
||||
#ifndef BORINGSSL_API_VERSION /* missing PEMerr() macro */
|
||||
if (ret == NULL)
|
||||
#if OPENSSL_VERSION_NUMBER < 0x30000000L
|
||||
PEMerr(PEM_F_PEM_ASN1_READ_BIO, ERR_R_ASN1_LIB);
|
||||
#else
|
||||
ERR_raise(ERR_LIB_PEM, ERR_R_ASN1_LIB);
|
||||
#endif
|
||||
#endif
|
||||
/* boringssl provides OPENSSL_secure_clear_free() in commit
|
||||
* 8a1542fc41b43bdcd67cd341c1d332d2e05e2340 (not yet in a release)
|
||||
|
@ -3601,7 +3605,13 @@ https_add_ssl_client_entries (request_st * const r, handler_ctx * const hctx)
|
|||
buffer_copy_string_len(vb, CONST_STR_LEN("FAILED:"));
|
||||
https_add_ssl_client_verify_err(vb, vr);
|
||||
return;
|
||||
} else if (!(xs = SSL_get_peer_certificate(hctx->ssl))) {
|
||||
}
|
||||
#if OPENSSL_VERSION_NUMBER < 0x30000000L
|
||||
else if (!(xs = SSL_get_peer_certificate(hctx->ssl)))
|
||||
#else
|
||||
else if (!(xs = SSL_get0_peer_certificate(hctx->ssl)))
|
||||
#endif
|
||||
{
|
||||
buffer_copy_string_len(vb, CONST_STR_LEN("NONE"));
|
||||
return;
|
||||
} else {
|
||||
|
@ -3663,7 +3673,9 @@ https_add_ssl_client_entries (request_st * const r, handler_ctx * const hctx)
|
|||
BIO_free(bio);
|
||||
}
|
||||
}
|
||||
#if OPENSSL_VERSION_NUMBER < 0x30000000L
|
||||
X509_free(xs);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue