dacc203b89
Fix compile and linker flag issues. Also clean up covscan issues. Signed-off-by: Jerry Snitselaar <jsnitsel@redhat.com>
31 lines
1.1 KiB
Diff
31 lines
1.1 KiB
Diff
From 29f30ccc4032949e54be1996c24a7752793c3603 Mon Sep 17 00:00:00 2001
|
|
From: Jerry Snitselaar <jsnitsel@redhat.com>
|
|
Date: Wed, 20 Jun 2018 11:03:06 -0700
|
|
Subject: [PATCH 2/3] ektuils: check return of X509_gmtime_adj for notAfter
|
|
adjustment
|
|
|
|
The is a check for arc == NULL, but arc doesn't get assigned the
|
|
return value from x509_gmtime_adj.
|
|
|
|
Signed-off-by: Jerry Snitselaar <jsnitsel@redhat.com>
|
|
---
|
|
utils/ekutils.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/utils/ekutils.c b/utils/ekutils.c
|
|
index 8887bd5..36f8ece 100644
|
|
--- a/utils/ekutils.c
|
|
+++ b/utils/ekutils.c
|
|
@@ -1590,7 +1590,7 @@ TPM_RC startCertificate(X509 *x509Certificate, /* X509 certificate to be generat
|
|
if (rc == 0) {
|
|
/* can't fail, just returns a structure member */
|
|
ASN1_TIME *notAfter = X509_get_notAfter(x509Certificate);
|
|
- X509_gmtime_adj(notAfter, CERT_DURATION); /* set to duration */
|
|
+ arc = X509_gmtime_adj(notAfter, CERT_DURATION); /* set to duration */
|
|
if (arc == NULL) {
|
|
printf("startCertificate: Error setting notAfter time\n");
|
|
rc = TSS_RC_X509_ERROR;
|
|
--
|
|
2.17.0
|
|
|