mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 02:59:01 -04:00
Fix ssl_openssl on OpenSSL versions older than 1.1.1.
Fixes a regression introduced in commit eba5cb9dc9.
This commit is contained in:
parent
24d5d53df0
commit
e607175dfa
@ -704,6 +704,10 @@ class OpenSSLIOHook : public SSLIOHook
|
||||
certinfo->activation = GetTime(X509_getm_notBefore(cert));
|
||||
certinfo->expiration = GetTime(X509_getm_notAfter(cert));
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10101000L
|
||||
# define ASN1_TIME_cmp_time_t ASN1_UTCTIME_cmp_time_t
|
||||
#endif
|
||||
|
||||
int activated = ASN1_TIME_cmp_time_t(X509_getm_notBefore(cert), ServerInstance->Time());
|
||||
if (activated != -1 && activated != 0)
|
||||
certinfo->error = "Certificate not activated";
|
||||
|
Loading…
x
Reference in New Issue
Block a user