The following known-working code may help you. It sets a certificates
validity to from yesterday to a year from yesterday.
ASN1_UTCTIME *s=ASN1_UTCTIME_new();
X509_gmtime_adj(s, -60*60*24);
X509_set_notBefore(cert, s);
X509_gmtime_adj(s, 60*60*24*364);
X509_set_notAfter(cert, s)
OTECTED] De la part de Shaheed Bacchus
> > Envoyé : mercredi 3 septembre 2003 02:11
> > À : [EMAIL PROTECTED]
> > Objet : changing certificate validity period
> >
> > i have an application that creates it's own certificates (built with
> > 0.9.6j), i call X509
MAIL PROTECTED] De la part de Shaheed Bacchus
> Envoyé : mercredi 3 septembre 2003 02:11
> À : [EMAIL PROTECTED]
> Objet : changing certificate validity period
>
> i have an application that creates it's own certificates (built with
> 0.9.6j), i call X509_new() and then setup va
i have an application that creates it's own certificates (built with
0.9.6j), i call X509_new() and then setup various fields
(serial number, issuer name, etc). then i try to set the validity
period to 60 days by doing something like:
X509_gmtime_adj(X509_get_notBefore(Cert), 0);
X509_gmtime_adj(X