diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2012-11-20 16:22:15 +0100 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2012-11-20 16:22:15 +0100 |
commit | f7ac0ec89d0daefdea2956c55c17f1246e81c0a6 (patch) | |
tree | bb332ec374161faad33b26181bfb0198120b4f23 /apps/ca.c | |
parent | don't use psec or pdays if NULL (diff) | |
download | openssl-f7ac0ec89d0daefdea2956c55c17f1246e81c0a6.tar.xz openssl-f7ac0ec89d0daefdea2956c55c17f1246e81c0a6.zip |
fix printout of expiry days if -enddate is used in ca
Diffstat (limited to 'apps/ca.c')
-rw-r--r-- | apps/ca.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -2052,7 +2052,13 @@ again2: if (enddate == NULL) X509_time_adj_ex(X509_get_notAfter(ret),days, 0, NULL); - else ASN1_TIME_set_string(X509_get_notAfter(ret),enddate); + else + { + int tdays; + ASN1_TIME_set_string(X509_get_notAfter(ret),enddate); + ASN1_TIME_diff(&tdays, NULL, NULL, X509_get_notAfter(ret)); + days = tdays; + } if (!X509_set_subject_name(ret,subject)) goto err; |