From a3afc20ea83530a1bd0525e47f3d2fcd9496369c Mon Sep 17 00:00:00 2001 From: Amin Ben Ramdhane Date: Wed, 3 Feb 2021 23:16:54 +0100 Subject: [PATCH] bbf: do not use deprecated openssl functions --- dmtree/tr181/security.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dmtree/tr181/security.c b/dmtree/tr181/security.c index 98452af7..9d085e08 100644 --- a/dmtree/tr181/security.c +++ b/dmtree/tr181/security.c @@ -366,7 +366,7 @@ static int get_SecurityCertificate_NotBefore(char *refparam, struct dmctx *ctx, struct tm not_before_time; struct certificate_profile *cert_profile = (struct certificate_profile*)data; char not_before_str[DATE_LEN]; - ASN1_TIME *not_before = X509_get_notBefore(cert_profile->openssl_cert); + const ASN1_TIME *not_before = X509_get0_notBefore(cert_profile->openssl_cert); ASN1_TIME_to_tm(not_before, ¬_before_time); strftime(not_before_str, sizeof(not_before_str), "%Y-%m-%dT%H:%M:%SZ", ¬_before_time); *value = dmstrdup(not_before_str); @@ -384,7 +384,7 @@ static int get_SecurityCertificate_NotAfter(char *refparam, struct dmctx *ctx, v struct tm not_after_time; struct certificate_profile *cert_profile = (struct certificate_profile*)data; char not_after_str[DATE_LEN]; - ASN1_TIME *not_after = X509_get_notAfter(cert_profile->openssl_cert); + const ASN1_TIME *not_after = X509_get0_notAfter(cert_profile->openssl_cert); ASN1_TIME_to_tm(not_after, ¬_after_time); strftime(not_after_str, sizeof(not_after_str), "%Y-%m-%dT%H:%M:%SZ", ¬_after_time); *value = dmstrdup(not_after_str);