tpm2-tools/SOURCES/0009-openssl-Replace-deprecated-X509_get_-by-X509_getm_.patch
2022-05-17 18:32:08 +00:00

32 lines
1.2 KiB
Diff

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