Rename CERT_DecodeTimeChoice/CERT_EncodeTimeChoice to DER_DecodeTimeChoice/DER_EncodeTimeChoice

This commit is contained in:
jpierre%netscape.com 2004-01-07 23:07:24 +00:00
Родитель cf89e72259
Коммит cec1dc097b
11 изменённых файлов: 29 добавлений и 29 удалений

Просмотреть файл

@ -265,8 +265,8 @@ dumpCertificate(CERTCertificate *cert, int num, PRFileDesc *outfile)
int64 timeBefore, timeAfter;
PRExplodedTime beforePrintable, afterPrintable;
char *beforestr, *afterstr;
CERT_DecodeTimeChoice(&timeBefore, &cert->validity.notBefore);
CERT_DecodeTimeChoice(&timeAfter, &cert->validity.notAfter);
DER_DecodeTimeChoice(&timeBefore, &cert->validity.notBefore);
DER_DecodeTimeChoice(&timeAfter, &cert->validity.notAfter);
PR_ExplodeTime(timeBefore, PR_GMTParameters, &beforePrintable);
PR_ExplodeTime(timeAfter, PR_GMTParameters, &afterPrintable);
beforestr = PORT_Alloc(100);

Просмотреть файл

@ -110,7 +110,7 @@ sv_PrintTime(FILE *out, SECItem *t, char *m)
char *timeString;
int rv;
rv = CERT_DecodeTimeChoice(&time, t);
rv = DER_DecodeTimeChoice(&time, t);
if (rv) return rv;
/* Convert to local time */

Просмотреть файл

@ -34,7 +34,7 @@
/*
* Certificate handling code
*
* $Id: certdb.c,v 1.58 2003-12-17 22:43:25 wchang0222%aol.com Exp $
* $Id: certdb.c,v 1.59 2004-01-07 23:07:22 jpierre%netscape.com Exp $
*/
#include "nssilock.h"
@ -963,13 +963,13 @@ CERT_GetCertTimes(CERTCertificate *c, PRTime *notBefore, PRTime *notAfter)
}
/* convert DER not-before time */
rv = CERT_DecodeTimeChoice(notBefore, &c->validity.notBefore);
rv = DER_DecodeTimeChoice(notBefore, &c->validity.notBefore);
if (rv) {
return(SECFailure);
}
/* convert DER not-after time */
rv = CERT_DecodeTimeChoice(notAfter, &c->validity.notAfter);
rv = DER_DecodeTimeChoice(notAfter, &c->validity.notAfter);
if (rv) {
return(SECFailure);
}
@ -1020,14 +1020,14 @@ SEC_GetCrlTimes(CERTCrl *date, PRTime *notBefore, PRTime *notAfter)
int rv;
/* convert DER not-before time */
rv = CERT_DecodeTimeChoice(notBefore, &date->lastUpdate);
rv = DER_DecodeTimeChoice(notBefore, &date->lastUpdate);
if (rv) {
return(SECFailure);
}
/* convert DER not-after time */
if (date->nextUpdate.data) {
rv = CERT_DecodeTimeChoice(notAfter, &date->nextUpdate);
rv = DER_DecodeTimeChoice(notAfter, &date->nextUpdate);
if (rv) {
return(SECFailure);
}

Просмотреть файл

@ -34,7 +34,7 @@
/*
* Moved from secpkcs7.c
*
* $Id: crl.c,v 1.38 2003-10-25 00:41:14 jpierre%netscape.com Exp $
* $Id: crl.c,v 1.39 2004-01-07 23:07:22 jpierre%netscape.com Exp $
*/
#include "cert.h"
@ -1875,7 +1875,7 @@ CERT_CheckCRL(CERTCertificate* cert, CERTCertificate* issuer, SECItem* dp,
/* check the time if we have one */
if (entry->revocationDate.data && entry->revocationDate.len) {
int64 revocationDate = 0;
if (SECSuccess == CERT_DecodeTimeChoice(&revocationDate,
if (SECSuccess == DER_DecodeTimeChoice(&revocationDate,
&entry->revocationDate)) {
/* we got a good revocation date, only consider the
certificate revoked if the time we are inquiring about

Просмотреть файл

@ -758,9 +758,9 @@ SECKEY_PublicKeyStrengthInBits;
;+};
;+NSS_3.9 { # NSS 3.9 release
;+ global:
CERT_DecodeTimeChoice;
DER_DecodeTimeChoice;
CERT_DestroyOidSequence;
CERT_EncodeTimeChoice;
DER_EncodeTimeChoice;
CERT_GetOidString;
;;CERT_TimeChoiceTemplate DATA ;
DSAU_DecodeDerSigToLen;

Просмотреть файл

@ -34,7 +34,7 @@
/*
* PKCS7 creation.
*
* $Id: p7create.c,v 1.4 2003-09-19 04:16:19 jpierre%netscape.com Exp $
* $Id: p7create.c,v 1.5 2004-01-07 23:07:23 jpierre%netscape.com Exp $
*/
#include "p7local.h"
@ -617,7 +617,7 @@ SEC_PKCS7AddSigningTime (SEC_PKCS7ContentInfo *cinfo)
if (signerinfos == NULL || signerinfos[0] == NULL)
return SECFailure;
rv = CERT_EncodeTimeChoice(NULL, &stime, PR_Now());
rv = DER_EncodeTimeChoice(NULL, &stime, PR_Now());
if (rv != SECSuccess)
return rv;

Просмотреть файл

@ -34,7 +34,7 @@
/*
* PKCS7 decoding, verification.
*
* $Id: p7decode.c,v 1.14 2003-11-15 00:09:50 nelsonb%netscape.com Exp $
* $Id: p7decode.c,v 1.15 2004-01-07 23:07:23 jpierre%netscape.com Exp $
*/
#include "nssrenam.h"
@ -1573,7 +1573,7 @@ sec_pkcs7_verify_signature(SEC_PKCS7ContentInfo *cinfo,
*/
encoded_stime = SEC_PKCS7GetSigningTime (cinfo);
if (encoded_stime != NULL) {
if (CERT_DecodeTimeChoice (&stime, encoded_stime) != SECSuccess)
if (DER_DecodeTimeChoice (&stime, encoded_stime) != SECSuccess)
encoded_stime = NULL; /* conversion failed, so pretend none */
}

Просмотреть файл

@ -34,7 +34,7 @@
/*
* CMS signerInfo methods.
*
* $Id: cmssiginfo.c,v 1.23 2003-12-12 21:42:02 jpierre%netscape.com Exp $
* $Id: cmssiginfo.c,v 1.24 2004-01-07 23:07:23 jpierre%netscape.com Exp $
*/
#include "cmslocal.h"
@ -584,7 +584,7 @@ NSS_CMSSignerInfo_GetSigningTime(NSSCMSSignerInfo *sinfo, PRTime *stime)
/* XXXX multi-valued attributes NIH */
if (attr == NULL || (value = NSS_CMSAttribute_GetValue(attr)) == NULL)
return SECFailure;
if (CERT_DecodeTimeChoice(stime, value) != SECSuccess)
if (DER_DecodeTimeChoice(stime, value) != SECSuccess)
return SECFailure;
sinfo->signingTime = *stime; /* make cached copy */
return SECSuccess;
@ -721,7 +721,7 @@ NSS_CMSSignerInfo_AddSigningTime(NSSCMSSignerInfo *signerinfo, PRTime t)
mark = PORT_ArenaMark(poolp);
/* create new signing time attribute */
if (CERT_EncodeTimeChoice(NULL, &stime, t) != SECSuccess)
if (DER_EncodeTimeChoice(NULL, &stime, t) != SECSuccess)
goto loser;
if ((attr = NSS_CMSAttribute_Create(poolp, SEC_OID_PKCS9_SIGNING_TIME, &stime, PR_FALSE)) == NULL) {

Просмотреть файл

@ -38,7 +38,7 @@
/*
* Certificate handling code
*
* $Id: lowcert.c,v 1.16 2003-10-17 13:45:39 ian.mcgreer%sun.com Exp $
* $Id: lowcert.c,v 1.17 2004-01-07 23:07:24 jpierre%netscape.com Exp $
*/
#include "seccomon.h"
@ -288,13 +288,13 @@ nsslowcert_GetCertTimes(NSSLOWCERTCertificate *c, PRTime *notBefore, PRTime *not
}
/* convert DER not-before time */
rv = CERT_DecodeTimeChoice(notBefore, &validity.notBefore);
rv = DER_DecodeTimeChoice(notBefore, &validity.notBefore);
if (rv) {
return(SECFailure);
}
/* convert DER not-after time */
rv = CERT_DecodeTimeChoice(notAfter, &validity.notAfter);
rv = DER_DecodeTimeChoice(notAfter, &validity.notAfter);
if (rv) {
return(SECFailure);
}

Просмотреть файл

@ -38,7 +38,7 @@
* secder.h - public data structures and prototypes for the DER encoding and
* decoding utilities library
*
* $Id: secder.h,v 1.5 2003-12-22 23:33:39 wchang0222%aol.com Exp $
* $Id: secder.h,v 1.6 2004-01-07 23:07:24 jpierre%netscape.com Exp $
*/
#if defined(_WIN32_WCE)
@ -206,12 +206,12 @@ extern char *CERT_GenTime2FormattedAscii (int64 genTime, char *format);
** or a SEC_ASN1_UTC_TIME
*/
extern SECStatus CERT_DecodeTimeChoice(PRTime* output, const SECItem* input);
extern SECStatus DER_DecodeTimeChoice(PRTime* output, const SECItem* input);
/* encode a PRTime to an ASN.1 DER SECItem containing either a
SEC_ASN1_GENERALIZED_TIME or a SEC_ASN1_UTC_TIME */
extern SECStatus CERT_EncodeTimeChoice(PRArenaPool* arena, SECItem* output,
extern SECStatus DER_EncodeTimeChoice(PRArenaPool* arena, SECItem* output,
PRTime input);
SEC_END_PROTOS

Просмотреть файл

@ -122,9 +122,9 @@ CERT_CreateValidity(int64 notBefore, int64 notAfter)
v = (CERTValidity*) PORT_ArenaZAlloc(arena, sizeof(CERTValidity));
if (v) {
v->arena = arena;
rv = CERT_EncodeTimeChoice(arena, &v->notBefore, notBefore);
rv = DER_EncodeTimeChoice(arena, &v->notBefore, notBefore);
if (rv) goto loser;
rv = CERT_EncodeTimeChoice(arena, &v->notAfter, notAfter);
rv = DER_EncodeTimeChoice(arena, &v->notAfter, notAfter);
if (rv) goto loser;
}
return v;
@ -228,7 +228,7 @@ DecodeGeneralizedTime2FormattedAscii (SECItem *generalizedTimeDER, char *format
/* decode a SECItem containing either a SEC_ASN1_GENERALIZED_TIME
or a SEC_ASN1_UTC_TIME */
SECStatus CERT_DecodeTimeChoice(PRTime* output, const SECItem* input)
SECStatus DER_DecodeTimeChoice(PRTime* output, const SECItem* input)
{
switch (input->type) {
case siGeneralizedTime:
@ -247,7 +247,7 @@ SECStatus CERT_DecodeTimeChoice(PRTime* output, const SECItem* input)
/* encode a PRTime to an ASN.1 DER SECItem containing either a
SEC_ASN1_GENERALIZED_TIME or a SEC_ASN1_UTC_TIME */
SECStatus CERT_EncodeTimeChoice(PRArenaPool* arena, SECItem* output, PRTime input)
SECStatus DER_EncodeTimeChoice(PRArenaPool* arena, SECItem* output, PRTime input)
{
if (LL_CMP(input, >, January1st2050)) {
return DER_TimeToGeneralizedTimeArena(arena, output, input);