diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2009-09-02 13:54:50 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2009-09-02 13:54:50 +0000 |
commit | 17b5326ba9d072fbf9dca35f70e74361b91a3944 (patch) | |
tree | a4ff7debc9494b6774130dabc5f80c4e6bbe1c5c /crypto/x509 | |
parent | 3d9b105fe042b4986467ec12d881fa8a33ecd9ec (diff) |
PR: 2013
Submitted by: steve@openssl.org
Include a flag ASN1_STRING_FLAG_MSTRING when a multi string type is created.
This makes it possible to tell if the underlying type is UTCTime,
GeneralizedTime or Time when the structure is reused and X509_time_adj_ex()
can handle each case in an appropriate manner.
Add error checking to CRL generation in ca utility when nextUpdate is being
set.
Diffstat (limited to 'crypto/x509')
-rw-r--r-- | crypto/x509/x509_vfy.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/crypto/x509/x509_vfy.c b/crypto/x509/x509_vfy.c index 200a9cc0b6..62b01441b6 100644 --- a/crypto/x509/x509_vfy.c +++ b/crypto/x509/x509_vfy.c @@ -1765,10 +1765,14 @@ ASN1_TIME *X509_time_adj_ex(ASN1_TIME *s, else time(&t); if (s) type = s->type; - if (type == V_ASN1_UTCTIME) - return ASN1_UTCTIME_adj(s,t, offset_day, offset_sec); - if (type == V_ASN1_GENERALIZEDTIME) - return ASN1_GENERALIZEDTIME_adj(s, t, offset_day, offset_sec); + if (!(s->flags & ASN1_STRING_FLAG_MSTRING)) + { + if (type == V_ASN1_UTCTIME) + return ASN1_UTCTIME_adj(s,t, offset_day, offset_sec); + if (type == V_ASN1_GENERALIZEDTIME) + return ASN1_GENERALIZEDTIME_adj(s, t, offset_day, + offset_sec); + } return ASN1_TIME_adj(s, t, offset_day, offset_sec); } |