diff options
author | Simon Josefsson <simon@josefsson.org> | 2007-02-09 12:59:29 +0000 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2007-02-09 12:59:29 +0000 |
commit | 67a9809f3871dcc1bcb6427937fdb51d3b6ece59 (patch) | |
tree | 0906d7d11c5ae02f0bc9da713b344e6b1b9fd2d4 | |
parent | 870e7a51973dfcf14de0e8513f75269793185226 (diff) | |
download | gnutls-67a9809f3871dcc1bcb6427937fdb51d3b6ece59.tar.gz |
Fix.
-rw-r--r-- | lib/x509/output.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/x509/output.c b/lib/x509/output.c index 3adc90f458..0505e13c37 100644 --- a/lib/x509/output.c +++ b/lib/x509/output.c @@ -520,9 +520,10 @@ print_cert (gnutls_string * str, gnutls_x509_crt_t cert) if (gmtime_r (&tim, &t) == NULL) addf (str, "error: gmtime_r failed (%d)\n", t); - if (strftime (s, max, "%a %b %e %H:%M:%S %Z %Y", &t) == 0) - strcpy (s, "strftime failed"); - addf (str, "\t\tNot Before: %s\n", s); + else if (strftime (s, max, "%a %b %e %H:%M:%S %Z %Y", &t) == 0) + strcpy (s, "strftime failed (%d)\n", t); + else + addf (str, "\t\tNot Before: %s\n", s); } tim = gnutls_x509_crt_get_expiration_time (cert); @@ -533,9 +534,10 @@ print_cert (gnutls_string * str, gnutls_x509_crt_t cert) if (gmtime_r (&tim, &t) == NULL) addf (str, "error: gmtime_r failed (%d)\n", t); - if (strftime (s, max, "%a %b %e %H:%M:%S %Z %Y", &t) == 0) - strcpy (s, "strftime failed"); - addf (str, "\t\tNot After: %s\n", s); + else if (strftime (s, max, "%a %b %e %H:%M:%S %Z %Y", &t) == 0) + strcpy (s, "strftime failed (%d)\n", t); + else + addf (str, "\t\tNot After: %s\n", s); } } |