aboutsummaryrefslogtreecommitdiff
path: root/crypto/asn1
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 /crypto/asn1
parente306892994a0f189089916d2ea66b3bdc0b2d777 (diff)
downloadopenssl-ccb08f98aea68cbafee75c6602768a85d1e29b7f.zip
openssl-ccb08f98aea68cbafee75c6602768a85d1e29b7f.tar.gz
openssl-ccb08f98aea68cbafee75c6602768a85d1e29b7f.tar.bz2
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 'crypto/asn1')
-rw-r--r--crypto/asn1/a_gentm.c1
-rw-r--r--crypto/asn1/a_utctm.c1
-rw-r--r--crypto/asn1/t_crl.c2
3 files changed, 3 insertions, 1 deletions
diff --git a/crypto/asn1/a_gentm.c b/crypto/asn1/a_gentm.c
index d71c190..f884b25 100644
--- a/crypto/asn1/a_gentm.c
+++ b/crypto/asn1/a_gentm.c
@@ -180,6 +180,7 @@ int ASN1_GENERALIZEDTIME_set_string(ASN1_GENERALIZEDTIME *s, char *str)
{
ASN1_STRING_set((ASN1_STRING *)s,
(unsigned char *)str,t.length);
+ s->type=V_ASN1_GENERALIZEDTIME;
}
return(1);
}
diff --git a/crypto/asn1/a_utctm.c b/crypto/asn1/a_utctm.c
index 6ddeaff..7cb6464 100644
--- a/crypto/asn1/a_utctm.c
+++ b/crypto/asn1/a_utctm.c
@@ -179,6 +179,7 @@ int ASN1_UTCTIME_set_string(ASN1_UTCTIME *s, char *str)
{
ASN1_STRING_set((ASN1_STRING *)s,
(unsigned char *)str,t.length);
+ s->type = V_ASN1_UTCTIME;
}
return(1);
}
diff --git a/crypto/asn1/t_crl.c b/crypto/asn1/t_crl.c
index f7b938b..ab9cd8f 100644
--- a/crypto/asn1/t_crl.c
+++ b/crypto/asn1/t_crl.c
@@ -112,7 +112,7 @@ int X509_CRL_print(BIO *out, X509_CRL *x)
rev = X509_CRL_get_REVOKED(x);
- if(sk_X509_REVOKED_num(rev))
+ if(sk_X509_REVOKED_num(rev) > 0)
BIO_printf(out, "Revoked Certificates:\n");
else BIO_printf(out, "No Revoked Certificates.\n");