diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2003-01-24 01:12:01 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2003-01-24 01:12:01 +0000 |
commit | d3b5cb5343afa4e4ae64bee4621171e6b00aaa21 (patch) | |
tree | 308f89977f30d1eddebf02c5c596c515db47e0ef /crypto/asn1/a_time.c | |
parent | 97e6bf6b22d75b847b5c9c0472c54ffe3169eece (diff) |
Check return value of gmtime() and add error codes
where it fails in ASN1_TIME_set().
Edit asn1.h so the new error code is the same in 0.9.7
and 0.9.8, rebuild new error codes.
Clear error queue in req.c if *_min or *_max is absent.
Diffstat (limited to 'crypto/asn1/a_time.c')
-rw-r--r-- | crypto/asn1/a_time.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/asn1/a_time.c b/crypto/asn1/a_time.c index 3a03c9e4e4..7348da9457 100644 --- a/crypto/asn1/a_time.c +++ b/crypto/asn1/a_time.c @@ -105,7 +105,10 @@ ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s, time_t t) ts=OPENSSL_gmtime(&t,&data); if (ts == NULL) + { + ASN1err(ASN1_F_ASN1_TIME_SET, ASN1_R_ERROR_GETTING_TIME); return NULL; + } if((ts->tm_year >= 50) && (ts->tm_year < 150)) return ASN1_UTCTIME_set(s, t); return ASN1_GENERALIZEDTIME_set(s,t); |