~ubuntu-branches/ubuntu/precise/xulrunner-1.9/precise

« back to all changes in this revision

Viewing changes to mozilla/security/nss/lib/certhigh/ocsp.c

  • Committer: Bazaar Package Importer
  • Author(s): Alexander Sack
  • Date: 2008-12-16 18:40:18 UTC
  • mfrom: (1.1.15 upstream)
  • Revision ID: james.westby@ubuntu.com-20081216184018-j646ukfhzxnjynix
Tags: 1.9.0.5+nobinonly-0ubuntu1
* new security/stability upstream release v1.9.0.5 (FIREFOX_3_0_5_RELEASE)
  - see USN-690-1
* submit patches upstreamed:
  - bzXXX_plugin_for_mimetype_pref.patch => bz449188_att350098_plugin_for_mimetype_pref.patch
  - update debian/patches/series
* adjust XULFastLoad cache in response to interleaving landing of bmo
  #453545 and #462806
  - update debian/patches/bz368428_attachment_308130.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
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.)
41
41
 *
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 $
43
43
 */
44
44
 
45
45
#include "prerror.h"
205
205
ocsp_dumpStringWithTime(const char *str, int64 time)
206
206
{
207
207
    PRExplodedTime timePrintable;
208
 
    char timestr[100];
 
208
    char timestr[256];
209
209
 
210
210
    if (!wantOcspTrace())
211
211
        return;
212
212
    PR_ExplodeTime(time, PR_GMTParameters, &timePrintable);
213
 
    PR_FormatTime(timestr, 100, "%a %b %d %H:%M:%S %Y", 
214
 
                  &timePrintable);
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);
 
215
    }
216
216
}
217
217
 
218
218
static void
245
245
    {
246
246
        int64 timeBefore, timeAfter;
247
247
        PRExplodedTime beforePrintable, afterPrintable;
248
 
        char beforestr[100], afterstr[100];
 
248
        char beforestr[256], afterstr[256];
 
249
        PRStatus rv1, rv2;
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 : "");
258
260
    }
259
261
    ocsp_Trace("OCSP ## ISSUER:  %s\n", cert->issuerName);
260
262
    printHexString("OCSP ## SERIAL NUMBER:", &cert->serialNumber);