diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2015-11-28 10:11:52 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2015-11-28 10:12:37 +0100 |
commit | 8648af78811de8f1040efa9c45cc8c263fc05c60 (patch) | |
tree | c5bafc38ca78994097bfb3fede0798ad3d7a53f5 | |
parent | 2e5fcb74b006972cd07a69faf91217bf5f1d0436 (diff) | |
download | gnutls-8648af78811de8f1040efa9c45cc8c263fc05c60.tar.gz |
ocsp_output: when next update is not present don't print error message
That is because this field is optional.
Resolves #53
-rw-r--r-- | lib/x509/ocsp_output.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/x509/ocsp_output.c b/lib/x509/ocsp_output.c index a4e7497744..16381fe7bd 100644 --- a/lib/x509/ocsp_output.c +++ b/lib/x509/ocsp_output.c @@ -442,18 +442,18 @@ print_resp(gnutls_buffer_st * str, gnutls_ocsp_resp_t resp, size_t max = sizeof(s); struct tm t; - if (next_update == (time_t) - 1) - addf(str, "error: next_update\n"); - else if (gmtime_r(&next_update, &t) == NULL) - addf(str, "error: gmtime_r (%ld)\n", - (unsigned long) next_update); - else if (strftime - (s, max, "%a %b %d %H:%M:%S UTC %Y", - &t) == 0) - addf(str, "error: strftime (%ld)\n", - (unsigned long) next_update); - else - addf(str, _("\t\tNext Update: %s\n"), s); + if (next_update != (time_t) - 1) { + if (gmtime_r(&next_update, &t) == NULL) + addf(str, "error: gmtime_r (%ld)\n", + (unsigned long) next_update); + else if (strftime + (s, max, "%a %b %d %H:%M:%S UTC %Y", + &t) == 0) + addf(str, "error: strftime (%ld)\n", + (unsigned long) next_update); + else + addf(str, _("\t\tNext Update: %s\n"), s); + } } /* XXX singleRequestExtensions */ |