Various fixes...
[openssl.git] / crypto / x509 / x509_vfy.c
index 0d5273d51a432da18fe4159689ce5d20a18f4036..ccc031377a62b5069445ac2776416e1c1024f4ae 100644 (file)
@@ -582,6 +582,7 @@ ASN1_TIME *X509_gmtime_adj(ASN1_TIME *s, long adj)
 
        time(&t);
        t+=adj;
+       if(!s) return ASN1_TIME_set(s, t);
        if(s->type == V_ASN1_UTCTIME) return(ASN1_UTCTIME_set(s,t));
        return ASN1_GENERALIZEDTIME_set(s, t);
        }