39
39
* Implementation of OCSP services, for both client and server.
40
40
* (XXX, really, mostly just for client right now, but intended to do both.)
42
* $Id: ocsp.c,v 1.54 2008/07/08 21:34:32 alexei.volkov.bugs%sun.com Exp $
42
* $Id: ocsp.c,v 1.55 2008/10/06 23:37:55 julien.pierre.boogz%sun.com Exp $
45
45
#include "prerror.h"
205
205
ocsp_dumpStringWithTime(const char *str, int64 time)
207
207
PRExplodedTime timePrintable;
210
210
if (!wantOcspTrace())
212
212
PR_ExplodeTime(time, PR_GMTParameters, &timePrintable);
213
PR_FormatTime(timestr, 100, "%a %b %d %H:%M:%S %Y",
215
ocsp_Trace("OCSP %s %s\n", str, timestr);
213
if (PR_FormatTime(timestr, 256, "%a %b %d %H:%M:%S %Y", &timePrintable)) {
214
ocsp_Trace("OCSP %s %s\n", str, timestr);
246
246
int64 timeBefore, timeAfter;
247
247
PRExplodedTime beforePrintable, afterPrintable;
248
char beforestr[100], afterstr[100];
248
char beforestr[256], afterstr[256];
249
250
DER_DecodeTimeChoice(&timeBefore, &cert->validity.notBefore);
250
251
DER_DecodeTimeChoice(&timeAfter, &cert->validity.notAfter);
251
252
PR_ExplodeTime(timeBefore, PR_GMTParameters, &beforePrintable);
252
253
PR_ExplodeTime(timeAfter, PR_GMTParameters, &afterPrintable);
253
PR_FormatTime(beforestr, 100, "%a %b %d %H:%M:%S %Y",
254
rv1 = PR_FormatTime(beforestr, 256, "%a %b %d %H:%M:%S %Y",
254
255
&beforePrintable);
255
PR_FormatTime(afterstr, 100, "%a %b %d %H:%M:%S %Y",
256
rv2 = PR_FormatTime(afterstr, 256, "%a %b %d %H:%M:%S %Y",
256
257
&afterPrintable);
257
ocsp_Trace("OCSP ## VALIDITY: %s to %s\n", beforestr, afterstr);
258
ocsp_Trace("OCSP ## VALIDITY: %s to %s\n", rv1 ? beforestr : "",
259
rv2 ? afterstr : "");
259
261
ocsp_Trace("OCSP ## ISSUER: %s\n", cert->issuerName);
260
262
printHexString("OCSP ## SERIAL NUMBER:", &cert->serialNumber);