aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2001-02-10 00:56:45 +0000
committerDr. Stephen Henson <steve@openssl.org>2001-02-10 00:56:45 +0000
commitccb08f98aea68cbafee75c6602768a85d1e29b7f (patch)
tree765bf1b8e6d1046fc6e35d58d81d54eafb6e300a /apps
parente306892994a0f189089916d2ea66b3bdc0b2d777 (diff)
downloadopenssl-ccb08f98aea68cbafee75c6602768a85d1e29b7f.tar.gz
Fix CRL printing to correctly show when there are no revoked certificates.
Make ca.c correctly initialize the revocation date. Make ASN1_UTCTIME_set_string() and ASN1_GENERALIZEDTIME_set_string() set the string type: so they can initialize ASN1_TIME structures properly.
Diffstat (limited to 'apps')
-rw-r--r--apps/ca.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/apps/ca.c b/apps/ca.c
index 567ef4777c..b84e842bc0 100644
--- a/apps/ca.c
+++ b/apps/ca.c
@@ -1379,10 +1379,9 @@ bad:
if (pp[DB_type][0] == DB_TYPE_REV)
{
if ((r=X509_REVOKED_new()) == NULL) goto err;
- ASN1_STRING_set((ASN1_STRING *)
- r->revocationDate,
- (unsigned char *)pp[DB_rev_date],
- strlen(pp[DB_rev_date]));
+ if (!ASN1_UTCTIME_set_string(r->revocationDate,
+ pp[DB_rev_date]))
+ goto err;
/* strcpy(r->revocationDate,pp[DB_rev_date]);*/
(void)BIO_reset(hex);