From: Mark Andrews Date: Tue, 16 Mar 2021 21:58:55 +0000 (+0000) Subject: Stop using deprecated calls in lib/isc/tls.c X-Git-Tag: v9.17.12~39^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a9f883cbc28b865d312918368772627cf9610a2f;p=thirdparty%2Fbind9.git Stop using deprecated calls in lib/isc/tls.c from Rosen Penev @neheb --- diff --git a/lib/isc/tls.c b/lib/isc/tls.c index d15fc16b1ce..5fc293d5267 100644 --- a/lib/isc/tls.c +++ b/lib/isc/tls.c @@ -12,10 +12,12 @@ #include #include +#include #include #include #include #include +#include #include #include @@ -274,11 +276,19 @@ isc_tlsctx_createserver(const char *keyfile, const char *certfile, rsa = NULL; ASN1_INTEGER_set(X509_get_serialNumber(cert), 1); +#if OPENSSL_VERSION_NUMBER < 0x10101000L X509_gmtime_adj(X509_get_notBefore(cert), 0); +#else + X509_gmtime_adj(X509_getm_notBefore(cert), 0); +#endif /* * We set the vailidy for 10 years. */ +#if OPENSSL_VERSION_NUMBER < 0x10101000L X509_gmtime_adj(X509_get_notAfter(cert), 3650 * 24 * 3600); +#else + X509_gmtime_adj(X509_getm_notAfter(cert), 3650 * 24 * 3600); +#endif X509_set_pubkey(cert, pkey);