chantra / rpms / tpm2-tools

Forked from rpms/tpm2-tools 2 years ago
Clone

Blame SOURCES/0009-openssl-Replace-deprecated-X509_get_-by-X509_getm_.patch

28a59a
From 0dfb7b70f77ddcb8a82ca45f04e028c5fcfc350e Mon Sep 17 00:00:00 2001
28a59a
From: Petr Gotthard <petr.gotthard@centrum.cz>
28a59a
Date: Sat, 7 Aug 2021 12:29:28 +0200
28a59a
Subject: [PATCH 08/17] openssl: Replace deprecated X509_get_ by X509_getm_
28a59a
28a59a
The X509_get_notBefore() and X509_get_notAfter() were deprecated already
28a59a
in OpenSSL 1.1.0.
28a59a
28a59a
Signed-off-by: Petr Gotthard <petr.gotthard@centrum.cz>
28a59a
---
28a59a
 tools/misc/tpm2_certifyX509certutil.c | 4 ++--
28a59a
 1 file changed, 2 insertions(+), 2 deletions(-)
28a59a
28a59a
diff --git a/tools/misc/tpm2_certifyX509certutil.c b/tools/misc/tpm2_certifyX509certutil.c
28a59a
index e56da2d3..62ed644a 100644
28a59a
--- a/tools/misc/tpm2_certifyX509certutil.c
28a59a
+++ b/tools/misc/tpm2_certifyX509certutil.c
28a59a
@@ -260,8 +260,8 @@ static tool_rc generate_partial_X509() {
28a59a
         goto out_err;
28a59a
     }
28a59a
 
28a59a
-    X509_gmtime_adj(X509_get_notBefore(cert), 0); // add valid not before
28a59a
-    X509_gmtime_adj(X509_get_notAfter(cert), valid_days * 86400); // add valid not after
28a59a
+    X509_gmtime_adj(X509_getm_notBefore(cert), 0); // add valid not before
28a59a
+    X509_gmtime_adj(X509_getm_notAfter(cert), valid_days * 86400); // add valid not after
28a59a
 
28a59a
     X509_NAME *subject = X509_get_subject_name(cert);
28a59a
     if (!subject) {
28a59a
-- 
28a59a
2.31.1
28a59a