printf("issuer: \"%Y\"\n", cert->get_issuer(cert));
cert->get_validity(cert, &now, ¬Before, ¬After);
- printf("validity: not before %T, ", ¬Before, FALSE);
- if (now < notBefore)
+ if (notBefore != UNDEFINED_TIME || notAfter != UNDEFINED_TIME)
{
- printf("not valid yet (valid in %V)\n", &now, ¬Before);
- }
- else
- {
- printf("ok\n");
- }
- printf(" not after %T, ", ¬After, FALSE);
- if (now > notAfter)
- {
- printf("expired (%V ago)\n", &now, ¬After);
- }
- else
- {
- printf("ok (expires in %V)\n", &now, ¬After);
+ printf("validity: not before %T, ", ¬Before, FALSE);
+ if (now < notBefore)
+ {
+ printf("not valid yet (valid in %V)\n", &now, ¬Before);
+ }
+ else
+ {
+ printf("ok\n");
+ }
+ printf(" not after %T, ", ¬After, FALSE);
+ if (now > notAfter)
+ {
+ printf("expired (%V ago)\n", &now, ¬After);
+ }
+ else
+ {
+ printf("ok (expires in %V)\n", &now, ¬After);
+ }
}
switch (cert->get_type(cert))