From 4ee58732598165408d964ea411d5e432f672738a Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Thu, 2 May 2013 19:32:59 -0700 Subject: [PATCH] Bug 802430: Allow NSS to be built with NO_NSPR_10_SUPPORT, r=wtc --- cmd/addbuiltin/addbuiltin.c | 2 +- cmd/bltest/blapitest.c | 52 +++---- cmd/certcgi/certcgi.c | 26 ++-- cmd/certutil/certext.c | 40 +++--- cmd/certutil/certutil.c | 8 +- cmd/certutil/keystuff.c | 2 +- cmd/checkcert/checkcert.c | 4 +- cmd/crlutil/crlgen.c | 28 ++-- cmd/crlutil/crlutil.c | 14 +- cmd/crmf-cgi/crmfcgi.c | 6 +- cmd/crmftest/testcrmf.c | 2 +- cmd/dbck/dbck.c | 10 +- cmd/dbck/dbrecover.c | 2 +- cmd/derdump/derdump.c | 2 +- cmd/ecperf/ecperf.c | 2 +- cmd/fipstest/fipstest.c | 16 +-- cmd/lib/berparse.c | 10 +- cmd/lib/pppolicy.c | 2 +- cmd/lib/secutil.c | 44 +++--- cmd/makepqg/makepqg.c | 2 +- cmd/ocspclnt/ocspclnt.c | 10 +- cmd/ocspresp/ocspresp.c | 6 +- cmd/pk12util/pk12util.c | 4 +- cmd/pk1sign/pk1sign.c | 2 +- cmd/selfserv/selfserv.c | 8 +- cmd/signver/pk7print.c | 10 +- cmd/vfychain/vfychain.c | 20 +-- coreconf/config.mk | 2 + lib/base/arena.c | 6 +- lib/certdb/alg1485.c | 14 +- lib/certdb/certdb.c | 28 ++-- lib/certdb/certi.h | 10 +- lib/certdb/certv3.c | 6 +- lib/certdb/certxutl.c | 10 +- lib/certdb/crl.c | 16 +-- lib/certdb/genname.c | 42 +++--- lib/certdb/genname.h | 14 +- lib/certdb/polcyxtn.c | 24 ++-- lib/certdb/secname.c | 26 ++-- lib/certdb/stanpcertdb.c | 6 +- lib/certdb/xauthkid.c | 4 +- lib/certdb/xbsconst.c | 8 +- lib/certdb/xconst.c | 18 +-- lib/certdb/xconst.h | 8 +- lib/certhigh/certhigh.c | 22 +-- lib/certhigh/certreq.c | 6 +- lib/certhigh/certvfy.c | 30 ++-- lib/certhigh/certvfypkix.c | 2 +- lib/certhigh/crlv2.c | 6 +- lib/certhigh/ocsp.c | 136 +++++++++--------- lib/certhigh/ocspi.h | 10 +- lib/certhigh/ocspti.h | 10 +- lib/crmf/asn1cmn.c | 6 +- lib/crmf/challcli.c | 6 +- lib/crmf/cmmfasn1.c | 4 +- lib/crmf/cmmfchal.c | 8 +- lib/crmf/cmmfi.h | 18 +-- lib/crmf/cmmfit.h | 8 +- lib/crmf/cmmfrec.c | 4 +- lib/crmf/cmmfresp.c | 10 +- lib/crmf/crmfcont.c | 18 +-- lib/crmf/crmfdec.c | 10 +- lib/crmf/crmfget.c | 14 +- lib/crmf/crmfi.h | 26 ++-- lib/crmf/crmfit.h | 6 +- lib/crmf/crmfpop.c | 20 +-- lib/crmf/crmfreq.c | 38 ++--- lib/crmf/respcli.c | 2 +- lib/crmf/respcmn.c | 14 +- lib/crmf/servget.c | 12 +- lib/cryptohi/seckey.c | 34 ++--- lib/cryptohi/secsign.c | 6 +- lib/cryptohi/secvfy.c | 2 +- lib/dbm/include/mcom_db.h | 8 ++ lib/freebl/blapi.h | 12 +- lib/freebl/dh.c | 4 +- lib/freebl/dsa.c | 2 +- lib/freebl/ec.c | 2 +- lib/freebl/loader.c | 12 +- lib/freebl/loader.h | 12 +- lib/freebl/md5.c | 2 +- lib/freebl/mpi/mpmontg.c | 6 +- lib/freebl/pqg.c | 34 ++--- lib/freebl/rsa.c | 14 +- lib/freebl/sha512.c | 8 +- lib/freebl/sha_fast.c | 2 +- lib/freebl/stubs.c | 8 +- lib/freebl/unix_rand.c | 6 +- lib/jar/jar.h | 2 +- lib/jar/jzlib.h | 72 +++++----- .../pkix_pl_nss/module/pkix_pl_aiamgr.c | 2 +- .../module/pkix_pl_ldapcertstore.c | 10 +- .../module/pkix_pl_ldapdefaultclient.c | 22 +-- .../module/pkix_pl_ldapdefaultclient.h | 2 +- .../pkix_pl_nss/module/pkix_pl_ldaprequest.c | 6 +- .../pkix_pl_nss/module/pkix_pl_ldaprequest.h | 4 +- .../pkix_pl_nss/module/pkix_pl_ldapresponse.c | 4 +- .../pkix_pl_nss/module/pkix_pl_ldapresponse.h | 2 +- .../pkix_pl_nss/module/pkix_pl_ldapt.h | 2 +- .../pkix_pl_nss/module/pkix_pl_nsscontext.c | 2 +- .../pkix_pl_nss/module/pkix_pl_nsscontext.h | 2 +- .../module/pkix_pl_pk11certstore.c | 2 +- lib/libpkix/pkix_pl_nss/pki/pkix_pl_crldp.c | 2 +- .../pkix_pl_nss/pki/pkix_pl_crlentry.c | 4 +- .../pkix_pl_nss/pki/pkix_pl_infoaccess.c | 10 +- .../pkix_pl_nss/pki/pkix_pl_infoaccess.h | 2 +- .../pkix_pl_nss/pki/pkix_pl_nameconstraints.c | 4 +- .../pkix_pl_nss/pki/pkix_pl_ocspcertid.c | 4 +- .../pkix_pl_nss/pki/pkix_pl_ocsprequest.c | 2 +- .../pkix_pl_nss/pki/pkix_pl_ocspresponse.h | 4 +- .../pkix_pl_nss/pki/pkix_pl_x500name.c | 8 +- .../pkix_pl_nss/pki/pkix_pl_x500name.h | 4 +- lib/nss/utilwrap.c | 50 +++---- lib/pk11wrap/pk11akey.c | 20 +-- lib/pk11wrap/pk11auth.c | 10 +- lib/pk11wrap/pk11mech.c | 4 +- lib/pk11wrap/pk11merge.c | 24 ++-- lib/pk11wrap/pk11nobj.c | 6 +- lib/pk11wrap/pk11obj.c | 6 +- lib/pk11wrap/pk11pars.c | 4 +- lib/pk11wrap/pk11pbe.c | 18 +-- lib/pk11wrap/pk11pk12.c | 8 +- lib/pk11wrap/pk11pqg.c | 8 +- lib/pk11wrap/pk11slot.c | 2 +- lib/pk11wrap/pk11util.c | 2 +- lib/pk11wrap/secmodi.h | 4 +- lib/pk11wrap/secmodti.h | 10 +- lib/pkcs12/p12creat.c | 8 +- lib/pkcs12/p12d.c | 12 +- lib/pkcs12/p12e.c | 16 +-- lib/pkcs12/p12exp.c | 14 +- lib/pkcs12/p12local.c | 8 +- lib/pkcs12/p12local.h | 10 +- lib/pkcs7/certread.c | 6 +- lib/pkcs7/p7common.c | 4 +- lib/pkcs7/p7create.c | 8 +- lib/pkcs7/p7decode.c | 8 +- lib/pkcs7/p7encode.c | 6 +- lib/pkcs7/p7local.c | 6 +- lib/pkcs7/p7local.h | 4 +- lib/pkcs7/secmime.c | 2 +- lib/pki/pki3hack.c | 6 +- lib/smime/cmsarray.c | 4 +- lib/smime/cmsattr.c | 4 +- lib/smime/cmscipher.c | 2 +- lib/smime/cmsdecode.c | 6 +- lib/smime/cmslocal.h | 10 +- lib/smime/cmsrecinfo.c | 2 +- lib/smime/cmssigdata.c | 2 +- lib/smime/cmssiginfo.c | 2 +- lib/smime/cmsudf.c | 2 +- lib/smime/cmsutil.c | 2 +- lib/smime/smimeutil.c | 2 +- lib/softoken/ecdecode.c | 8 +- lib/softoken/legacydb/lgcreate.c | 2 +- lib/softoken/legacydb/lowcert.c | 6 +- lib/softoken/legacydb/lowkey.c | 4 +- lib/softoken/legacydb/lowkeyi.h | 4 +- lib/softoken/legacydb/pcert.h | 2 +- lib/softoken/legacydb/pcertdb.c | 90 ++++++------ lib/softoken/legacydb/pcertt.h | 6 +- lib/softoken/lgglue.c | 2 +- lib/softoken/lgglue.h | 2 +- lib/softoken/lowpbe.c | 6 +- lib/softoken/lowpbe.h | 4 +- lib/softoken/padbuf.c | 2 +- lib/softoken/pkcs11c.c | 10 +- lib/softoken/sftkdb.c | 16 +-- lib/softoken/softoken.h | 6 +- lib/ssl/ssl3con.c | 24 ++-- lib/ssl/ssl3ecc.c | 4 +- lib/ssl/ssl3ext.c | 14 +- lib/ssl/ssl3prot.h | 30 ++-- lib/ssl/sslimpl.h | 18 +-- lib/ssl/sslinfo.c | 2 +- lib/ssl/sslsnce.c | 22 +-- lib/util/derenc.c | 2 +- lib/util/dersubr.c | 4 +- lib/util/dertime.c | 20 +-- lib/util/nssb64d.c | 2 +- lib/util/nssb64e.c | 2 +- lib/util/quickder.c | 20 +-- lib/util/secalgid.c | 4 +- lib/util/secasn1d.c | 18 +-- lib/util/secasn1e.c | 14 +- lib/util/secder.h | 2 +- lib/util/secdig.c | 8 +- lib/util/secitem.c | 8 +- lib/util/sectime.c | 8 +- lib/util/utilpars.c | 4 +- lib/util/utilpars.h | 2 +- 191 files changed, 1059 insertions(+), 1049 deletions(-) diff --git a/cmd/addbuiltin/addbuiltin.c b/cmd/addbuiltin/addbuiltin.c index 5fdee05e5d..2226a159c0 100644 --- a/cmd/addbuiltin/addbuiltin.c +++ b/cmd/addbuiltin/addbuiltin.c @@ -74,7 +74,7 @@ static SECStatus ConvertCRLEntry(SECItem *sdder, PRInt32 crlentry, char *nickname) { int rv; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; CERTSignedCrl *newCrl = NULL; CERTCrlEntry *entry; diff --git a/cmd/bltest/blapitest.c b/cmd/bltest/blapitest.c index a776c9eaeb..e3233810ac 100644 --- a/cmd/bltest/blapitest.c +++ b/cmd/bltest/blapitest.c @@ -25,7 +25,7 @@ #include "ecl-curve.h" SECStatus EC_DecodeParams(const SECItem *encodedParams, ECParams **ecparams); -SECStatus EC_CopyParams(PRArenaPool *arena, ECParams *dstParams, +SECStatus EC_CopyParams(PLArenaPool *arena, ECParams *dstParams, const ECParams *srcParams); #endif @@ -207,7 +207,7 @@ static void Usage() /* XXX argh */ struct item_with_arena { SECItem *item; - PRArenaPool *arena; + PLArenaPool *arena; }; static PRInt32 @@ -231,7 +231,7 @@ get_binary(void *arg, const unsigned char *ibuf, PRInt32 size) } static SECStatus -atob(SECItem *ascii, SECItem *binary, PRArenaPool *arena) +atob(SECItem *ascii, SECItem *binary, PLArenaPool *arena) { SECStatus status; NSSBase64Decoder *cx; @@ -335,7 +335,7 @@ serialize_key(SECItem *it, int ni, PRFileDesc *file) } void -key_from_filedata(PRArenaPool *arena, SECItem *it, int ns, int ni, SECItem *filedata) +key_from_filedata(PLArenaPool *arena, SECItem *it, int ns, int ni, SECItem *filedata) { int fpos = 0; int i, len; @@ -364,7 +364,7 @@ static RSAPrivateKey * rsakey_from_filedata(SECItem *filedata) { RSAPrivateKey *key; - PRArenaPool *arena; + PLArenaPool *arena; arena = PORT_NewArena(BLTEST_DEFAULT_CHUNKSIZE); key = (RSAPrivateKey *)PORT_ArenaZAlloc(arena, sizeof(RSAPrivateKey)); key->arena = arena; @@ -376,7 +376,7 @@ static PQGParams * pqg_from_filedata(SECItem *filedata) { PQGParams *pqg; - PRArenaPool *arena; + PLArenaPool *arena; arena = PORT_NewArena(BLTEST_DEFAULT_CHUNKSIZE); pqg = (PQGParams *)PORT_ArenaZAlloc(arena, sizeof(PQGParams)); pqg->arena = arena; @@ -388,7 +388,7 @@ static DSAPrivateKey * dsakey_from_filedata(SECItem *filedata) { DSAPrivateKey *key; - PRArenaPool *arena; + PLArenaPool *arena; arena = PORT_NewArena(BLTEST_DEFAULT_CHUNKSIZE); key = (DSAPrivateKey *)PORT_ArenaZAlloc(arena, sizeof(DSAPrivateKey)); key->params.arena = arena; @@ -401,7 +401,7 @@ static ECPrivateKey * eckey_from_filedata(SECItem *filedata) { ECPrivateKey *key; - PRArenaPool *arena; + PLArenaPool *arena; SECStatus rv; ECParams *tmpECParams = NULL; arena = PORT_NewArena(BLTEST_DEFAULT_CHUNKSIZE); @@ -627,7 +627,7 @@ typedef SECStatus (* bltestPubKeyCipherFn)(void *key, typedef SECStatus (* bltestHashCipherFn)(unsigned char *dest, const unsigned char *src, - uint32 src_length); + PRUint32 src_length); typedef enum { bltestINVALID = -1, @@ -776,7 +776,7 @@ typedef union typedef struct bltestCipherInfoStr bltestCipherInfo; struct bltestCipherInfoStr { - PRArenaPool *arena; + PLArenaPool *arena; /* link to next in multithreaded test */ bltestCipherInfo *next; PRThread *cipherThread; @@ -887,7 +887,7 @@ cipher_requires_IV(bltestCipherMode mode) SECStatus finishIO(bltestIO *output, PRFileDesc *file); SECStatus -setupIO(PRArenaPool *arena, bltestIO *input, PRFileDesc *file, +setupIO(PLArenaPool *arena, bltestIO *input, PRFileDesc *file, char *str, int numBytes) { SECStatus rv = SECSuccess; @@ -1016,7 +1016,7 @@ finishIO(bltestIO *output, PRFileDesc *file) } void -bltestCopyIO(PRArenaPool *arena, bltestIO *dest, bltestIO *src) +bltestCopyIO(PLArenaPool *arena, bltestIO *dest, bltestIO *src) { SECITEM_CopyItem(arena, &dest->buf, &src->buf); if (src->pBuf.len > 0) { @@ -1028,7 +1028,7 @@ bltestCopyIO(PRArenaPool *arena, bltestIO *dest, bltestIO *src) } void -misalignBuffer(PRArenaPool *arena, bltestIO *io, int off) +misalignBuffer(PLArenaPool *arena, bltestIO *io, int off) { ptrdiff_t offset = (ptrdiff_t)io->buf.data % WORDSIZE; int length = io->buf.len; @@ -1681,7 +1681,7 @@ bltest_ecdsa_init(bltestCipherInfo *cipherInfo, PRBool encrypt) /* XXX unfortunately, this is not defined in blapi.h */ SECStatus -md2_HashBuf(unsigned char *dest, const unsigned char *src, uint32 src_length) +md2_HashBuf(unsigned char *dest, const unsigned char *src, PRUint32 src_length) { unsigned int len; MD2Context *cx = MD2_NewContext(); @@ -1694,7 +1694,7 @@ md2_HashBuf(unsigned char *dest, const unsigned char *src, uint32 src_length) } SECStatus -md2_restart(unsigned char *dest, const unsigned char *src, uint32 src_length) +md2_restart(unsigned char *dest, const unsigned char *src, PRUint32 src_length) { MD2Context *cx, *cx_cpy; unsigned char *cxbytes; @@ -1732,7 +1732,7 @@ md2_restart(unsigned char *dest, const unsigned char *src, uint32 src_length) } SECStatus -md5_restart(unsigned char *dest, const unsigned char *src, uint32 src_length) +md5_restart(unsigned char *dest, const unsigned char *src, PRUint32 src_length) { SECStatus rv = SECSuccess; MD5Context *cx, *cx_cpy; @@ -1771,7 +1771,7 @@ md5_restart(unsigned char *dest, const unsigned char *src, uint32 src_length) } SECStatus -sha1_restart(unsigned char *dest, const unsigned char *src, uint32 src_length) +sha1_restart(unsigned char *dest, const unsigned char *src, PRUint32 src_length) { SECStatus rv = SECSuccess; SHA1Context *cx, *cx_cpy; @@ -1810,7 +1810,7 @@ sha1_restart(unsigned char *dest, const unsigned char *src, uint32 src_length) } SECStatus -SHA224_restart(unsigned char *dest, const unsigned char *src, uint32 src_length) +SHA224_restart(unsigned char *dest, const unsigned char *src, PRUint32 src_length) { SECStatus rv = SECSuccess; SHA224Context *cx, *cx_cpy; @@ -1850,7 +1850,7 @@ SHA224_restart(unsigned char *dest, const unsigned char *src, uint32 src_length) } SECStatus -SHA256_restart(unsigned char *dest, const unsigned char *src, uint32 src_length) +SHA256_restart(unsigned char *dest, const unsigned char *src, PRUint32 src_length) { SECStatus rv = SECSuccess; SHA256Context *cx, *cx_cpy; @@ -1889,7 +1889,7 @@ SHA256_restart(unsigned char *dest, const unsigned char *src, uint32 src_length) } SECStatus -SHA384_restart(unsigned char *dest, const unsigned char *src, uint32 src_length) +SHA384_restart(unsigned char *dest, const unsigned char *src, PRUint32 src_length) { SECStatus rv = SECSuccess; SHA384Context *cx, *cx_cpy; @@ -1928,7 +1928,7 @@ SHA384_restart(unsigned char *dest, const unsigned char *src, uint32 src_length) } SECStatus -SHA512_restart(unsigned char *dest, const unsigned char *src, uint32 src_length) +SHA512_restart(unsigned char *dest, const unsigned char *src, PRUint32 src_length) { SECStatus rv = SECSuccess; SHA512Context *cx, *cx_cpy; @@ -2868,7 +2868,7 @@ get_mode(const char *modestring) } void -load_file_data(PRArenaPool *arena, bltestIO *data, +load_file_data(PLArenaPool *arena, bltestIO *data, char *fn, bltestIOMode ioMode) { PRFileDesc *file; @@ -2882,7 +2882,7 @@ load_file_data(PRArenaPool *arena, bltestIO *data, } void -get_params(PRArenaPool *arena, bltestParams *params, +get_params(PLArenaPool *arena, bltestParams *params, bltestCipherMode mode, int j) { char filename[256]; @@ -3052,7 +3052,7 @@ blapi_selftest(bltestCipherMode *modes, int numModes, int inoff, int outoff, char *modestr; char filename[256]; PRFileDesc *file; - PRArenaPool *arena; + PLArenaPool *arena; SECItem item; PRBool finished; SECStatus rv = SECSuccess, srv; @@ -3229,7 +3229,7 @@ SECStatus dump_file(bltestCipherMode mode, char *filename) { bltestIO keydata; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; arena = PORT_NewArena(BLTEST_DEFAULT_CHUNKSIZE); if (mode == bltestRSA) { RSAPrivateKey *key; @@ -3842,7 +3842,7 @@ int main(int argc, char **argv) PRFileDesc *file = NULL, *infile; bltestParams *params; char *instr = NULL; - PRArenaPool *arena; + PLArenaPool *arena; if (curThrdNum > 0) { bltestCipherInfo *newCInfo = PORT_ZNew(bltestCipherInfo); diff --git a/cmd/certcgi/certcgi.c b/cmd/certcgi/certcgi.c index c0142d57d2..c4b5c80e74 100644 --- a/cmd/certcgi/certcgi.c +++ b/cmd/certcgi/certcgi.c @@ -643,11 +643,11 @@ get_serial_number(Pair *data) typedef SECStatus (* EXTEN_VALUE_ENCODER) - (PRArenaPool *extHandle, void *value, SECItem *encodedValue); + (PLArenaPool *extHandle, void *value, SECItem *encodedValue); static SECStatus EncodeAndAddExtensionValue( - PRArenaPool *arena, + PLArenaPool *arena, void *extHandle, void *value, PRBool criticality, @@ -713,10 +713,10 @@ static CERTOidSequence * CreateOidSequence(void) { CERTOidSequence *rv = (CERTOidSequence *)NULL; - PRArenaPool *arena = (PRArenaPool *)NULL; + PLArenaPool *arena = (PLArenaPool *)NULL; arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); - if( (PRArenaPool *)NULL == arena ) { + if( (PLArenaPool *)NULL == arena ) { goto loser; } @@ -734,7 +734,7 @@ CreateOidSequence(void) return rv; loser: - if( (PRArenaPool *)NULL != arena ) { + if( (PLArenaPool *)NULL != arena ) { PORT_FreeArena(arena, PR_FALSE); } @@ -941,7 +941,7 @@ AddAuthKeyID (void *extHandle, CERTCertDBHandle *handle) { CERTAuthKeyID *authKeyID = NULL; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; SECStatus rv = SECSuccess; CERTCertificate *issuerCert = NULL; CERTGeneralName *genNames; @@ -1013,7 +1013,7 @@ AddPrivKeyUsagePeriod(void *extHandle, { char *notBeforeStr; char *notAfterStr; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; SECStatus rv = SECSuccess; CERTPrivKeyUsagePeriod *pkup; @@ -1471,7 +1471,7 @@ string_to_binary(char *string) static SECStatus MakeGeneralName(char *name, CERTGeneralName *genName, - PRArenaPool *arena) + PLArenaPool *arena) { SECItem *oid; SECOidData *oidData; @@ -1611,7 +1611,7 @@ MakeGeneralName(char *name, static CERTGeneralName * MakeAltName(Pair *data, char *which, - PRArenaPool *arena) + PLArenaPool *arena) { CERTGeneralName *SubAltName; CERTGeneralName *current; @@ -1672,7 +1672,7 @@ MakeAltName(Pair *data, static CERTNameConstraints * MakeNameConstraints(Pair *data, - PRArenaPool *arena) + PLArenaPool *arena) { CERTNameConstraints *NameConstraints; CERTNameConstraint *current = NULL; @@ -1794,7 +1794,7 @@ AddAltName(void *extHandle, int type) { PRBool autoIssuer = PR_FALSE; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; CERTGeneralName *genName = NULL; char *which = NULL; char *name = NULL; @@ -1864,7 +1864,7 @@ static SECStatus AddNameConstraints(void *extHandle, Pair *data) { - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; CERTNameConstraints *constraints = NULL; SECStatus rv = SECSuccess; @@ -2111,7 +2111,7 @@ SignCert(CERTCertificate *cert, SECItem der; SECKEYPrivateKey *caPrivateKey = NULL; SECStatus rv; - PRArenaPool *arena; + PLArenaPool *arena; SECOidTag algID; if (which_key == 0) { diff --git a/cmd/certutil/certext.c b/cmd/certutil/certext.c index 026deda7e7..ea423706fe 100644 --- a/cmd/certutil/certext.c +++ b/cmd/certutil/certext.c @@ -78,7 +78,7 @@ PrintChoicesAndGetAnswer(char* str, char* rBuff, int rSize) } static CERTGeneralName * -GetGeneralName(PRArenaPool *arena, CERTGeneralName *useExistingName, PRBool onlyOne) +GetGeneralName(PLArenaPool *arena, CERTGeneralName *useExistingName, PRBool onlyOne) { CERTGeneralName *namesList = NULL; CERTGeneralName *current; @@ -214,13 +214,13 @@ GetGeneralName(PRArenaPool *arena, CERTGeneralName *useExistingName, PRBool only } static CERTGeneralName * -CreateGeneralName(PRArenaPool *arena) +CreateGeneralName(PLArenaPool *arena) { return GetGeneralName(arena, NULL, PR_FALSE); } static SECStatus -GetString(PRArenaPool *arena, char *prompt, SECItem *value) +GetString(PLArenaPool *arena, char *prompt, SECItem *value) { char buffer[251]; char *buffPrt; @@ -378,10 +378,10 @@ static CERTOidSequence * CreateOidSequence(void) { CERTOidSequence *rv = (CERTOidSequence *)NULL; - PRArenaPool *arena = (PRArenaPool *)NULL; + PLArenaPool *arena = (PLArenaPool *)NULL; arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); - if( (PRArenaPool *)NULL == arena ) { + if( (PLArenaPool *)NULL == arena ) { goto loser; } @@ -399,7 +399,7 @@ CreateOidSequence(void) return rv; loser: - if( (PRArenaPool *)NULL != arena ) { + if( (PLArenaPool *)NULL != arena ) { PORT_FreeArena(arena, PR_FALSE); } @@ -666,7 +666,7 @@ AddNscpCertType (void *extHandle, const char *userSuppliedValue) } static SECStatus -AddSubjectAltNames(PRArenaPool *arena, CERTGeneralName **existingListp, +AddSubjectAltNames(PLArenaPool *arena, CERTGeneralName **existingListp, const char *names, CERTGeneralNameType type) { CERTGeneralName *nameList = NULL; @@ -735,7 +735,7 @@ AddSubjectAltNames(PRArenaPool *arena, CERTGeneralName **existingListp, } static SECStatus -AddEmailSubjectAlt(PRArenaPool *arena, CERTGeneralName **existingListp, +AddEmailSubjectAlt(PLArenaPool *arena, CERTGeneralName **existingListp, const char *emailAddrs) { return AddSubjectAltNames(arena, existingListp, emailAddrs, @@ -743,7 +743,7 @@ AddEmailSubjectAlt(PRArenaPool *arena, CERTGeneralName **existingListp, } static SECStatus -AddDNSSubjectAlt(PRArenaPool *arena, CERTGeneralName **existingListp, +AddDNSSubjectAlt(PLArenaPool *arena, CERTGeneralName **existingListp, const char *dnsNames) { return AddSubjectAltNames(arena, existingListp, dnsNames, certDNSName); @@ -784,7 +784,7 @@ AddBasicConstraint(void *extHandle) static SECStatus AddNameConstraints(void *extHandle) { - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; CERTNameConstraints *constraints = NULL; CERTNameConstraint *current = NULL; @@ -879,7 +879,7 @@ static SECStatus AddAuthKeyID (void *extHandle) { CERTAuthKeyID *authKeyID = NULL; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; SECStatus rv = SECSuccess; PRBool yesNoAns; @@ -932,7 +932,7 @@ static SECStatus AddSubjKeyID (void *extHandle) { SECItem keyID; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; SECStatus rv = SECSuccess; PRBool yesNoAns; @@ -968,7 +968,7 @@ AddSubjKeyID (void *extHandle) static SECStatus AddCrlDistPoint(void *extHandle) { - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; CERTCrlDistributionPoints *crlDistPoints = NULL; CRLDistributionPoint *current; SECStatus rv = SECSuccess; @@ -1109,7 +1109,7 @@ static SECStatus AddPolicyConstraints(void *extHandle) { CERTCertificatePolicyConstraints *policyConstr; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; SECStatus rv = SECSuccess; SECItem *item, *dummy; char buffer[512]; @@ -1193,7 +1193,7 @@ static SECStatus AddInhibitAnyPolicy(void *extHandle) { CERTCertificateInhibitAny certInhibitAny; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; SECStatus rv = SECSuccess; SECItem *item, *dummy; char buffer[10]; @@ -1242,7 +1242,7 @@ AddPolicyMappings(void *extHandle) { CERTPolicyMap **policyMapArr = NULL; CERTPolicyMap *current; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; SECStatus rv = SECSuccess; int count = 0; char buffer[512]; @@ -1334,7 +1334,7 @@ enum PoliciQualifierEnum { static CERTPolicyQualifier ** -RequestPolicyQualifiers(PRArenaPool *arena, SECItem *policyID) +RequestPolicyQualifiers(PLArenaPool *arena, SECItem *policyID) { CERTPolicyQualifier **policyQualifArr = NULL; CERTPolicyQualifier *current; @@ -1529,7 +1529,7 @@ AddCertPolicies(void *extHandle) { CERTPolicyInfo **certPoliciesArr = NULL; CERTPolicyInfo *current; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; SECStatus rv = SECSuccess; int count = 0; char buffer[512]; @@ -1626,7 +1626,7 @@ AddInfoAccess(void *extHandle, PRBool addSIAExt, PRBool isCACert) { CERTAuthInfoAccess **infoAccArr = NULL; CERTAuthInfoAccess *current; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; SECStatus rv = SECSuccess; int count = 0; char buffer[512]; @@ -1865,7 +1865,7 @@ AddExtensions(void *extHandle, const char *emailAddrs, const char *dnsNames, } if (emailAddrs || dnsNames) { - PRArenaPool *arena; + PLArenaPool *arena; CERTGeneralName *namelist = NULL; SECItem item = { 0, NULL, 0 }; diff --git a/cmd/certutil/certutil.c b/cmd/certutil/certutil.c index 05ca7eb82c..8ed6665e93 100644 --- a/cmd/certutil/certutil.c +++ b/cmd/certutil/certutil.c @@ -51,7 +51,7 @@ GetCertRequest(const SECItem *reqDER) { CERTCertificateRequest *certReq = NULL; CERTSignedData signedData; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; SECStatus rv; do { @@ -190,7 +190,7 @@ CertReq(SECKEYPrivateKey *privk, SECKEYPublicKey *pubk, KeyType keyType, SECItem *encoding; SECOidTag signAlgTag; SECStatus rv; - PRArenaPool *arena; + PLArenaPool *arena; void *extHandle; SECItem signedReq = { siBuffer, NULL, 0 }; @@ -601,7 +601,7 @@ ValidateCert(CERTCertDBHandle *handle, char *name, char *date, { SECStatus rv; CERTCertificate *cert = NULL; - int64 timeBoundary; + PRTime timeBoundary; SECCertificateUsage usage; CERTVerifyLog reallog; CERTVerifyLog *log = NULL; @@ -1720,7 +1720,7 @@ SignCert(CERTCertDBHandle *handle, CERTCertificate *cert, PRBool selfsign, SECItem der; SECKEYPrivateKey *caPrivateKey = NULL; SECStatus rv; - PRArenaPool *arena; + PLArenaPool *arena; SECOidTag algID; void *dummy; diff --git a/cmd/certutil/keystuff.c b/cmd/certutil/keystuff.c index 3004dc2ea7..2c403dfc70 100644 --- a/cmd/certutil/keystuff.c +++ b/cmd/certutil/keystuff.c @@ -205,7 +205,7 @@ decode_pqg_params(const char *str) { char *buf; unsigned int len; - PRArenaPool *arena; + PLArenaPool *arena; SECKEYPQGParams *params; SECStatus status; diff --git a/cmd/checkcert/checkcert.c b/cmd/checkcert/checkcert.c index 22db80f808..0cdd2cc282 100644 --- a/cmd/checkcert/checkcert.c +++ b/cmd/checkcert/checkcert.c @@ -201,7 +201,7 @@ OurVerifySignedData(CERTSignedData *sd, CERTCertificate *cert) static CERTCertificate *createEmptyCertificate(void) { - PRArenaPool *arena = 0; + PLArenaPool *arena = 0; CERTCertificate *c = 0; arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); @@ -232,7 +232,7 @@ int main(int argc, char **argv) char *progName=0; PRFileDesc *inFile=0, *issuerCertFile=0; SECItem derCert, derIssuerCert; - PRArenaPool *arena=0; + PLArenaPool *arena=0; CERTSignedData *signedData=0; CERTCertificate *cert=0, *issuerCert=0; SECKEYPublicKey *rsapubkey=0; diff --git a/cmd/crlutil/crlgen.c b/cmd/crlutil/crlgen.c index 81d791ac9d..12fcda796b 100644 --- a/cmd/crlutil/crlgen.c +++ b/cmd/crlutil/crlgen.c @@ -148,7 +148,7 @@ crlgen_CommitEntryData(PLHashEntry *he, PRIntn i, void *arg) /* Copy char * datainto allocated in arena SECItem */ static SECStatus -crlgen_SetString(PRArenaPool *arena, const char *dataIn, SECItem *value) +crlgen_SetString(PLArenaPool *arena, const char *dataIn, SECItem *value) { SECItem item; @@ -166,7 +166,7 @@ crlgen_SetString(PRArenaPool *arena, const char *dataIn, SECItem *value) /* Creates CERTGeneralName from parsed data for the Authority Key Extension */ static CERTGeneralName * -crlgen_GetGeneralName (PRArenaPool *arena, CRLGENGeneratorData *crlGenData, +crlgen_GetGeneralName (PLArenaPool *arena, CRLGENGeneratorData *crlGenData, const char *data) { CERTGeneralName *namesList = NULL; @@ -314,7 +314,7 @@ crlgen_GetGeneralName (PRArenaPool *arena, CRLGENGeneratorData *crlGenData, /* Creates CERTGeneralName from parsed data for the Authority Key Extension */ static CERTGeneralName * -crlgen_DistinguishedName (PRArenaPool *arena, CRLGENGeneratorData *crlGenData, +crlgen_DistinguishedName (PLArenaPool *arena, CRLGENGeneratorData *crlGenData, const char *data) { CERTName *directoryName = NULL; @@ -365,7 +365,7 @@ crlgen_AddAuthKeyID (CRLGENGeneratorData *crlGenData, { void *extHandle = NULL; CERTAuthKeyID *authKeyID = NULL; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; SECStatus rv = SECSuccess; PORT_Assert(dataArr && crlGenData); @@ -429,7 +429,7 @@ crlgen_AddIssuerAltNames(CRLGENGeneratorData *crlGenData, const char **dataArr) { CERTGeneralName *nameList = NULL; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; void *extHandle = NULL; SECStatus rv = SECSuccess; @@ -489,7 +489,7 @@ crlgen_AddIssuerAltNames(CRLGENGeneratorData *crlGenData, static SECStatus crlgen_AddCrlNumber(CRLGENGeneratorData *crlGenData, const char **dataArr) { - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; SECItem encodedItem; void *extHandle = crlGenData->crlExtHandle; void *dummy; @@ -540,7 +540,7 @@ crlgen_AddCrlNumber(CRLGENGeneratorData *crlGenData, const char **dataArr) /* Creates Cert Revocation Reason code extension. Encodes it and * returns as SECItem structure */ static SECItem* -crlgen_CreateReasonCode(PRArenaPool *arena, const char **dataArr, +crlgen_CreateReasonCode(PLArenaPool *arena, const char **dataArr, int *extCode) { SECItem *encodedItem; @@ -590,7 +590,7 @@ crlgen_CreateReasonCode(PRArenaPool *arena, const char **dataArr, /* Creates Cert Invalidity Date extension. Encodes it and * returns as SECItem structure */ static SECItem* -crlgen_CreateInvalidityDate(PRArenaPool *arena, const char **dataArr, +crlgen_CreateInvalidityDate(PLArenaPool *arena, const char **dataArr, int *extCode) { SECItem *encodedItem; @@ -634,7 +634,7 @@ crlgen_CreateInvalidityDate(PRArenaPool *arena, const char **dataArr, static SECStatus crlgen_AddEntryExtension(CRLGENGeneratorData *crlGenData, const char **dataArr, char *extName, - SECItem* (*extCreator)(PRArenaPool *arena, + SECItem* (*extCreator)(PLArenaPool *arena, const char **dataArr, int *extCode)) { @@ -643,7 +643,7 @@ crlgen_AddEntryExtension(CRLGENGeneratorData *crlGenData, int extCode = 0; PRUint64 lastRange ; SECItem *ext = NULL; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; PORT_Assert(crlGenData && dataArr); @@ -719,7 +719,7 @@ CRLGEN_CommitExtensionsAndEntries(CRLGENGeneratorData *crlGenData) { int size = 0; CERTCrl *crl; - PRArenaPool *arena; + PLArenaPool *arena; SECStatus rv = SECSuccess; void *mark; @@ -898,7 +898,7 @@ crlgen_SetTimeField(CRLGENGeneratorData *crlGenData, char *value, PRBool setThisUpdate) { CERTSignedCrl *signCrl; - PRArenaPool *arena; + PLArenaPool *arena; CERTCrl *crl; int length = 0; SECItem *timeDest = NULL; @@ -987,7 +987,7 @@ crlgen_AddCert(CRLGENGeneratorData *crlGenData, { CERTSignedCrl *signCrl; SECItem *certIdItem; - PRArenaPool *arena; + PLArenaPool *arena; PRUint64 rangeFrom = 0, rangeTo = 0, i = 0; int timeValLength = -1; SECStatus rv = SECFailure; @@ -1079,7 +1079,7 @@ static SECStatus crlgen_RmCert(CRLGENGeneratorData *crlGenData, char *certId) { PRUint64 i = 0; - PRArenaPool *arena; + PLArenaPool *arena; PORT_Assert(crlGenData && certId); if (!crlGenData || !certId) { diff --git a/cmd/crlutil/crlutil.c b/cmd/crlutil/crlutil.c index ed5e2d00da..301746b5d1 100644 --- a/cmd/crlutil/crlutil.c +++ b/cmd/crlutil/crlutil.c @@ -38,7 +38,7 @@ static CERTSignedCrl *FindCRL cert = CERT_FindCertByNicknameOrEmailAddr(certHandle, name); if (!cert) { CERTName *certName = NULL; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; certName = CERT_AsciiToName(name); if (certName) { @@ -93,7 +93,7 @@ static void ListCRLNames (CERTCertDBHandle *certHandle, int crlType, PRBool dele CERTCrlHeadNode *crlList = NULL; CERTCrlNode *crlNode = NULL; CERTName *name = NULL; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; SECStatus rv; do { @@ -284,7 +284,7 @@ SECStatus ImportCRL (CERTCertDBHandle *certHandle, char *url, int type, SECStatus DumpCRL(PRFileDesc *inFile) { int rv; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; CERTSignedCrl *newCrl = NULL; SECItem crlDER; @@ -362,7 +362,7 @@ FindSigningCert(CERTCertDBHandle *certHandle, CERTSignedCrl *signCrl, } static CERTSignedCrl* -CreateModifiedCRLCopy(PRArenaPool *arena, CERTCertDBHandle *certHandle, +CreateModifiedCRLCopy(PLArenaPool *arena, CERTCertDBHandle *certHandle, CERTCertificate **cert, char *certNickName, PRFileDesc *inFile, PRInt32 decodeOptions, PRInt32 importOptions) @@ -370,7 +370,7 @@ CreateModifiedCRLCopy(PRArenaPool *arena, CERTCertDBHandle *certHandle, SECItem crlDER = {0, NULL, 0}; CERTSignedCrl *signCrl = NULL; CERTSignedCrl *modCrl = NULL; - PRArenaPool *modArena = NULL; + PLArenaPool *modArena = NULL; SECStatus rv = SECSuccess; if (!arena || !certHandle || !certNickName) { @@ -464,7 +464,7 @@ CreateModifiedCRLCopy(PRArenaPool *arena, CERTCertDBHandle *certHandle, static CERTSignedCrl* -CreateNewCrl(PRArenaPool *arena, CERTCertDBHandle *certHandle, +CreateNewCrl(PLArenaPool *arena, CERTCertDBHandle *certHandle, CERTCertificate *cert) { CERTSignedCrl *signCrl = NULL; @@ -673,7 +673,7 @@ GenerateCRL (CERTCertDBHandle *certHandle, char *certNickName, { CERTCertificate *cert = NULL; CERTSignedCrl *signCrl = NULL; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; SECStatus rv; SECOidTag hashAlgTag = SEC_OID_UNKNOWN; diff --git a/cmd/crmf-cgi/crmfcgi.c b/cmd/crmf-cgi/crmfcgi.c index 955f5201ca..fb7e9339ec 100644 --- a/cmd/crmf-cgi/crmfcgi.c +++ b/cmd/crmf-cgi/crmfcgi.c @@ -280,7 +280,7 @@ ErrorCode initOldCertReq(CERTCertificateRequest *oldCertReq, CERTName *subject, CERTSubjectPublicKeyInfo *spki) { - PRArenaPool *poolp; + PLArenaPool *poolp; poolp = oldCertReq->arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); SEC_ASN1EncodeInteger(poolp, &oldCertReq->version, @@ -494,7 +494,7 @@ createCMMFResponse(CertResponseInfo *issuedCerts, int numCerts, CERTCertList *caList; int i; SECStatus srv; - PRArenaPool *poolp; + PLArenaPool *poolp; SECItem *der; certRepContent = CMMF_CreateCertRepContent(); @@ -783,7 +783,7 @@ issueChallenge(CertResponseInfo *issuedCerts, int numCerts, CMMFPOPODecKeyChallContent *chalContent = NULL; int i; SECStatus srv; - PRArenaPool *poolp; + PLArenaPool *poolp; CERTGeneralName *genName; SECItem *challDER = NULL; char *chall64, *certRepContentDER; diff --git a/cmd/crmftest/testcrmf.c b/cmd/crmftest/testcrmf.c index 47b2e4c1bd..ce3d7cfb9a 100644 --- a/cmd/crmftest/testcrmf.c +++ b/cmd/crmftest/testcrmf.c @@ -1194,7 +1194,7 @@ DoChallengeResponse(SECKEYPrivateKey *privKey, CMMFPOPODecKeyRespContent *respContent = NULL; CERTCertificate *myCert = NULL; CERTGeneralName *myGenName = NULL; - PRArenaPool *poolp = NULL; + PLArenaPool *poolp = NULL; PRFileDesc *fileDesc; SECItem *publicValue; SECItem *keyID; diff --git a/cmd/dbck/dbck.c b/cmd/dbck/dbck.c index 3b2cd3663a..31e1150bfc 100644 --- a/cmd/dbck/dbck.c +++ b/cmd/dbck/dbck.c @@ -100,7 +100,7 @@ typedef struct certDBEntryListNodeStr certDBEntryListNode; */ typedef struct { - PRArenaPool *arena; + PLArenaPool *arena; int index; certDBEntryListNode *pSubject; } certDBEntryMap; @@ -113,7 +113,7 @@ typedef struct */ typedef struct { - PRArenaPool *arena; + PLArenaPool *arena; int index; int numCerts; certDBEntryListNode **pCerts; @@ -256,7 +256,7 @@ dumpCertificate(CERTCertificate *cert, int num, PRFileDesc *outfile) PR_fprintf(outfile, "## SERIAL NUMBER: "); printHexString(outfile, &cert->serialNumber); { /* XXX should be separate function. */ - int64 timeBefore, timeAfter; + PRTime timeBefore, timeAfter; PRExplodedTime beforePrintable, afterPrintable; char *beforestr, *afterstr; DER_DecodeTimeChoice(&timeBefore, &cert->validity.notBefore); @@ -360,7 +360,7 @@ mapCertEntries(certDBArray *dbArray) certDBEntryListNode *certNode, *subjNode; certDBSubjectEntryMap *smap; certDBEntryMap *map; - PRArenaPool *tmparena; + PLArenaPool *tmparena; SECItem derSubject; SECItem certKey; PRCList *cElem, *sElem; @@ -924,7 +924,7 @@ fillDBEntryArray(NSSLOWCERTCertDBHandle *handle, certDBEntryType type, certDBEntryListNode *node; certDBEntryMap *mnode; certDBSubjectEntryMap *smnode; - PRArenaPool *arena; + PLArenaPool *arena; int count = 0; /* Initialize a dummy entry in the list. The list head will be the diff --git a/cmd/dbck/dbrecover.c b/cmd/dbck/dbrecover.c index 0d1f0cc624..372c73b3ff 100644 --- a/cmd/dbck/dbrecover.c +++ b/cmd/dbck/dbrecover.c @@ -174,7 +174,7 @@ userSaysDeleteCert(CERTCertificate **certs, int nCerts, int errtype, dbRestoreInfo *info, int *certNums) { char response[32]; - int32 nb; + PRInt32 nb; int i; /* User wants to remove cert without prompting. */ if (info->promptUser[errtype] == PR_FALSE) diff --git a/cmd/derdump/derdump.c b/cmd/derdump/derdump.c index 93e02a4a1d..49d415c1ce 100644 --- a/cmd/derdump/derdump.c +++ b/cmd/derdump/derdump.c @@ -34,7 +34,7 @@ int main(int argc, char **argv) PRFileDesc *inFile; SECItem der; SECStatus rv; - int16 xp_error; + PRInt16 xp_error; PRBool raw = PR_FALSE; PLOptState *optstate; PLOptStatus status; diff --git a/cmd/ecperf/ecperf.c b/cmd/ecperf/ecperf.c index 8867d3fbc9..513d4ee002 100644 --- a/cmd/ecperf/ecperf.c +++ b/cmd/ecperf/ecperf.c @@ -304,7 +304,7 @@ M_TimeOperation(void (*threadFunc)(void *), * in the hexadecimal string must be optional. */ static SECItem * -hexString2SECItem(PRArenaPool *arena, SECItem *item, const char *str) +hexString2SECItem(PLArenaPool *arena, SECItem *item, const char *str) { int i = 0; int byteval = 0; diff --git a/cmd/fipstest/fipstest.c b/cmd/fipstest/fipstest.c index b3e7f56e49..13b694f513 100644 --- a/cmd/fipstest/fipstest.c +++ b/cmd/fipstest/fipstest.c @@ -26,7 +26,7 @@ extern SECStatus EC_DecodeParams(const SECItem *encodedParams, ECParams **ecparams); extern SECStatus -EC_CopyParams(PRArenaPool *arena, ECParams *dstParams, +EC_CopyParams(PLArenaPool *arena, ECParams *dstParams, const ECParams *srcParams); #endif @@ -3311,19 +3311,19 @@ sha_get_hashType(int hashbits) switch (hashbits) { case 1: - case (SHA1_LENGTH*BITS_PER_BYTE): + case (SHA1_LENGTH*PR_BITS_PER_BYTE): hashType = HASH_AlgSHA1; break; - case (SHA224_LENGTH*BITS_PER_BYTE): + case (SHA224_LENGTH*PR_BITS_PER_BYTE): hashType = HASH_AlgSHA224; break; - case (SHA256_LENGTH*BITS_PER_BYTE): + case (SHA256_LENGTH*PR_BITS_PER_BYTE): hashType = HASH_AlgSHA256; break; - case (SHA384_LENGTH*BITS_PER_BYTE): + case (SHA384_LENGTH*PR_BITS_PER_BYTE): hashType = HASH_AlgSHA384; break; - case (SHA512_LENGTH*BITS_PER_BYTE): + case (SHA512_LENGTH*PR_BITS_PER_BYTE): hashType = HASH_AlgSHA512; break; default: @@ -3342,7 +3342,7 @@ sha_get_hashType(int hashbits) */ SECStatus sha_calcMD(unsigned char *MD, unsigned int MDLen, unsigned char *msg, unsigned int msgLen) { - HASH_HashType hashType = sha_get_hashType(MDLen*BITS_PER_BYTE); + HASH_HashType hashType = sha_get_hashType(MDLen*PR_BITS_PER_BYTE); return fips_hashBuf(hashType, MD, msg, msgLen); } @@ -3661,7 +3661,7 @@ void hmac_test(char *reqfn) } /* HMACLen will get reused for Tlen */ HMACLen = atoi(&buf[i]); - hash_alg = sha_get_hashType(HMACLen*BITS_PER_BYTE); + hash_alg = sha_get_hashType(HMACLen*PR_BITS_PER_BYTE); if (hash_alg == HASH_AlgNULL) { goto loser; } diff --git a/cmd/lib/berparse.c b/cmd/lib/berparse.c index e937663828..9e65361e57 100644 --- a/cmd/lib/berparse.c +++ b/cmd/lib/berparse.c @@ -18,8 +18,8 @@ typedef struct { } ParseStackElem; struct BERParseStr { - PRArenaPool *his; - PRArenaPool *mine; + PLArenaPool *his; + PLArenaPool *mine; ParseProc proc; int stackDepth; ParseStackElem *stackPtr; @@ -299,10 +299,10 @@ SECStatus BER_ParseSome(BERParse *h, unsigned char *buf, int len) } return PR_FALSE; } -BERParse *BER_ParseInit(PRArenaPool *arena, PRBool derOnly) +BERParse *BER_ParseInit(PLArenaPool *arena, PRBool derOnly) { BERParse *h; - PRArenaPool *temp = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); + PLArenaPool *temp = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); if (temp == NULL) { PORT_SetError(SEC_ERROR_NO_MEMORY); return NULL; @@ -332,7 +332,7 @@ BERParse *BER_ParseInit(PRArenaPool *arena, PRBool derOnly) SECArb *BER_ParseFini(BERParse *h) { - PRArenaPool *myArena = h->mine; + PLArenaPool *myArena = h->mine; SECArb *arb; if (h->state != parseComplete) { diff --git a/cmd/lib/pppolicy.c b/cmd/lib/pppolicy.c index 6988897375..7a5bd0b776 100644 --- a/cmd/lib/pppolicy.c +++ b/cmd/lib/pppolicy.c @@ -59,7 +59,7 @@ static const SEC_ASN1Template secu_CertificatePoliciesTemplate[] = { static CERTCertificatePolicies * secu_DecodeCertificatePoliciesExtension(SECItem *extnValue) { - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; SECStatus rv; CERTCertificatePolicies *policies; CERTPolicyInfo **policyInfos, *policyInfo; diff --git a/cmd/lib/secutil.c b/cmd/lib/secutil.c index f849b35c53..292ec7c480 100644 --- a/cmd/lib/secutil.c +++ b/cmd/lib/secutil.c @@ -694,7 +694,7 @@ secu_PrintTime(FILE *out, const PRTime time, const char *m, int level) void SECU_PrintUTCTime(FILE *out, const SECItem *t, const char *m, int level) { - int64 time; + PRTime time; SECStatus rv; rv = DER_UTCTimeToTime(&time, t); @@ -712,7 +712,7 @@ SECU_PrintUTCTime(FILE *out, const SECItem *t, const char *m, int level) void SECU_PrintGeneralizedTime(FILE *out, const SECItem *t, const char *m, int level) { - int64 time; + PRTime time; SECStatus rv; @@ -1132,7 +1132,7 @@ const SEC_ASN1Template secuPBEV2Params[] = void secu_PrintRSAPSSParams(FILE *out, SECItem *value, char *m, int level) { - PRArenaPool *pool = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); + PLArenaPool *pool = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); SECStatus rv; SECKEYRSAPSSParams param; SECAlgorithmID maskHashAlg; @@ -1196,7 +1196,7 @@ secu_PrintRSAPSSParams(FILE *out, SECItem *value, char *m, int level) void secu_PrintKDF2Params(FILE *out, SECItem *value, char *m, int level) { - PRArenaPool *pool = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); + PLArenaPool *pool = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); SECStatus rv; secuPBEParams param; @@ -1226,7 +1226,7 @@ secu_PrintKDF2Params(FILE *out, SECItem *value, char *m, int level) void secu_PrintPKCS5V2Params(FILE *out, SECItem *value, char *m, int level) { - PRArenaPool *pool = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); + PLArenaPool *pool = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); SECStatus rv; secuPBEParams param; @@ -1253,7 +1253,7 @@ secu_PrintPKCS5V2Params(FILE *out, SECItem *value, char *m, int level) void secu_PrintPBEParams(FILE *out, SECItem *value, char *m, int level) { - PRArenaPool *pool = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); + PLArenaPool *pool = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); SECStatus rv; secuPBEParams param; @@ -1401,7 +1401,7 @@ SECU_PrintDSAPublicKey(FILE *out, SECKEYPublicKey *pk, char *m, int level) } static void -secu_PrintSubjectPublicKeyInfo(FILE *out, PRArenaPool *arena, +secu_PrintSubjectPublicKeyInfo(FILE *out, PLArenaPool *arena, CERTSubjectPublicKeyInfo *i, char *msg, int level) { SECKEYPublicKey *pk; @@ -1451,7 +1451,7 @@ int SECU_PrintDumpDerIssuerAndSerial(FILE *out, SECItem *der, char *m, int level) { - PRArenaPool *arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); + PLArenaPool *arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); CERTCertificate *c; int rv = SEC_ERROR_NO_MEMORY; char *derIssuerB64; @@ -1508,7 +1508,7 @@ secu_PrintX509InvalidDate(FILE *out, SECItem *value, char *msg, int level) { SECItem decodedValue; SECStatus rv; - int64 invalidTime; + PRTime invalidTime; char *formattedTime = NULL; decodedValue.data = NULL; @@ -2192,7 +2192,7 @@ int SECU_DecodeAndPrintExtensions(FILE *out, SECItem *any, char *m, int level) { CERTCertExtension **extensions = NULL; - PRArenaPool *arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); + PLArenaPool *arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); int rv = 0; if (!arena) @@ -2266,7 +2266,7 @@ SECU_PrintCertAttributes(FILE *out, CERTAttribute **attrs, char *m, int level) int /* sometimes a PRErrorCode, other times a SECStatus. Sigh. */ SECU_PrintCertificateRequest(FILE *out, SECItem *der, char *m, int level) { - PRArenaPool *arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); + PLArenaPool *arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); CERTCertificateRequest *cr; int rv = SEC_ERROR_NO_MEMORY; @@ -2300,7 +2300,7 @@ SECU_PrintCertificateRequest(FILE *out, SECItem *der, char *m, int level) int SECU_PrintCertificate(FILE *out, const SECItem *der, const char *m, int level) { - PRArenaPool *arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); + PLArenaPool *arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); CERTCertificate *c; int rv = SEC_ERROR_NO_MEMORY; int iv; @@ -2346,7 +2346,7 @@ SECU_PrintCertificate(FILE *out, const SECItem *der, const char *m, int level) int SECU_PrintSubjectPublicKeyInfo(FILE *out, SECItem *der, char *m, int level) { - PRArenaPool *arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); + PLArenaPool *arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); int rv = SEC_ERROR_NO_MEMORY; CERTSubjectPublicKeyInfo spki; @@ -2373,7 +2373,7 @@ SECU_PrintSubjectPublicKeyInfo(FILE *out, SECItem *der, char *m, int level) int SECU_PrintPrivateKey(FILE *out, SECItem *der, char *m, int level) { - PRArenaPool *arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); + PLArenaPool *arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); SECKEYEncryptedPrivateKeyInfo key; int rv = SEC_ERROR_NO_MEMORY; @@ -2795,7 +2795,7 @@ secu_PrintPKCS7SignedAndEnveloped(FILE *out, int SECU_PrintCrl (FILE *out, SECItem *der, char *m, int level) { - PRArenaPool *arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); + PLArenaPool *arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); CERTCrl *c = NULL; int rv = SEC_ERROR_NO_MEMORY; @@ -2988,7 +2988,7 @@ SECU_PrintTrustFlags(FILE *out, CERTCertTrust *trust, char *m, int level) int SECU_PrintDERName(FILE *out, SECItem *der, const char *m, int level) { - PRArenaPool *arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); + PLArenaPool *arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); CERTName *name; int rv = SEC_ERROR_NO_MEMORY; @@ -3019,7 +3019,7 @@ secu_PrintSignedDataSigOpt(FILE *out, SECItem *der, const char *m, int level, SECU_PPFunc inner, SignatureOptionType withSignature) { - PRArenaPool *arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); + PLArenaPool *arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); CERTSignedData *sd; int rv = SEC_ERROR_NO_MEMORY; @@ -3282,7 +3282,7 @@ SECU_SignAndEncodeCRL(CERTCertificate *issuer, CERTSignedCrl *signCrl, SECItem der; SECKEYPrivateKey *caPrivateKey = NULL; SECStatus rv; - PRArenaPool *arena; + PLArenaPool *arena; SECOidTag algID; void *dummy; @@ -3360,7 +3360,7 @@ SECU_SignAndEncodeCRL(CERTCertificate *issuer, CERTSignedCrl *signCrl, SECStatus -SECU_CopyCRL(PRArenaPool *destArena, CERTCrl *destCrl, CERTCrl *srcCrl) +SECU_CopyCRL(PLArenaPool *destArena, CERTCrl *destCrl, CERTCrl *srcCrl) { void *dummy; SECStatus rv = SECSuccess; @@ -3392,7 +3392,7 @@ SECU_CopyCRL(PRArenaPool *destArena, CERTCrl *destCrl, CERTCrl *srcCrl) } SECStatus -SECU_DerSignDataCRL(PRArenaPool *arena, CERTSignedData *sd, +SECU_DerSignDataCRL(PLArenaPool *arena, CERTSignedData *sd, unsigned char *buf, int len, SECKEYPrivateKey *pk, SECOidTag algID) { @@ -3430,7 +3430,7 @@ SECU_DerSignDataCRL(PRArenaPool *arena, CERTSignedData *sd, /* we need access to the private function cert_FindExtension for this code to work */ CERTAuthKeyID * -SECU_FindCRLAuthKeyIDExten (PRArenaPool *arena, CERTSignedCrl *scrl) +SECU_FindCRLAuthKeyIDExten (PLArenaPool *arena, CERTSignedCrl *scrl) { SECItem encodedExtenValue; SECStatus rv; @@ -3508,7 +3508,7 @@ SECU_FindCrlIssuer(CERTCertDBHandle *dbhandle, SECItem* subject, /* Encodes and adds extensions to the CRL or CRL entries. */ SECStatus -SECU_EncodeAndAddExtensionValue(PRArenaPool *arena, void *extHandle, +SECU_EncodeAndAddExtensionValue(PLArenaPool *arena, void *extHandle, void *value, PRBool criticality, int extenType, EXTEN_EXT_VALUE_ENCODER EncodeValueFn) { diff --git a/cmd/makepqg/makepqg.c b/cmd/makepqg/makepqg.c index 5a290fd6db..36e2aab5cd 100644 --- a/cmd/makepqg/makepqg.c +++ b/cmd/makepqg/makepqg.c @@ -54,7 +54,7 @@ SECStatus outputPQGParams(PQGParams * pqgParams, PRBool output_binary, PRBool output_raw, FILE * outFile) { - PRArenaPool * arena = NULL; + PLArenaPool * arena = NULL; char * PQG; SECItem * pItem; int cc; diff --git a/cmd/ocspclnt/ocspclnt.c b/cmd/ocspclnt/ocspclnt.c index f812df1c09..ea2a4ce3a7 100644 --- a/cmd/ocspclnt/ocspclnt.c +++ b/cmd/ocspclnt/ocspclnt.c @@ -254,7 +254,7 @@ create_request (FILE *out_file, CERTCertDBHandle *handle, CERTCertificate *cert, CERTCertList *certs = NULL; CERTCertificate *myCert = NULL; CERTOCSPRequest *request = NULL; - int64 now = PR_Now(); + PRTime now = PR_Now(); SECItem *encoding = NULL; SECStatus rv = SECFailure; @@ -329,7 +329,7 @@ dump_response (FILE *out_file, CERTCertDBHandle *handle, CERTCertificate *cert, CERTCertList *certs = NULL; CERTCertificate *myCert = NULL; char *loc = NULL; - int64 now = PR_Now(); + PRTime now = PR_Now(); SECItem *response = NULL; SECStatus rv = SECFailure; PRBool includeServiceLocator; @@ -400,7 +400,7 @@ dump_response (FILE *out_file, CERTCertDBHandle *handle, CERTCertificate *cert, static SECStatus get_cert_status (FILE *out_file, CERTCertDBHandle *handle, CERTCertificate *cert, const char *cert_name, - int64 verify_time) + PRTime verify_time) { SECStatus rv = SECFailure; @@ -436,7 +436,7 @@ get_cert_status (FILE *out_file, CERTCertDBHandle *handle, */ static SECStatus verify_cert (FILE *out_file, CERTCertDBHandle *handle, CERTCertificate *cert, - const char *cert_name, SECCertUsage cert_usage, int64 verify_time) + const char *cert_name, SECCertUsage cert_usage, PRTime verify_time) { SECStatus rv = SECFailure; @@ -965,7 +965,7 @@ main (int argc, char **argv) SECStatus rv; CERTCertDBHandle *handle = NULL; SECCertUsage cert_usage; - int64 verify_time; + PRTime verify_time; CERTCertificate *cert = NULL; PRBool ascii = PR_FALSE; diff --git a/cmd/ocspresp/ocspresp.c b/cmd/ocspresp/ocspresp.c index 22c66bb88e..3e97747148 100644 --- a/cmd/ocspresp/ocspresp.c +++ b/cmd/ocspresp/ocspresp.c @@ -36,7 +36,7 @@ getCaAndSubjectCert(CERTCertDBHandle *certHandle, } static SECItem * -encode(PRArenaPool *arena, CERTOCSPCertID *cid, CERTCertificate *ca) +encode(PLArenaPool *arena, CERTOCSPCertID *cid, CERTCertificate *ca) { SECItem *response; PRTime now = PR_Now(); @@ -66,7 +66,7 @@ encode(PRArenaPool *arena, CERTOCSPCertID *cid, CERTCertificate *ca) } static SECItem * -encodeRevoked(PRArenaPool *arena, CERTOCSPCertID *cid, CERTCertificate *ca) +encodeRevoked(PLArenaPool *arena, CERTOCSPCertID *cid, CERTCertificate *ca) { SECItem *response; PRTime now = PR_Now(); @@ -124,7 +124,7 @@ main(int argc, char **argv) CERTCertDBHandle *certHandle = NULL; CERTCertificate *caCert = NULL, *cert = NULL; CERTOCSPCertID *cid = NULL; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; PRTime now = PR_Now(); SECItem *encoded = NULL; diff --git a/cmd/pk12util/pk12util.c b/cmd/pk12util/pk12util.c index 4f82622411..8950b1b0f0 100644 --- a/cmd/pk12util/pk12util.c +++ b/cmd/pk12util/pk12util.c @@ -244,7 +244,7 @@ p12u_ucs2_ascii_conversion_function(PRBool toUnicode, } SECStatus -P12U_UnicodeConversion(PRArenaPool *arena, SECItem *dest, SECItem *src, +P12U_UnicodeConversion(PLArenaPool *arena, SECItem *dest, SECItem *src, PRBool toUnicode, PRBool swapBytes) { unsigned int allocLen; @@ -558,7 +558,7 @@ p12u_WriteToExportFile(void *arg, const char *buf, unsigned long len) return; } - writeLen = PR_Write(p12cxt->file, (unsigned char *)buf, (int32)len); + writeLen = PR_Write(p12cxt->file, (unsigned char *)buf, (PRInt32)len); if(writeLen != (int)len) { PR_Close(p12cxt->file); diff --git a/cmd/pk1sign/pk1sign.c b/cmd/pk1sign/pk1sign.c index 0041d3a9e7..291388bd70 100644 --- a/cmd/pk1sign/pk1sign.c +++ b/cmd/pk1sign/pk1sign.c @@ -108,7 +108,7 @@ SignFile(FILE *outFile, PRFileDesc *inFile, CERTCertificate *cert) char *data; SECKEYPrivateKey *privKey; SECOidTag algID; - PRArenaPool *arena; + PLArenaPool *arena; CERTSignedData sd; SECItem *result; diff --git a/cmd/selfserv/selfserv.c b/cmd/selfserv/selfserv.c index 29a9c5ffb7..89c3263fa3 100644 --- a/cmd/selfserv/selfserv.c +++ b/cmd/selfserv/selfserv.c @@ -1066,7 +1066,7 @@ void stop_server() } SECItemArray * -makeTryLaterOCSPResponse(PRArenaPool *arena) +makeTryLaterOCSPResponse(PLArenaPool *arena) { SECItemArray *result = NULL; SECItem *ocspResponse = NULL; @@ -1087,7 +1087,7 @@ makeTryLaterOCSPResponse(PRArenaPool *arena) } SECItemArray * -makeCorruptedOCSPResponse(PRArenaPool *arena) +makeCorruptedOCSPResponse(PLArenaPool *arena) { SECItemArray *result = NULL; SECItem *ocspResponse = NULL; @@ -1107,7 +1107,7 @@ makeCorruptedOCSPResponse(PRArenaPool *arena) } SECItemArray * -makeSignedOCSPResponse(PRArenaPool *arena, ocspStaplingModeType osm, +makeSignedOCSPResponse(PLArenaPool *arena, ocspStaplingModeType osm, PRFileDesc *model_sock, CERTCertificate *cert) { SECItemArray *result = NULL; @@ -1216,7 +1216,7 @@ handle_connection( char fileName[513]; char proto[128]; PRDescIdentity aboveLayer = PR_INVALID_IO_LAYER; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; ocspStaplingModeType osm; pBuf = buf; diff --git a/cmd/signver/pk7print.c b/cmd/signver/pk7print.c index f98fd28fb2..ba83897e18 100644 --- a/cmd/signver/pk7print.c +++ b/cmd/signver/pk7print.c @@ -77,7 +77,7 @@ int sv_PrintTime(FILE *out, SECItem *t, char *m) { PRExplodedTime printableTime; - int64 time; + PRTime time; char *timeString; int rv; @@ -314,7 +314,7 @@ sv_PrintDSAPublicKey(FILE *out, SECKEYPublicKey *pk, char *m) } int -sv_PrintSubjectPublicKeyInfo(FILE *out, PRArenaPool *arena, +sv_PrintSubjectPublicKeyInfo(FILE *out, PLArenaPool *arena, CERTSubjectPublicKeyInfo *i, char *msg) { SECKEYPublicKey *pk; @@ -358,7 +358,7 @@ sv_PrintInvalidDateExten (FILE *out, SECItem *value, char *msg) { SECItem decodedValue; SECStatus rv; - int64 invalidTime; + PRTime invalidTime; char *formattedTime = NULL; decodedValue.data = NULL; @@ -454,7 +454,7 @@ sv_PrintCRLInfo(FILE *out, CERTCrl *crl, char *m) int sv_PrintCertificate(FILE *out, SECItem *der, char *m, int level) { - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; CERTCertificate *c; int rv; int iv; @@ -503,7 +503,7 @@ sv_PrintCertificate(FILE *out, SECItem *der, char *m, int level) int sv_PrintSignedData(FILE *out, SECItem *der, char *m, SECU_PPFunc inner) { - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; CERTSignedData *sd; int rv; diff --git a/cmd/vfychain/vfychain.c b/cmd/vfychain/vfychain.c index 800ae19b56..ddbf379cdb 100644 --- a/cmd/vfychain/vfychain.c +++ b/cmd/vfychain/vfychain.c @@ -232,13 +232,13 @@ getCert(const char *name, PRBool isAscii, const char * progName) #define REV_METHOD_INDEX_MAX 4 typedef struct RevMethodsStruct { - uint testType; + unsigned int testType; char *testTypeStr; - uint testFlags; + unsigned int testFlags; char *testFlagsStr; - uint methodType; + unsigned int methodType; char *methodTypeStr; - uint methodFlags; + unsigned int methodFlags; char *methodFlagsStr; } RevMethods; @@ -248,7 +248,7 @@ SECStatus parseRevMethodsAndFlags() { int i; - uint testType = 0; + unsigned int testType = 0; for(i = 0;i < REV_METHOD_INDEX_MAX;i++) { /* testType */ @@ -269,7 +269,7 @@ parseRevMethodsAndFlags() /* testFlags */ if (revMethodsData[i].testFlagsStr) { char *flagStr = revMethodsData[i].testFlagsStr; - uint testFlags = 0; + unsigned int testFlags = 0; if (PORT_Strstr(flagStr, REVCONFIG_TEST_TESTLOCALINFOFIRST_STR)) { testFlags |= CERT_REV_MI_TEST_ALL_LOCAL_INFORMATION_FIRST; @@ -282,7 +282,7 @@ parseRevMethodsAndFlags() /* method type */ if (revMethodsData[i].methodTypeStr) { char *methodStr = revMethodsData[i].methodTypeStr; - uint methodType = 0; + unsigned int methodType = 0; if (!PORT_Strcmp(methodStr, REVCONFIG_METHOD_CRL_STR)) { methodType = REVCONFIG_METHOD_CRL; @@ -301,7 +301,7 @@ parseRevMethodsAndFlags() /* method flags */ if (revMethodsData[i].methodFlagsStr) { char *flagStr = revMethodsData[i].methodFlagsStr; - uint methodFlags = 0; + unsigned int methodFlags = 0; if (!PORT_Strstr(flagStr, REVCONFIG_METHOD_DONOTUSEMETHOD_STR)) { methodFlags |= CERT_REV_M_TEST_USING_THIS_METHOD; @@ -331,7 +331,7 @@ SECStatus configureRevocationParams(CERTRevocationFlags *flags) { int i; - uint testType = REVCONFIG_TEST_UNDEFINED; + unsigned int testType = REVCONFIG_TEST_UNDEFINED; static CERTRevocationTests *revTests = NULL; PRUint64 *revFlags; @@ -611,7 +611,7 @@ main(int argc, char *argv[], char *envp[]) static CERTRevocationFlags rev; if (oidStr) { - PRArenaPool *arena; + PLArenaPool *arena; SECOidData od; memset(&od, 0, sizeof od); od.offset = SEC_OID_UNKNOWN; diff --git a/coreconf/config.mk b/coreconf/config.mk index 855664deb7..ea1d04b26a 100644 --- a/coreconf/config.mk +++ b/coreconf/config.mk @@ -179,3 +179,5 @@ endif DEFINES += -DUSE_UTIL_DIRECTLY USE_UTIL_DIRECTLY = 1 +# Build with NO_NSPR_10_SUPPORT to avoid using obsolete NSPR features +DEFINES += -DNO_NSPR_10_SUPPORT diff --git a/lib/base/arena.c b/lib/base/arena.c index 4697e125e9..2b83338ad1 100644 --- a/lib/base/arena.c +++ b/lib/base/arena.c @@ -704,7 +704,7 @@ nss_arena_unmark_release nss_arena_call_destructor_chain(arenaMark->next_destructor); #endif /* ARENA_DESTRUCTOR_LIST */ - PR_ARENA_RELEASE(&arena->pool, inner_mark); + PL_ARENA_RELEASE(&arena->pool, inner_mark); /* No error return */ } @@ -797,7 +797,7 @@ nss_zalloc_arena_locked void *rv; struct pointer_header *h; PRUint32 my_size = size + sizeof(struct pointer_header); - PR_ARENA_ALLOCATE(p, &arena->pool, my_size); + PL_ARENA_ALLOCATE(p, &arena->pool, my_size); if( (void *)NULL == p ) { nss_SetError(NSS_ERROR_NO_MEMORY); return (void *)NULL; @@ -1179,7 +1179,7 @@ nss_ZRealloc return pointer; } - PR_ARENA_ALLOCATE(p, &arena->pool, my_newSize); + PL_ARENA_ALLOCATE(p, &arena->pool, my_newSize); if( (void *)NULL == p ) { PR_Unlock(arena->lock); nss_SetError(NSS_ERROR_NO_MEMORY); diff --git a/lib/certdb/alg1485.c b/lib/certdb/alg1485.c index fd1fc85cfb..17bbfda5e6 100644 --- a/lib/certdb/alg1485.c +++ b/lib/certdb/alg1485.c @@ -363,7 +363,7 @@ hexToBin(PLArenaPool *pool, SECItem * destItem, const char * src, int len) * points to first character after separator. */ static CERTAVA * -ParseRFC1485AVA(PRArenaPool *arena, const char **pbp, const char *endptr) +ParseRFC1485AVA(PLArenaPool *arena, const char **pbp, const char *endptr) { CERTAVA *a; const NameToKind *n2k; @@ -1137,7 +1137,7 @@ char * CERT_DerNameToAscii(SECItem *dername) { int rv; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; CERTName name; char *retstr = NULL; @@ -1164,7 +1164,7 @@ CERT_DerNameToAscii(SECItem *dername) } static char * -avaToString(PRArenaPool *arena, CERTAVA *ava) +avaToString(PLArenaPool *arena, CERTAVA *ava) { char * buf = NULL; SECItem* avaValue; @@ -1198,7 +1198,7 @@ avaToString(PRArenaPool *arena, CERTAVA *ava) * This code returns the FIRST one found, the most general one found. */ static char * -CERT_GetNameElement(PRArenaPool *arena, const CERTName *name, int wantedTag) +CERT_GetNameElement(PLArenaPool *arena, const CERTName *name, int wantedTag) { CERTRDN** rdns = name->rdns; CERTRDN* rdn; @@ -1222,7 +1222,7 @@ CERT_GetNameElement(PRArenaPool *arena, const CERTName *name, int wantedTag) * This is particularly appropriate for Common Name. See RFC 2818. */ static char * -CERT_GetLastNameElement(PRArenaPool *arena, const CERTName *name, int wantedTag) +CERT_GetLastNameElement(PLArenaPool *arena, const CERTName *name, int wantedTag) { CERTRDN** rdns = name->rdns; CERTRDN* rdn; @@ -1249,7 +1249,7 @@ CERT_GetCertificateEmailAddress(CERTCertificate *cert) SECStatus rv; CERTGeneralName *nameList = NULL; CERTGeneralName *current; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; int i; subAltName.data = NULL; @@ -1381,7 +1381,7 @@ cert_GetCertificateEmailAddresses(CERTCertificate *cert) char * rawEmailAddr = NULL; char * addrBuf = NULL; char * pBuf = NULL; - PRArenaPool * tmpArena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); + PLArenaPool * tmpArena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); PRUint32 maxLen = 0; PRInt32 finalLen = 0; SECStatus rv; diff --git a/lib/certdb/certdb.c b/lib/certdb/certdb.c index 5f8192e77d..b7d22bd836 100644 --- a/lib/certdb/certdb.c +++ b/lib/certdb/certdb.c @@ -209,7 +209,7 @@ SEC_ASN1_CHOOSER_IMPLEMENT(SEC_SignedCertificateTemplate) SEC_ASN1_CHOOSER_IMPLEMENT(CERT_SequenceOfCertExtensionTemplate) SECStatus -CERT_KeyFromIssuerAndSN(PRArenaPool *arena, SECItem *issuer, SECItem *sn, +CERT_KeyFromIssuerAndSN(PLArenaPool *arena, SECItem *issuer, SECItem *sn, SECItem *key) { key->len = sn->len + issuer->len; @@ -243,7 +243,7 @@ SECStatus CERT_NameFromDERCert(SECItem *derCert, SECItem *derName) { int rv; - PRArenaPool *arena; + PLArenaPool *arena; CERTSignedData sd; void *tmpptr; @@ -287,7 +287,7 @@ SECStatus CERT_IssuerNameFromDERCert(SECItem *derCert, SECItem *derName) { int rv; - PRArenaPool *arena; + PLArenaPool *arena; CERTSignedData sd; void *tmpptr; @@ -331,7 +331,7 @@ SECStatus CERT_SerialNumberFromDERCert(SECItem *derCert, SECItem *derName) { int rv; - PRArenaPool *arena; + PLArenaPool *arena; CERTSignedData sd; void *tmpptr; @@ -376,7 +376,7 @@ CERT_SerialNumberFromDERCert(SECItem *derCert, SECItem *derName) * DER certificate. */ SECStatus -CERT_KeyFromDERCert(PRArenaPool *reqArena, SECItem *derCert, SECItem *key) +CERT_KeyFromDERCert(PLArenaPool *reqArena, SECItem *derCert, SECItem *key) { int rv; CERTSignedData sd; @@ -744,7 +744,7 @@ CERT_DecodeDERCertificate(SECItem *derSignedCert, PRBool copyDER, char *nickname) { CERTCertificate *cert; - PRArenaPool *arena; + PLArenaPool *arena; void *data; int rv; int len; @@ -874,11 +874,11 @@ __CERT_DecodeDERCertificate(SECItem *derSignedCert, PRBool copyDER, CERTValidity * -CERT_CreateValidity(int64 notBefore, int64 notAfter) +CERT_CreateValidity(PRTime notBefore, PRTime notAfter) { CERTValidity *v; int rv; - PRArenaPool *arena; + PLArenaPool *arena; if (notBefore > notAfter) { PORT_SetError(SEC_ERROR_INVALID_ARGS); @@ -906,7 +906,7 @@ CERT_CreateValidity(int64 notBefore, int64 notAfter) } SECStatus -CERT_CopyValidity(PRArenaPool *arena, CERTValidity *to, CERTValidity *from) +CERT_CopyValidity(PLArenaPool *arena, CERTValidity *to, CERTValidity *from) { SECStatus rv; @@ -1417,7 +1417,7 @@ cert_TestHostName(char * cn, const char * hn) SECStatus cert_VerifySubjectAltName(const CERTCertificate *cert, const char *hn) { - PRArenaPool * arena = NULL; + PLArenaPool * arena = NULL; CERTGeneralName * nameList = NULL; CERTGeneralName * current; char * cn; @@ -1552,7 +1552,7 @@ cert_VerifySubjectAltName(const CERTCertificate *cert, const char *hn) * - return value is NULL */ CERTGeneralName * -cert_GetSubjectAltNameList(const CERTCertificate *cert, PRArenaPool *arena) +cert_GetSubjectAltNameList(const CERTCertificate *cert, PLArenaPool *arena) { CERTGeneralName * nameList = NULL; SECStatus rv = SECFailure; @@ -1691,7 +1691,7 @@ CERT_GetValidDNSPatternsFromCert(CERTCertificate *cert) { CERTGeneralName *generalNames; CERTCertNicknames *nickNames; - PRArenaPool *arena; + PLArenaPool *arena; char *singleName; arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); @@ -1916,7 +1916,7 @@ CERT_CompareCertsForRedirection(CERTCertificate *c1, CERTCertificate *c2) CERTIssuerAndSN * -CERT_GetCertIssuerAndSN(PRArenaPool *arena, CERTCertificate *cert) +CERT_GetCertIssuerAndSN(PLArenaPool *arena, CERTCertificate *cert) { CERTIssuerAndSN *result; SECStatus rv; @@ -2512,7 +2512,7 @@ CERT_ImportCerts(CERTCertDBHandle *certdb, SECCertUsage usage, CERTCertList * CERT_NewCertList(void) { - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; CERTCertList *ret = NULL; arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); diff --git a/lib/certdb/certi.h b/lib/certdb/certi.h index ebc64fed7a..82a372a594 100644 --- a/lib/certdb/certi.h +++ b/lib/certdb/certi.h @@ -43,7 +43,7 @@ struct PreAllocatorStr PRSize len; void* data; PRSize used; - PRArenaPool* arena; + PLArenaPool* arena; PRSize extra; }; @@ -232,11 +232,11 @@ cert_FindDERCertBySubjectKeyID(SECItem *subjKeyID); extern int cert_AVAOidTagToMaxLen(SECOidTag tag); /* Make an AVA, allocated from pool, from OID and DER encoded value */ -extern CERTAVA * CERT_CreateAVAFromRaw(PRArenaPool *pool, +extern CERTAVA * CERT_CreateAVAFromRaw(PLArenaPool *pool, const SECItem * OID, const SECItem * value); /* Make an AVA from binary input specified by SECItem */ -extern CERTAVA * CERT_CreateAVAFromSECItem(PRArenaPool *arena, SECOidTag kind, +extern CERTAVA * CERT_CreateAVAFromSECItem(PLArenaPool *arena, SECOidTag kind, int valueType, SECItem *value); /* @@ -244,7 +244,7 @@ extern CERTAVA * CERT_CreateAVAFromSECItem(PRArenaPool *arena, SECOidTag kind, * Automatically creates the cache object if it doesn't exist yet. */ SECStatus AcquireDPCache(CERTCertificate* issuer, const SECItem* subject, - const SECItem* dp, int64 t, void* wincx, + const SECItem* dp, PRTime t, void* wincx, CRLDPCache** dpcache, PRBool* writeLocked); /* check if a particular SN is in the CRL cache and return its entry */ @@ -357,7 +357,7 @@ SECStatus cert_ReleaseNamedCRLCache(NamedCRLCache* ncc); /* This is private for now. Maybe shoule be public. */ CERTGeneralName * -cert_GetSubjectAltNameList(const CERTCertificate *cert, PRArenaPool *arena); +cert_GetSubjectAltNameList(const CERTCertificate *cert, PLArenaPool *arena); /* Count DNS names and IP addresses in a list of GeneralNames */ PRUint32 diff --git a/lib/certdb/certv3.c b/lib/certdb/certv3.c index 46b4fb3fbd..2509d5d519 100644 --- a/lib/certdb/certv3.c +++ b/lib/certdb/certv3.c @@ -72,7 +72,7 @@ CERT_FindCertURLExtension(CERTCertificate *cert, int tag, int catag) SECItem baseitem = {siBuffer,0}; SECItem urlstringitem = {siBuffer,0}; SECItem basestringitem = {siBuffer,0}; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; PRBool hasbase; char *urlstring; char *str; @@ -199,7 +199,7 @@ CERT_FindNSStringExtension(CERTCertificate *cert, int oidtag) { SECItem wrapperItem, tmpItem = {siBuffer,0}; SECStatus rv; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; char *retstring = NULL; wrapperItem.data = NULL; @@ -312,7 +312,7 @@ CERT_FindBasicConstraintExten(CERTCertificate *cert, } CERTAuthKeyID * -CERT_FindAuthKeyIDExten (PRArenaPool *arena, CERTCertificate *cert) +CERT_FindAuthKeyIDExten (PLArenaPool *arena, CERTCertificate *cert) { SECItem encodedExtenValue; SECStatus rv; diff --git a/lib/certdb/certxutl.c b/lib/certdb/certxutl.c index def0712247..67dd1a1732 100644 --- a/lib/certdb/certxutl.c +++ b/lib/certdb/certxutl.c @@ -111,8 +111,8 @@ typedef struct _extNode { typedef struct { void (*setExts)(void *object, CERTCertExtension **exts); void *object; - PRArenaPool *ownerArena; - PRArenaPool *arena; + PLArenaPool *ownerArena; + PLArenaPool *arena; extNode *head; int count; }extRec; @@ -124,10 +124,10 @@ typedef struct { * about callers data structures (owner objects) */ void * -cert_StartExtensions(void *owner, PRArenaPool *ownerArena, +cert_StartExtensions(void *owner, PLArenaPool *ownerArena, void (*setExts)(void *object, CERTCertExtension **exts)) { - PRArenaPool *arena; + PLArenaPool *arena; extRec *handle; arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); @@ -397,7 +397,7 @@ CERT_FindBitStringExtension (CERTCertExtension **extensions, int tag, { SECItem wrapperItem, tmpItem = {siBuffer,0}; SECStatus rv; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; wrapperItem.data = NULL; tmpItem.data = NULL; diff --git a/lib/certdb/crl.c b/lib/certdb/crl.c index f09c6bead3..1551cd1bb1 100644 --- a/lib/certdb/crl.c +++ b/lib/certdb/crl.c @@ -304,12 +304,12 @@ SECStatus cert_check_crl_version (CERTCrl *crl) * DER crl. */ SECStatus -CERT_KeyFromDERCrl(PRArenaPool *arena, SECItem *derCrl, SECItem *key) +CERT_KeyFromDERCrl(PLArenaPool *arena, SECItem *derCrl, SECItem *key) { SECStatus rv; CERTSignedData sd; CERTCrlKey crlkey; - PRArenaPool* myArena; + PLArenaPool* myArena; if (!arena) { /* arena needed for QuickDER */ @@ -392,10 +392,10 @@ SECStatus CERT_CompleteCRLDecodeEntries(CERTSignedCrl* crl) * allow reusing the input DER without making a copy */ CERTSignedCrl * -CERT_DecodeDERCrlWithFlags(PRArenaPool *narena, SECItem *derSignedCrl, +CERT_DecodeDERCrlWithFlags(PLArenaPool *narena, SECItem *derSignedCrl, int type, PRInt32 options) { - PRArenaPool *arena; + PLArenaPool *arena; CERTSignedCrl *crl; SECStatus rv; OpaqueCRLFields* extended = NULL; @@ -532,7 +532,7 @@ CERT_DecodeDERCrlWithFlags(PRArenaPool *narena, SECItem *derSignedCrl, * take a DER CRL and decode it into a CRL structure */ CERTSignedCrl * -CERT_DecodeDERCrl(PRArenaPool *narena, SECItem *derSignedCrl, int type) +CERT_DecodeDERCrl(PLArenaPool *narena, SECItem *derSignedCrl, int type) { return CERT_DecodeDERCrlWithFlags(narena, derSignedCrl, type, CRL_DECODE_DEFAULT_OPTIONS); @@ -720,7 +720,7 @@ SEC_NewCrl(CERTCertDBHandle *handle, char *url, SECItem *derCrl, int type) CERTSignedCrl * SEC_FindCrlByDERCert(CERTCertDBHandle *handle, SECItem *derCrl, int type) { - PRArenaPool *arena; + PLArenaPool *arena; SECItem crlKey; SECStatus rv; CERTSignedCrl *crl = NULL; @@ -781,7 +781,7 @@ SECStatus SEC_LookupCrls(CERTCertDBHandle *handle, CERTCrlHeadNode **nodes, int type) { CERTCrlHeadNode *head; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; SECStatus rv; *nodes = NULL; @@ -959,7 +959,7 @@ void PreAllocator_Destroy(PreAllocator* PreAllocator) /* constructor for PreAllocator object */ PreAllocator* PreAllocator_Create(PRSize size) { - PRArenaPool* arena = NULL; + PLArenaPool* arena = NULL; PreAllocator* prebuffer = NULL; arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); if (!arena) diff --git a/lib/certdb/genname.c b/lib/certdb/genname.c index bd9caf2712..b0d35cc86d 100644 --- a/lib/certdb/genname.c +++ b/lib/certdb/genname.c @@ -156,7 +156,7 @@ CERT_NewGeneralName(PLArenaPool *arena, CERTGeneralNameType type) ** This function does not change the destinate's GeneralName's list linkage. */ SECStatus -cert_CopyOneGeneralName(PRArenaPool *arena, +cert_CopyOneGeneralName(PLArenaPool *arena, CERTGeneralName *dest, CERTGeneralName *src) { @@ -221,7 +221,7 @@ CERT_DestroyGeneralNameList(CERTGeneralNameList *list) CERTGeneralNameList * CERT_CreateGeneralNameList(CERTGeneralName *name) { - PRArenaPool *arena; + PLArenaPool *arena; CERTGeneralNameList *list = NULL; arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); @@ -288,7 +288,7 @@ CERT_GetPrevNameConstraint(CERTNameConstraint *current) } SECItem * -CERT_EncodeGeneralName(CERTGeneralName *genName, SECItem *dest, PRArenaPool *arena) +CERT_EncodeGeneralName(CERTGeneralName *genName, SECItem *dest, PLArenaPool *arena) { const SEC_ASN1Template * template; @@ -345,7 +345,7 @@ CERT_EncodeGeneralName(CERTGeneralName *genName, SECItem *dest, PRArenaPool *are } SECItem ** -cert_EncodeGeneralNames(PRArenaPool *arena, CERTGeneralName *names) +cert_EncodeGeneralNames(PLArenaPool *arena, CERTGeneralName *names) { CERTGeneralName *current_name; SECItem **items = NULL; @@ -385,7 +385,7 @@ cert_EncodeGeneralNames(PRArenaPool *arena, CERTGeneralName *names) } CERTGeneralName * -CERT_DecodeGeneralName(PRArenaPool *reqArena, +CERT_DecodeGeneralName(PLArenaPool *reqArena, SECItem *encodedName, CERTGeneralName *genName) { @@ -447,7 +447,7 @@ CERT_DecodeGeneralName(PRArenaPool *reqArena, } CERTGeneralName * -cert_DecodeGeneralNames (PRArenaPool *arena, +cert_DecodeGeneralNames (PLArenaPool *arena, SECItem **encodedGenName) { PRCList *head = NULL; @@ -506,7 +506,7 @@ cert_DestroyGeneralNames(CERTGeneralName *name) static SECItem * cert_EncodeNameConstraint(CERTNameConstraint *constraint, SECItem *dest, - PRArenaPool *arena) + PLArenaPool *arena) { PORT_Assert(arena); if (dest == NULL) { @@ -524,7 +524,7 @@ cert_EncodeNameConstraint(CERTNameConstraint *constraint, SECStatus cert_EncodeNameConstraintSubTree(CERTNameConstraint *constraints, - PRArenaPool *arena, + PLArenaPool *arena, SECItem ***dest, PRBool permited) { @@ -570,7 +570,7 @@ cert_EncodeNameConstraintSubTree(CERTNameConstraint *constraints, SECStatus cert_EncodeNameConstraints(CERTNameConstraints *constraints, - PRArenaPool *arena, + PLArenaPool *arena, SECItem *dest) { SECStatus rv = SECSuccess; @@ -607,7 +607,7 @@ cert_EncodeNameConstraints(CERTNameConstraints *constraints, CERTNameConstraint * -cert_DecodeNameConstraint(PRArenaPool *reqArena, +cert_DecodeNameConstraint(PLArenaPool *reqArena, SECItem *encodedConstraint) { CERTNameConstraint *constraint; @@ -652,7 +652,7 @@ cert_DecodeNameConstraint(PRArenaPool *reqArena, } CERTNameConstraint * -cert_DecodeNameConstraintSubTree(PRArenaPool *arena, +cert_DecodeNameConstraintSubTree(PLArenaPool *arena, SECItem **subTree, PRBool permited) { @@ -685,7 +685,7 @@ cert_DecodeNameConstraintSubTree(PRArenaPool *arena, } CERTNameConstraints * -cert_DecodeNameConstraints(PRArenaPool *reqArena, +cert_DecodeNameConstraints(PLArenaPool *reqArena, const SECItem *encodedConstraints) { CERTNameConstraints *constraints; @@ -751,7 +751,7 @@ cert_DecodeNameConstraints(PRArenaPool *reqArena, ** structs as the source list or some dest entries will be overwritten. */ SECStatus -CERT_CopyGeneralName(PRArenaPool *arena, +CERT_CopyGeneralName(PLArenaPool *arena, CERTGeneralName *dest, CERTGeneralName *src) { @@ -808,7 +808,7 @@ CERT_DupGeneralNameList(CERTGeneralNameList *list) /* Allocate space and copy CERTNameConstraint from src to dest */ CERTNameConstraint * -CERT_CopyNameConstraint(PRArenaPool *arena, +CERT_CopyNameConstraint(PLArenaPool *arena, CERTNameConstraint *dest, CERTNameConstraint *src) { @@ -915,7 +915,7 @@ SECStatus CERT_GetNameConstraintByType (CERTNameConstraint *constraints, CERTGeneralNameType type, CERTNameConstraint **returnList, - PRArenaPool *arena) + PLArenaPool *arena) { CERTNameConstraint *current = NULL; void *mark = NULL; @@ -1055,7 +1055,7 @@ cert_ExtractDNEmailAddrs(CERTGeneralName *name, PLArenaPool *arena) ** in preparation for a name constraints test. */ CERTGeneralName * -CERT_GetCertificateNames(CERTCertificate *cert, PRArenaPool *arena) +CERT_GetCertificateNames(CERTCertificate *cert, PLArenaPool *arena) { return CERT_GetConstrainedCertificateNames(cert, arena, PR_FALSE); } @@ -1065,7 +1065,7 @@ CERT_GetCertificateNames(CERTCertificate *cert, PRArenaPool *arena) */ CERTGeneralName * CERT_GetConstrainedCertificateNames(const CERTCertificate *cert, - PRArenaPool *arena, + PLArenaPool *arena, PRBool includeSubjectCommonName) { CERTGeneralName *DN; @@ -1525,7 +1525,7 @@ CERT_AddNameConstraintByGeneralName(PLArenaPool *arena, /* Extract the name constraints extension from the CA cert. */ SECStatus -CERT_FindNameConstraintsExten(PRArenaPool *arena, +CERT_FindNameConstraintsExten(PLArenaPool *arena, CERTCertificate *cert, CERTNameConstraints **constraints) { @@ -1565,7 +1565,7 @@ CERT_FindNameConstraintsExten(PRArenaPool *arena, ** the name. */ SECStatus -CERT_CheckNameSpace(PRArenaPool *arena, +CERT_CheckNameSpace(PLArenaPool *arena, const CERTNameConstraints *constraints, const CERTGeneralName *currentName) { @@ -1614,7 +1614,7 @@ SECStatus CERT_CompareNameSpace(CERTCertificate *cert, CERTGeneralName *namesList, CERTCertificate **certsList, - PRArenaPool *reqArena, + PLArenaPool *reqArena, CERTCertificate **pBadCert) { SECStatus rv = SECSuccess; @@ -1755,7 +1755,7 @@ CERT_CompareGeneralNameLists(CERTGeneralNameList *a, CERTGeneralNameList *b) void * CERT_GetGeneralNameFromListByType(CERTGeneralNameList *list, CERTGeneralNameType type, - PRArenaPool *arena) + PLArenaPool *arena) { CERTName *name = NULL; SECItem *item = NULL; diff --git a/lib/certdb/genname.h b/lib/certdb/genname.h index 8f22d5cd95..091c82c127 100644 --- a/lib/certdb/genname.h +++ b/lib/certdb/genname.h @@ -18,20 +18,20 @@ SEC_BEGIN_PROTOS extern const SEC_ASN1Template CERT_GeneralNamesTemplate[]; extern SECItem ** -cert_EncodeGeneralNames(PRArenaPool *arena, CERTGeneralName *names); +cert_EncodeGeneralNames(PLArenaPool *arena, CERTGeneralName *names); extern CERTGeneralName * -cert_DecodeGeneralNames(PRArenaPool *arena, SECItem **encodedGenName); +cert_DecodeGeneralNames(PLArenaPool *arena, SECItem **encodedGenName); extern SECStatus cert_DestroyGeneralNames(CERTGeneralName *name); extern SECStatus -cert_EncodeNameConstraints(CERTNameConstraints *constraints, PRArenaPool *arena, +cert_EncodeNameConstraints(CERTNameConstraints *constraints, PLArenaPool *arena, SECItem *dest); extern CERTNameConstraints * -cert_DecodeNameConstraints(PRArenaPool *arena, const SECItem *encodedConstraints); +cert_DecodeNameConstraints(PLArenaPool *arena, const SECItem *encodedConstraints); extern CERTGeneralName * cert_CombineNamesLists(CERTGeneralName *list1, CERTGeneralName *list2); @@ -51,7 +51,7 @@ SECStatus CERT_CompareGeneralName(CERTGeneralName *a, CERTGeneralName *b); SECStatus -CERT_CopyGeneralName(PRArenaPool *arena, +CERT_CopyGeneralName(PLArenaPool *arena, CERTGeneralName *dest, CERTGeneralName *src); @@ -74,7 +74,7 @@ CERT_CompareGeneralNameLists(CERTGeneralNameList *a, CERTGeneralNameList *b); void * CERT_GetGeneralNameFromListByType(CERTGeneralNameList *list, CERTGeneralNameType type, - PRArenaPool *arena); + PLArenaPool *arena); /* Adds a name to the tail of the list */ void @@ -98,7 +98,7 @@ SECStatus CERT_CompareNameSpace(CERTCertificate *cert, CERTGeneralName *namesList, CERTCertificate **certsList, - PRArenaPool *reqArena, + PLArenaPool *reqArena, CERTCertificate **pBadCert); SEC_END_PROTOS diff --git a/lib/certdb/polcyxtn.c b/lib/certdb/polcyxtn.c index b0c38c407c..b958e5a2a3 100644 --- a/lib/certdb/polcyxtn.c +++ b/lib/certdb/polcyxtn.c @@ -148,7 +148,7 @@ breakLines(char *string) CERTCertificatePolicies * CERT_DecodeCertificatePoliciesExtension(const SECItem *extnValue) { - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; SECStatus rv; CERTCertificatePolicies *policies; CERTPolicyInfo **policyInfos, *policyInfo; @@ -224,7 +224,7 @@ CERT_DestroyCertificatePoliciesExtension(CERTCertificatePolicies *policies) CERTCertificatePolicyMappings * CERT_DecodePolicyMappingsExtension(SECItem *extnValue) { - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; SECStatus rv; CERTCertificatePolicyMappings *mappings; SECItem newExtnValue; @@ -282,7 +282,7 @@ CERT_DecodePolicyConstraintsExtension const SECItem *encodedValue) { CERTCertificatePolicyConstraints decodeContext; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; SECStatus rv = SECSuccess; /* initialize so we can tell when an optional component is omitted */ @@ -338,7 +338,7 @@ SECStatus CERT_DecodeInhibitAnyExtension (CERTCertificateInhibitAny *decodedValue, SECItem *encodedValue) { CERTCertificateInhibitAny decodeContext; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; SECStatus rv = SECSuccess; /* make a new arena */ @@ -370,7 +370,7 @@ SECStatus CERT_DecodeInhibitAnyExtension CERTUserNotice * CERT_DecodeUserNotice(SECItem *noticeItem) { - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; SECStatus rv; CERTUserNotice *userNotice; SECItem newNoticeItem; @@ -604,7 +604,7 @@ const SEC_ASN1Template CERT_OidSeqTemplate[] = { CERTOidSequence * CERT_DecodeOidSequence(const SECItem *seqItem) { - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; SECStatus rv; CERTOidSequence *oidSeq; SECItem newSeqItem; @@ -708,7 +708,7 @@ CERT_GovtApprovedBitSet(CERTCertificate *cert) SECStatus -CERT_EncodePolicyConstraintsExtension(PRArenaPool *arena, +CERT_EncodePolicyConstraintsExtension(PLArenaPool *arena, CERTCertificatePolicyConstraints *constr, SECItem *dest) { @@ -727,7 +727,7 @@ CERT_EncodePolicyConstraintsExtension(PRArenaPool *arena, } SECStatus -CERT_EncodePolicyMappingExtension(PRArenaPool *arena, +CERT_EncodePolicyMappingExtension(PLArenaPool *arena, CERTCertificatePolicyMappings *mapping, SECItem *dest) { @@ -748,7 +748,7 @@ CERT_EncodePolicyMappingExtension(PRArenaPool *arena, SECStatus -CERT_EncodeCertPoliciesExtension(PRArenaPool *arena, +CERT_EncodeCertPoliciesExtension(PLArenaPool *arena, CERTPolicyInfo **info, SECItem *dest) { @@ -767,7 +767,7 @@ CERT_EncodeCertPoliciesExtension(PRArenaPool *arena, } SECStatus -CERT_EncodeUserNotice(PRArenaPool *arena, +CERT_EncodeUserNotice(PLArenaPool *arena, CERTUserNotice *notice, SECItem *dest) { @@ -787,7 +787,7 @@ CERT_EncodeUserNotice(PRArenaPool *arena, } SECStatus -CERT_EncodeNoticeReference(PRArenaPool *arena, +CERT_EncodeNoticeReference(PLArenaPool *arena, CERTNoticeReference *reference, SECItem *dest) { @@ -807,7 +807,7 @@ CERT_EncodeNoticeReference(PRArenaPool *arena, } SECStatus -CERT_EncodeInhibitAnyExtension(PRArenaPool *arena, +CERT_EncodeInhibitAnyExtension(PLArenaPool *arena, CERTCertificateInhibitAny *certInhibitAny, SECItem *dest) { diff --git a/lib/certdb/secname.c b/lib/certdb/secname.c index ea7513266a..d070bbfc73 100644 --- a/lib/certdb/secname.c +++ b/lib/certdb/secname.c @@ -40,7 +40,7 @@ CountArray(void **array) } static void ** -AddToArray(PRArenaPool *arena, void **array, void *element) +AddToArray(PLArenaPool *arena, void **array, void *element) { unsigned count; void **ap; @@ -84,7 +84,7 @@ CERT_GetAVATag(CERTAVA *ava) } static SECStatus -SetupAVAType(PRArenaPool *arena, SECOidTag type, SECItem *it, unsigned *maxLenp) +SetupAVAType(PLArenaPool *arena, SECOidTag type, SECItem *it, unsigned *maxLenp) { unsigned char *oid; unsigned oidLen; @@ -116,7 +116,7 @@ SetupAVAType(PRArenaPool *arena, SECOidTag type, SECItem *it, unsigned *maxLenp) } static SECStatus -SetupAVAValue(PRArenaPool *arena, int valueType, const SECItem *in, +SetupAVAValue(PLArenaPool *arena, int valueType, const SECItem *in, SECItem *out, unsigned maxLen) { PRUint8 *value, *cp, *ucs4Val; @@ -167,7 +167,7 @@ SetupAVAValue(PRArenaPool *arena, int valueType, const SECItem *in, } CERTAVA * -CERT_CreateAVAFromRaw(PRArenaPool *pool, const SECItem * OID, +CERT_CreateAVAFromRaw(PLArenaPool *pool, const SECItem * OID, const SECItem * value) { CERTAVA *ava; @@ -187,7 +187,7 @@ CERT_CreateAVAFromRaw(PRArenaPool *pool, const SECItem * OID, } CERTAVA * -CERT_CreateAVAFromSECItem(PRArenaPool *arena, SECOidTag kind, int valueType, +CERT_CreateAVAFromSECItem(PLArenaPool *arena, SECOidTag kind, int valueType, SECItem *value) { CERTAVA *ava; @@ -211,7 +211,7 @@ CERT_CreateAVAFromSECItem(PRArenaPool *arena, SECOidTag kind, int valueType, } CERTAVA * -CERT_CreateAVA(PRArenaPool *arena, SECOidTag kind, int valueType, char *value) +CERT_CreateAVA(PLArenaPool *arena, SECOidTag kind, int valueType, char *value) { SECItem item = { siBuffer, NULL, 0 }; @@ -222,7 +222,7 @@ CERT_CreateAVA(PRArenaPool *arena, SECOidTag kind, int valueType, char *value) } CERTAVA * -CERT_CopyAVA(PRArenaPool *arena, CERTAVA *from) +CERT_CopyAVA(PLArenaPool *arena, CERTAVA *from) { CERTAVA *ava; int rv; @@ -249,7 +249,7 @@ static const SEC_ASN1Template cert_RDNTemplate[] = { CERTRDN * -CERT_CreateRDN(PRArenaPool *arena, CERTAVA *ava0, ...) +CERT_CreateRDN(PLArenaPool *arena, CERTAVA *ava0, ...) { CERTAVA *ava; CERTRDN *rdn; @@ -290,14 +290,14 @@ CERT_CreateRDN(PRArenaPool *arena, CERTAVA *ava0, ...) } SECStatus -CERT_AddAVA(PRArenaPool *arena, CERTRDN *rdn, CERTAVA *ava) +CERT_AddAVA(PLArenaPool *arena, CERTRDN *rdn, CERTAVA *ava) { rdn->avas = (CERTAVA**) AddToArray(arena, (void**) rdn->avas, ava); return rdn->avas ? SECSuccess : SECFailure; } SECStatus -CERT_CopyRDN(PRArenaPool *arena, CERTRDN *to, CERTRDN *from) +CERT_CopyRDN(PLArenaPool *arena, CERTRDN *to, CERTRDN *from) { CERTAVA **avas, *fava, *tava; SECStatus rv = SECSuccess; @@ -340,7 +340,7 @@ CERT_CreateName(CERTRDN *rdn0, ...) va_list ap; unsigned count; CERTRDN **rdnp; - PRArenaPool *arena; + PLArenaPool *arena; arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); if ( !arena ) { @@ -395,7 +395,7 @@ CERT_DestroyName(CERTName *name) { if (name) { - PRArenaPool *arena = name->arena; + PLArenaPool *arena = name->arena; name->rdns = NULL; name->arena = NULL; if (arena) PORT_FreeArena(arena, PR_FALSE); @@ -410,7 +410,7 @@ CERT_AddRDN(CERTName *name, CERTRDN *rdn) } SECStatus -CERT_CopyName(PRArenaPool *arena, CERTName *to, const CERTName *from) +CERT_CopyName(PLArenaPool *arena, CERTName *to, const CERTName *from) { CERTRDN **rdns, *frdn, *trdn; SECStatus rv = SECSuccess; diff --git a/lib/certdb/stanpcertdb.c b/lib/certdb/stanpcertdb.c index ab8241a873..478f70906a 100644 --- a/lib/certdb/stanpcertdb.c +++ b/lib/certdb/stanpcertdb.c @@ -693,7 +693,7 @@ CERT_FindCertByNicknameOrEmailAddrForUsage(CERTCertDBHandle *handle, static void add_to_subject_list(CERTCertList *certList, CERTCertificate *cert, - PRBool validOnly, int64 sorttime) + PRBool validOnly, PRTime sorttime) { SECStatus secrv; if (!validOnly || @@ -810,8 +810,8 @@ SECStatus certdb_SaveSingleProfile(CERTCertificate *cert, const char *emailAddr, SECItem *emailProfile, SECItem *profileTime) { - int64 oldtime; - int64 newtime; + PRTime oldtime; + PRTime newtime; SECStatus rv = SECFailure; PRBool saveit; SECItem oldprof, oldproftime; diff --git a/lib/certdb/xauthkid.c b/lib/certdb/xauthkid.c index 5f7efc98c9..4faf017a19 100644 --- a/lib/certdb/xauthkid.c +++ b/lib/certdb/xauthkid.c @@ -35,7 +35,7 @@ const SEC_ASN1Template CERTAuthKeyIDTemplate[] = { -SECStatus CERT_EncodeAuthKeyID (PRArenaPool *arena, CERTAuthKeyID *value, SECItem *encodedValue) +SECStatus CERT_EncodeAuthKeyID (PLArenaPool *arena, CERTAuthKeyID *value, SECItem *encodedValue) { SECStatus rv = SECFailure; @@ -78,7 +78,7 @@ SECStatus CERT_EncodeAuthKeyID (PRArenaPool *arena, CERTAuthKeyID *value, SECIte } CERTAuthKeyID * -CERT_DecodeAuthKeyID (PRArenaPool *arena, const SECItem *encodedValue) +CERT_DecodeAuthKeyID (PLArenaPool *arena, const SECItem *encodedValue) { CERTAuthKeyID * value = NULL; SECStatus rv = SECFailure; diff --git a/lib/certdb/xbsconst.c b/lib/certdb/xbsconst.c index 12e66ead23..7a3cb1cd04 100644 --- a/lib/certdb/xbsconst.c +++ b/lib/certdb/xbsconst.c @@ -22,7 +22,7 @@ typedef struct EncodedContext{ SECItem isCA; SECItem pathLenConstraint; SECItem encodedValue; - PRArenaPool *arena; + PLArenaPool *arena; }EncodedContext; static const SEC_ASN1Template CERTBasicConstraintsTemplate[] = { @@ -41,10 +41,10 @@ static unsigned char hexFalse = 0x00; #define GEN_BREAK(status) rv = status; break; SECStatus CERT_EncodeBasicConstraintValue - (PRArenaPool *arena, CERTBasicConstraints *value, SECItem *encodedValue) + (PLArenaPool *arena, CERTBasicConstraints *value, SECItem *encodedValue) { EncodedContext encodeContext; - PRArenaPool *our_pool = NULL; + PLArenaPool *our_pool = NULL; SECStatus rv = SECSuccess; do { @@ -91,7 +91,7 @@ SECStatus CERT_DecodeBasicConstraintValue (CERTBasicConstraints *value, const SECItem *encodedValue) { EncodedContext decodeContext; - PRArenaPool *our_pool; + PLArenaPool *our_pool; SECStatus rv = SECSuccess; do { diff --git a/lib/certdb/xconst.c b/lib/certdb/xconst.c index c095252c8d..d4a32f3f96 100644 --- a/lib/certdb/xconst.c +++ b/lib/certdb/xconst.c @@ -66,7 +66,7 @@ const SEC_ASN1Template CERTAuthInfoAccessTemplate[] = { SECStatus -CERT_EncodeSubjectKeyID(PRArenaPool *arena, const SECItem* srcString, +CERT_EncodeSubjectKeyID(PLArenaPool *arena, const SECItem* srcString, SECItem *encodedValue) { SECStatus rv = SECSuccess; @@ -85,7 +85,7 @@ CERT_EncodeSubjectKeyID(PRArenaPool *arena, const SECItem* srcString, SECStatus -CERT_EncodePrivateKeyUsagePeriod(PRArenaPool *arena, +CERT_EncodePrivateKeyUsagePeriod(PLArenaPool *arena, CERTPrivKeyUsagePeriod *pkup, SECItem *encodedValue) { @@ -134,7 +134,7 @@ CERT_DecodePrivKeyUsagePeriodExtension(PLArenaPool *arena, SECItem *extnValue) SECStatus -CERT_EncodeIA5TypeExtension(PRArenaPool *arena, char *value, SECItem *encodedValue) +CERT_EncodeIA5TypeExtension(PLArenaPool *arena, char *value, SECItem *encodedValue) { SECItem encodeContext; SECStatus rv = SECSuccess; @@ -155,7 +155,7 @@ CERT_EncodeIA5TypeExtension(PRArenaPool *arena, char *value, SECItem *encodedVal } SECStatus -CERT_EncodeAltNameExtension(PRArenaPool *arena, CERTGeneralName *value, SECItem *encodedValue) +CERT_EncodeAltNameExtension(PLArenaPool *arena, CERTGeneralName *value, SECItem *encodedValue) { SECItem **encodedGenName; SECStatus rv = SECSuccess; @@ -170,7 +170,7 @@ CERT_EncodeAltNameExtension(PRArenaPool *arena, CERTGeneralName *value, SECIte } CERTGeneralName * -CERT_DecodeAltNameExtension(PRArenaPool *reqArena, SECItem *EncodedAltName) +CERT_DecodeAltNameExtension(PLArenaPool *reqArena, SECItem *EncodedAltName) { SECStatus rv = SECSuccess; CERTAltNameEncodedContext encodedContext; @@ -205,7 +205,7 @@ CERT_DecodeAltNameExtension(PRArenaPool *reqArena, SECItem *EncodedAltName) SECStatus -CERT_EncodeNameConstraintsExtension(PRArenaPool *arena, +CERT_EncodeNameConstraintsExtension(PLArenaPool *arena, CERTNameConstraints *value, SECItem *encodedValue) { @@ -217,7 +217,7 @@ CERT_EncodeNameConstraintsExtension(PRArenaPool *arena, CERTNameConstraints * -CERT_DecodeNameConstraintsExtension(PRArenaPool *arena, +CERT_DecodeNameConstraintsExtension(PLArenaPool *arena, const SECItem *encodedConstraints) { return cert_DecodeNameConstraints(arena, encodedConstraints); @@ -225,7 +225,7 @@ CERT_DecodeNameConstraintsExtension(PRArenaPool *arena, CERTAuthInfoAccess ** -CERT_DecodeAuthInfoAccessExtension(PRArenaPool *reqArena, +CERT_DecodeAuthInfoAccessExtension(PLArenaPool *reqArena, SECItem *encodedExtension) { CERTAuthInfoAccess **info = NULL; @@ -258,7 +258,7 @@ CERT_DecodeAuthInfoAccessExtension(PRArenaPool *reqArena, } SECStatus -CERT_EncodeInfoAccessExtension(PRArenaPool *arena, +CERT_EncodeInfoAccessExtension(PLArenaPool *arena, CERTAuthInfoAccess **info, SECItem *dest) { diff --git a/lib/certdb/xconst.h b/lib/certdb/xconst.h index 14eb75c989..72767c30a0 100644 --- a/lib/certdb/xconst.h +++ b/lib/certdb/xconst.h @@ -15,21 +15,21 @@ typedef struct CERTAltNameEncodedContextStr { SEC_BEGIN_PROTOS extern SECStatus -CERT_EncodePrivateKeyUsagePeriod(PRArenaPool *arena, +CERT_EncodePrivateKeyUsagePeriod(PLArenaPool *arena, CERTPrivKeyUsagePeriod *pkup, SECItem *encodedValue); extern SECStatus -CERT_EncodeNameConstraintsExtension(PRArenaPool *arena, +CERT_EncodeNameConstraintsExtension(PLArenaPool *arena, CERTNameConstraints *value, SECItem *encodedValue); extern SECStatus -CERT_EncodeIA5TypeExtension(PRArenaPool *arena, char *value, +CERT_EncodeIA5TypeExtension(PLArenaPool *arena, char *value, SECItem *encodedValue); SECStatus -cert_EncodeAuthInfoAccessExtension(PRArenaPool *arena, +cert_EncodeAuthInfoAccessExtension(PLArenaPool *arena, CERTAuthInfoAccess **info, SECItem *dest); SEC_END_PROTOS diff --git a/lib/certhigh/certhigh.c b/lib/certhigh/certhigh.c index e8447a683b..74651baf27 100644 --- a/lib/certhigh/certhigh.c +++ b/lib/certhigh/certhigh.c @@ -80,7 +80,7 @@ CERT_FindUserCertsByUsage(CERTCertDBHandle *handle, CERTCertificate *cert = NULL; CERTCertList *certList = NULL; SECStatus rv; - int64 time; + PRTime time; CERTCertListNode *node = NULL; CERTCertListNode *freenode = NULL; int n; @@ -228,7 +228,7 @@ CERT_FindUserCertByUsage(CERTCertDBHandle *handle, CERTCertificate *cert = NULL; CERTCertList *certList = NULL; SECStatus rv; - int64 time; + PRTime time; time = PR_Now(); @@ -458,7 +458,7 @@ CollectNicknames( NSSCertificate *c, void *data) CERTCertNicknames * CERT_GetCertNicknames(CERTCertDBHandle *handle, int what, void *wincx) { - PRArenaPool *arena; + PLArenaPool *arena; CERTCertNicknames *names; int i; stringNode *node; @@ -588,7 +588,7 @@ CollectDistNames( CERTCertificate *cert, SECItem *k, void *data) CERTDistNames * CERT_DupDistNames(CERTDistNames *orig) { - PRArenaPool *arena; + PLArenaPool *arena; CERTDistNames *names; int i; SECStatus rv; @@ -636,7 +636,7 @@ CERT_DupDistNames(CERTDistNames *orig) CERTDistNames * CERT_GetSSLCACerts(CERTCertDBHandle *handle) { - PRArenaPool *arena; + PLArenaPool *arena; CERTDistNames *names; int i; SECStatus rv; @@ -698,7 +698,7 @@ CERTDistNames * CERT_DistNamesFromCertList(CERTCertList *certList) { CERTDistNames * dnames = NULL; - PRArenaPool * arena; + PLArenaPool * arena; CERTCertListNode *node = NULL; SECItem * names = NULL; int listLen = 0, i = 0; @@ -746,7 +746,7 @@ CERT_DistNamesFromNicknames(CERTCertDBHandle *handle, char **nicknames, int nnames) { CERTDistNames *dnames = NULL; - PRArenaPool *arena; + PLArenaPool *arena; int i, rv; SECItem *names = NULL; CERTCertificate *cert = NULL; @@ -788,7 +788,7 @@ CERT_FindCertByNameString(CERTCertDBHandle *handle, char *nameStr) CERTName *name; SECItem *nameItem; CERTCertificate *cert = NULL; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); @@ -1024,7 +1024,7 @@ CERT_CertChainFromCert(CERTCertificate *cert, SECCertUsage usage, CERTCertificateList *chain = NULL; NSSCertificate **stanChain; NSSCertificate *stanCert; - PRArenaPool *arena; + PLArenaPool *arena; NSSUsage nssUsage; int i, len; NSSTrustDomain *td = STAN_GetDefaultTrustDomain(); @@ -1116,7 +1116,7 @@ CERT_CertListFromCert(CERTCertificate *cert) { CERTCertificateList *chain = NULL; int rv; - PRArenaPool *arena; + PLArenaPool *arena; /* arena for SecCertificateList */ arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); @@ -1147,7 +1147,7 @@ CERTCertificateList * CERT_DupCertList(const CERTCertificateList * oldList) { CERTCertificateList *newList = NULL; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; SECItem *newItem; SECItem *oldItem; int len = oldList->len; diff --git a/lib/certhigh/certreq.c b/lib/certhigh/certreq.c index 19753766f1..f5098a0dd9 100644 --- a/lib/certhigh/certreq.c +++ b/lib/certhigh/certreq.c @@ -52,7 +52,7 @@ CERT_CreateCertificate(unsigned long serialNumber, { CERTCertificate *c; int rv; - PRArenaPool *arena; + PLArenaPool *arena; arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); @@ -124,7 +124,7 @@ CERT_CreateCertificateRequest(CERTName *subject, SECItem **attributes) { CERTCertificateRequest *certreq; - PRArenaPool *arena; + PLArenaPool *arena; CERTAttribute * attribute; SECOidData * oidData; SECStatus rv; @@ -240,7 +240,7 @@ setCRExt(void *o, CERTCertExtension **exts) ** The list is created as CertExtensions and converted to an ** attribute list by CERT_FinishCRAttributes(). */ -extern void *cert_StartExtensions(void *owner, PRArenaPool *ownerArena, +extern void *cert_StartExtensions(void *owner, PLArenaPool *ownerArena, void (*setExts)(void *object, CERTCertExtension **exts)); void * CERT_StartCertificateRequestAttributes(CERTCertificateRequest *req) diff --git a/lib/certhigh/certvfy.c b/lib/certhigh/certvfy.c index c048128bbe..f364ceb5fb 100644 --- a/lib/certhigh/certvfy.c +++ b/lib/certhigh/certvfy.c @@ -96,7 +96,7 @@ CERT_VerifySignedDataWithPublicKeyInfo(CERTSignedData *sd, */ SECStatus CERT_VerifySignedData(CERTSignedData *sd, CERTCertificate *cert, - int64 t, void *wincx) + PRTime t, void *wincx) { SECKEYPublicKey *pubKey = 0; SECStatus rv = SECFailure; @@ -120,7 +120,7 @@ CERT_VerifySignedData(CERTSignedData *sd, CERTCertificate *cert, SECStatus SEC_CheckCRL(CERTCertDBHandle *handle,CERTCertificate *cert, - CERTCertificate *caCert, int64 t, void * wincx) + CERTCertificate *caCert, PRTime t, void * wincx) { return CERT_CheckCRL(cert, caCert, NULL, t, wincx); } @@ -129,7 +129,7 @@ SEC_CheckCRL(CERTCertDBHandle *handle,CERTCertificate *cert, * Find the issuer of a cert. Use the authorityKeyID if it exists. */ CERTCertificate * -CERT_FindCertIssuer(CERTCertificate *cert, int64 validTime, SECCertUsage usage) +CERT_FindCertIssuer(CERTCertificate *cert, PRTime validTime, SECCertUsage usage) { NSSCertificate *me; NSSTime *nssTime; @@ -305,7 +305,7 @@ cert_AddToVerifyLog(CERTVerifyLog *log, CERTCertificate *cert, long error, static SECStatus cert_VerifyCertChainOld(CERTCertDBHandle *handle, CERTCertificate *cert, PRBool checkSig, PRBool* sigerror, - SECCertUsage certUsage, int64 t, void *wincx, + SECCertUsage certUsage, PRTime t, void *wincx, CERTVerifyLog *log, PRBool* revoked) { SECTrustType trustType; @@ -322,7 +322,7 @@ cert_VerifyCertChainOld(CERTCertDBHandle *handle, CERTCertificate *cert, unsigned int caCertType; unsigned int requiredCAKeyUsage; unsigned int requiredFlags; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; CERTGeneralName *namesList = NULL; CERTCertificate **certsList = NULL; int certsListLen = 16; @@ -691,7 +691,7 @@ cert_VerifyCertChainOld(CERTCertDBHandle *handle, CERTCertificate *cert, SECStatus cert_VerifyCertChain(CERTCertDBHandle *handle, CERTCertificate *cert, PRBool checkSig, PRBool* sigerror, - SECCertUsage certUsage, int64 t, void *wincx, + SECCertUsage certUsage, PRTime t, void *wincx, CERTVerifyLog *log, PRBool* revoked) { if (CERT_GetUsePKIXForValidation()) { @@ -704,7 +704,7 @@ cert_VerifyCertChain(CERTCertDBHandle *handle, CERTCertificate *cert, SECStatus CERT_VerifyCertChain(CERTCertDBHandle *handle, CERTCertificate *cert, - PRBool checkSig, SECCertUsage certUsage, int64 t, + PRBool checkSig, SECCertUsage certUsage, PRTime t, void *wincx, CERTVerifyLog *log) { return cert_VerifyCertChain(handle, cert, checkSig, NULL, certUsage, t, @@ -716,7 +716,7 @@ CERT_VerifyCertChain(CERTCertDBHandle *handle, CERTCertificate *cert, */ SECStatus CERT_VerifyCACertForUsage(CERTCertDBHandle *handle, CERTCertificate *cert, - PRBool checkSig, SECCertUsage certUsage, int64 t, + PRBool checkSig, SECCertUsage certUsage, PRTime t, void *wincx, CERTVerifyLog *log) { SECTrustType trustType; @@ -1067,7 +1067,7 @@ cert_CheckLeafTrust(CERTCertificate *cert, SECCertUsage certUsage, */ SECStatus CERT_VerifyCertificate(CERTCertDBHandle *handle, CERTCertificate *cert, - PRBool checkSig, SECCertificateUsage requiredUsages, int64 t, + PRBool checkSig, SECCertificateUsage requiredUsages, PRTime t, void *wincx, CERTVerifyLog *log, SECCertificateUsage* returnedUsages) { SECStatus rv; @@ -1232,7 +1232,7 @@ CERT_VerifyCertificate(CERTCertDBHandle *handle, CERTCertificate *cert, SECStatus CERT_VerifyCert(CERTCertDBHandle *handle, CERTCertificate *cert, - PRBool checkSig, SECCertUsage certUsage, int64 t, + PRBool checkSig, SECCertUsage certUsage, PRTime t, void *wincx, CERTVerifyLog *log) { SECStatus rv; @@ -1386,7 +1386,7 @@ CERT_VerifyCertNow(CERTCertDBHandle *handle, CERTCertificate *cert, CERTCertificate * CERT_FindMatchingCert(CERTCertDBHandle *handle, SECItem *derName, CERTCertOwner owner, SECCertUsage usage, - PRBool preferTrusted, int64 validTime, PRBool validOnly) + PRBool preferTrusted, PRTime validTime, PRBool validOnly) { CERTCertList *certList = NULL; CERTCertificate *cert = NULL; @@ -1504,7 +1504,7 @@ CERT_FilterCertListByCANames(CERTCertList *certList, int nCANames, int n; char **names; PRBool found; - int64 time; + PRTime time; if ( nCANames <= 0 ) { return(SECSuccess); @@ -1580,7 +1580,7 @@ CERT_FilterCertListByCANames(CERTCertList *certList, int nCANames, * not yet good. */ char * -CERT_GetCertNicknameWithValidity(PRArenaPool *arena, CERTCertificate *cert, +CERT_GetCertNicknameWithValidity(PLArenaPool *arena, CERTCertificate *cert, char *expiredString, char *notYetGoodString) { SECCertTimeValidity validity; @@ -1652,7 +1652,7 @@ CERT_NicknameStringsFromCertList(CERTCertList *certList, char *expiredString, char *notYetGoodString) { CERTCertNicknames *names; - PRArenaPool *arena; + PLArenaPool *arena; CERTCertListNode *node; char **nn; @@ -1787,7 +1787,7 @@ CERT_ExtractNicknameString(char *namestring, char *expiredString, } CERTCertList * -CERT_GetCertChainFromCert(CERTCertificate *cert, int64 time, SECCertUsage usage) +CERT_GetCertChainFromCert(CERTCertificate *cert, PRTime time, SECCertUsage usage) { CERTCertList *chain = NULL; int count = 0; diff --git a/lib/certhigh/certvfypkix.c b/lib/certhigh/certvfypkix.c index 1138566e7e..4a6859c95c 100644 --- a/lib/certhigh/certvfypkix.c +++ b/lib/certhigh/certvfypkix.c @@ -650,7 +650,7 @@ cert_PkixToNssCertsChain( CERTCertList **pvalidChain, void *plContext) { - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; CERTCertificate *nssCert = NULL; CERTCertList *validChain = NULL; PKIX_PL_Object *certItem = NULL; diff --git a/lib/certhigh/crlv2.c b/lib/certhigh/crlv2.c index 9ee6f69ecf..7d8dbb9fa6 100644 --- a/lib/certhigh/crlv2.c +++ b/lib/certhigh/crlv2.c @@ -58,7 +58,7 @@ CERT_StartCRLEntryExtensions(CERTCrl *crl, CERTCrlEntry *entry) return (cert_StartExtensions (entry, crl->arena, SetCrlEntryExts)); } -SECStatus CERT_FindCRLNumberExten (PRArenaPool *arena, CERTCrl *crl, +SECStatus CERT_FindCRLNumberExten (PLArenaPool *arena, CERTCrl *crl, SECItem *value) { SECItem encodedExtenValue; @@ -100,7 +100,7 @@ SECStatus CERT_FindCRLEntryReasonExten (CERTCrlEntry *crlEntry, SECItem wrapperItem = {siBuffer,0}; SECItem tmpItem = {siBuffer,0}; SECStatus rv; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); if ( ! arena ) { @@ -135,7 +135,7 @@ SECStatus CERT_FindCRLEntryReasonExten (CERTCrlEntry *crlEntry, return (rv); } -SECStatus CERT_FindInvalidDateExten (CERTCrl *crl, int64 *value) +SECStatus CERT_FindInvalidDateExten (CERTCrl *crl, PRTime *value) { SECItem encodedExtenValue; SECItem decodedExtenValue = {siBuffer,0}; diff --git a/lib/certhigh/ocsp.c b/lib/certhigh/ocsp.c index 7f880d7ac8..84442b4a45 100644 --- a/lib/certhigh/ocsp.c +++ b/lib/certhigh/ocsp.c @@ -57,7 +57,7 @@ struct OCSPCacheItemStr { PRTime nextFetchAttemptTime; /* Cached contents. Use a separate arena, because lifetime is different */ - PRArenaPool *certStatusArena; /* NULL means: no cert status cached */ + PLArenaPool *certStatusArena; /* NULL means: no cert status cached */ ocspCertStatus certStatus; /* This may contain an error code when no OCSP response is available. */ @@ -101,9 +101,9 @@ static struct OCSPGlobalStruct { /* Forward declarations */ static SECItem * -ocsp_GetEncodedOCSPResponseFromRequest(PRArenaPool *arena, +ocsp_GetEncodedOCSPResponseFromRequest(PLArenaPool *arena, CERTOCSPRequest *request, - const char *location, int64 time, + const char *location, PRTime time, PRBool addServiceLocator, void *pwArg, CERTOCSPRequest **pRequest); @@ -111,7 +111,7 @@ static SECStatus ocsp_GetOCSPStatusFromNetwork(CERTCertDBHandle *handle, CERTOCSPCertID *certID, CERTCertificate *cert, - int64 time, + PRTime time, void *pwArg, PRBool *certIDWasConsumed, SECStatus *rv_ocsp); @@ -120,7 +120,7 @@ static SECStatus ocsp_CacheEncodedOCSPResponse(CERTCertDBHandle *handle, CERTOCSPCertID *certID, CERTCertificate *cert, - int64 time, + PRTime time, void *pwArg, const SECItem *encodedResponse, PRBool cacheInvalid, @@ -132,11 +132,11 @@ ocsp_GetVerifiedSingleResponseForCertID(CERTCertDBHandle *handle, CERTOCSPResponse *response, CERTOCSPCertID *certID, CERTCertificate *signerCert, - int64 time, + PRTime time, CERTOCSPSingleResponse **pSingleResponse); static SECStatus -ocsp_CertRevokedAfter(ocspRevokedInfo *revokedInfo, int64 time); +ocsp_CertRevokedAfter(ocspRevokedInfo *revokedInfo, PRTime time); static CERTOCSPCertID * cert_DupOCSPCertID(CERTOCSPCertID *src); @@ -189,7 +189,7 @@ ocsp_Trace(const char *format, ...) } static void -ocsp_dumpStringWithTime(const char *str, int64 time) +ocsp_dumpStringWithTime(const char *str, PRTime time) { PRExplodedTime timePrintable; char timestr[256]; @@ -230,7 +230,7 @@ dumpCertificate(CERTCertificate *cert) ocsp_Trace("OCSP ----------------\n"); ocsp_Trace("OCSP ## SUBJECT: %s\n", cert->subjectName); { - int64 timeBefore, timeAfter; + PRTime timeBefore, timeAfter; PRExplodedTime beforePrintable, afterPrintable; char beforestr[256], afterstr[256]; PRStatus rv1, rv2; @@ -335,7 +335,7 @@ ocsp_CacheKeyCompareFunction(const void *v1, const void *v2) } static SECStatus -ocsp_CopyRevokedInfo(PRArenaPool *arena, ocspCertStatus *dest, +ocsp_CopyRevokedInfo(PLArenaPool *arena, ocspCertStatus *dest, ocspRevokedInfo *src) { SECStatus rv = SECFailure; @@ -375,7 +375,7 @@ ocsp_CopyRevokedInfo(PRArenaPool *arena, ocspCertStatus *dest, } static SECStatus -ocsp_CopyCertStatus(PRArenaPool *arena, ocspCertStatus *dest, +ocsp_CopyCertStatus(PLArenaPool *arena, ocspCertStatus *dest, ocspCertStatus*src) { SECStatus rv = SECFailure; @@ -610,7 +610,7 @@ ocsp_CreateCacheItemAndConsumeCertID(OCSPCacheData *cache, CERTOCSPCertID *certID, OCSPCacheItem **pCacheItem) { - PRArenaPool *arena; + PLArenaPool *arena; void *mark; PLHashEntry *new_hash_entry; OCSPCacheItem *item; @@ -1442,7 +1442,7 @@ static const SEC_ASN1Template ocsp_ServiceLocatorTemplate[] = { * DER encodes an OCSP Request, possibly adding a signature as well. * XXX Signing is not yet supported, however; see comments in code. * INPUTS: - * PRArenaPool *arena + * PLArenaPool *arena * The return value is allocated from here. * If a NULL is passed in, allocation is done from the heap instead. * CERTOCSPRequest *request @@ -1456,7 +1456,7 @@ static const SEC_ASN1Template ocsp_ServiceLocatorTemplate[] = { * (e.g. no memory). */ SECItem * -CERT_EncodeOCSPRequest(PRArenaPool *arena, CERTOCSPRequest *request, +CERT_EncodeOCSPRequest(PLArenaPool *arena, CERTOCSPRequest *request, void *pwArg) { ocspTBSRequest *tbsRequest; @@ -1503,7 +1503,7 @@ CERT_EncodeOCSPRequest(PRArenaPool *arena, CERTOCSPRequest *request, CERTOCSPRequest * CERT_DecodeOCSPRequest(const SECItem *src) { - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; SECStatus rv = SECFailure; CERTOCSPRequest *dest = NULL; int i; @@ -1571,7 +1571,7 @@ CERT_DestroyOCSPCertID(CERTOCSPCertID* certID) */ SECItem * -ocsp_DigestValue(PRArenaPool *arena, SECOidTag digestAlg, +ocsp_DigestValue(PLArenaPool *arena, SECOidTag digestAlg, SECItem *fill, const SECItem *src) { const SECHashObject *digestObject; @@ -1635,7 +1635,7 @@ ocsp_DigestValue(PRArenaPool *arena, SECOidTag digestAlg, * results in a NULL being returned (and an appropriate error set). */ SECItem * -CERT_GetSPKIDigest(PRArenaPool *arena, const CERTCertificate *cert, +CERT_GetSPKIDigest(PLArenaPool *arena, const CERTCertificate *cert, SECOidTag digestAlg, SECItem *fill) { SECItem spk; @@ -1655,7 +1655,7 @@ CERT_GetSPKIDigest(PRArenaPool *arena, const CERTCertificate *cert, * Digest the cert's subject name using the specified algorithm. */ static SECItem * -cert_GetSubjectNameDigest(PRArenaPool *arena, const CERTCertificate *cert, +cert_GetSubjectNameDigest(PLArenaPool *arena, const CERTCertificate *cert, SECOidTag digestAlg, SECItem *fill) { SECItem name; @@ -1680,7 +1680,7 @@ cert_GetSubjectNameDigest(PRArenaPool *arena, const CERTCertificate *cert, * Other errors are low-level problems (no memory, bad database, etc.). */ static CERTOCSPCertID * -ocsp_CreateCertID(PRArenaPool *arena, CERTCertificate *cert, int64 time) +ocsp_CreateCertID(PLArenaPool *arena, CERTCertificate *cert, PRTime time) { CERTOCSPCertID *certID; CERTCertificate *issuerCert = NULL; @@ -1760,9 +1760,9 @@ ocsp_CreateCertID(PRArenaPool *arena, CERTCertificate *cert, int64 time) } CERTOCSPCertID* -CERT_CreateOCSPCertID(CERTCertificate *cert, int64 time) +CERT_CreateOCSPCertID(CERTCertificate *cert, PRTime time) { - PRArenaPool *arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); + PLArenaPool *arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); CERTOCSPCertID *certID; PORT_Assert(arena != NULL); if (!arena) @@ -1781,7 +1781,7 @@ static CERTOCSPCertID * cert_DupOCSPCertID(CERTOCSPCertID *src) { CERTOCSPCertID *dest; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; if (!src) { PORT_SetError(SEC_ERROR_INVALID_ARGS); @@ -1920,8 +1920,8 @@ ocsp_AddServiceLocatorExtension(ocspSingleRequest *singleRequest, * Other errors are low-level problems (no memory, bad database, etc.). */ static ocspSingleRequest ** -ocsp_CreateSingleRequestList(PRArenaPool *arena, CERTCertList *certList, - int64 time, PRBool includeLocator) +ocsp_CreateSingleRequestList(PLArenaPool *arena, CERTCertList *certList, + PRTime time, PRBool includeLocator) { ocspSingleRequest **requestList = NULL; CERTCertListNode *node = NULL; @@ -1975,10 +1975,10 @@ ocsp_CreateSingleRequestList(PRArenaPool *arena, CERTCertList *certList, } static ocspSingleRequest ** -ocsp_CreateRequestFromCert(PRArenaPool *arena, +ocsp_CreateRequestFromCert(PLArenaPool *arena, CERTOCSPCertID *certID, CERTCertificate *singleCert, - int64 time, + PRTime time, PRBool includeLocator) { ocspSingleRequest **requestList = NULL; @@ -2015,7 +2015,7 @@ ocsp_CreateRequestFromCert(PRArenaPool *arena, static CERTOCSPRequest * ocsp_prepareEmptyOCSPRequest(void) { - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; CERTOCSPRequest *request = NULL; ocspTBSRequest *tbsRequest = NULL; @@ -2047,7 +2047,7 @@ ocsp_prepareEmptyOCSPRequest(void) CERTOCSPRequest * cert_CreateSingleCertOCSPRequest(CERTOCSPCertID *certID, CERTCertificate *singleCert, - int64 time, + PRTime time, PRBool addServiceLocator, CERTCertificate *signerCert) { @@ -2095,7 +2095,7 @@ cert_CreateSingleCertOCSPRequest(CERTOCSPCertID *certID, * must be handled by the caller (and thus by having multiple calls * to this routine), who knows about where the request(s) are being * sent and whether there are any trusted responders in place. - * int64 time + * PRTime time * Indicates the time for which the certificate status is to be * determined -- this may be used in the search for the cert's issuer * but has no effect on the request itself. @@ -2114,7 +2114,7 @@ cert_CreateSingleCertOCSPRequest(CERTOCSPCertID *certID, * Other errors are low-level problems (no memory, bad database, etc.). */ CERTOCSPRequest * -CERT_CreateOCSPRequest(CERTCertList *certList, int64 time, +CERT_CreateOCSPRequest(CERTCertList *certList, PRTime time, PRBool addServiceLocator, CERTCertificate *signerCert) { @@ -2384,7 +2384,7 @@ ocsp_CertStatusTypeByTag(int derTag) * have allocated; it expects its caller to do that. */ static SECStatus -ocsp_FinishDecodingSingleResponses(PRArenaPool *reqArena, +ocsp_FinishDecodingSingleResponses(PLArenaPool *reqArena, CERTOCSPSingleResponse **responses) { ocspCertStatus *certStatus; @@ -2468,7 +2468,7 @@ ocsp_ResponderIDTypeByTag(int derTag) * Decode "src" as a BasicOCSPResponse, returning the result. */ static ocspBasicOCSPResponse * -ocsp_DecodeBasicOCSPResponse(PRArenaPool *arena, SECItem *src) +ocsp_DecodeBasicOCSPResponse(PLArenaPool *arena, SECItem *src) { void *mark; ocspBasicOCSPResponse *basicResponse; @@ -2558,7 +2558,7 @@ ocsp_DecodeBasicOCSPResponse(PRArenaPool *arena, SECItem *src) * leaving the resulting translated/decoded information in there as well. */ static SECStatus -ocsp_DecodeResponseBytes(PRArenaPool *arena, ocspResponseBytes *rbytes) +ocsp_DecodeResponseBytes(PLArenaPool *arena, ocspResponseBytes *rbytes) { PORT_Assert(rbytes != NULL); /* internal error, really */ if (rbytes == NULL) { @@ -2610,7 +2610,7 @@ ocsp_DecodeResponseBytes(PRArenaPool *arena, ocspResponseBytes *rbytes) CERTOCSPResponse * CERT_DecodeOCSPResponse(const SECItem *src) { - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; CERTOCSPResponse *response = NULL; SECStatus rv = SECFailure; ocspResponseStatus sv; @@ -3101,7 +3101,7 @@ ocsp_read(PRFileDesc *fd, char *buf, int toread, PRIntervalTime timeout) * errors. */ static SECItem * -ocsp_GetEncodedResponse(PRArenaPool *arena, PRFileDesc *sock) +ocsp_GetEncodedResponse(PLArenaPool *arena, PRFileDesc *sock) { /* first read HTTP status line and headers */ @@ -3338,7 +3338,7 @@ CERT_ParseURL(const char *url, char **pHostname, PRUint16 *pPort, char **pPath) #define MAX_WANTED_OCSP_RESPONSE_LEN 64*1024 static SECItem * -fetchOcspHttpClientV1(PRArenaPool *arena, +fetchOcspHttpClientV1(PLArenaPool *arena, const SEC_HttpClientFcnV1 *hcv1, const char *location, const SECItem *encodedRequest) @@ -3447,7 +3447,7 @@ fetchOcspHttpClientV1(PRArenaPool *arena, * Creates and sends a request to an OCSP responder, then reads and * returns the (encoded) response. * INPUTS: - * PRArenaPool *arena + * PLArenaPool *arena * Pointer to arena from which return value will be allocated. * If NULL, result will be allocated from the heap (and thus should * be freed via SECITEM_FreeItem). @@ -3461,7 +3461,7 @@ fetchOcspHttpClientV1(PRArenaPool *arena, * sent and whether there are any trusted responders in place. * const char *location * The location of the OCSP responder (a URL). - * int64 time + * PRTime time * Indicates the time for which the certificate status is to be * determined -- this may be used in the search for the cert's issuer * but has no other bearing on the operation. @@ -3489,8 +3489,8 @@ fetchOcspHttpClientV1(PRArenaPool *arena, * Other errors are low-level problems (no memory, bad database, etc.). */ SECItem * -CERT_GetEncodedOCSPResponse(PRArenaPool *arena, CERTCertList *certList, - const char *location, int64 time, +CERT_GetEncodedOCSPResponse(PLArenaPool *arena, CERTCertList *certList, + const char *location, PRTime time, PRBool addServiceLocator, CERTCertificate *signerCert, void *pwArg, CERTOCSPRequest **pRequest) @@ -3506,9 +3506,9 @@ CERT_GetEncodedOCSPResponse(PRArenaPool *arena, CERTCertList *certList, } static SECItem * -ocsp_GetEncodedOCSPResponseFromRequest(PRArenaPool *arena, +ocsp_GetEncodedOCSPResponseFromRequest(PLArenaPool *arena, CERTOCSPRequest *request, - const char *location, int64 time, + const char *location, PRTime time, PRBool addServiceLocator, void *pwArg, CERTOCSPRequest **pRequest) @@ -3570,10 +3570,10 @@ CERT_PostOCSPRequest(PLArenaPool *arena, const char *location, } static SECItem * -ocsp_GetEncodedOCSPResponseForSingleCert(PRArenaPool *arena, +ocsp_GetEncodedOCSPResponseForSingleCert(PLArenaPool *arena, CERTOCSPCertID *certID, CERTCertificate *singleCert, - const char *location, int64 time, + const char *location, PRTime time, PRBool addServiceLocator, void *pwArg, CERTOCSPRequest **pRequest) @@ -3882,7 +3882,7 @@ CERT_VerifyOCSPResponseSignature(CERTOCSPResponse *response, SECItem *tbsResponseDataDER; CERTCertificate *signerCert = NULL; SECStatus rv = SECFailure; - int64 producedAt; + PRTime producedAt; /* ocsp_DecodeBasicOCSPResponse will fail if asn1 decoder is unable * to properly decode tbsData (see the function and @@ -4210,7 +4210,7 @@ static PRBool ocsp_AuthorizedResponderForCertID(CERTCertDBHandle *handle, CERTCertificate *signerCert, CERTOCSPCertID *certID, - int64 thisUpdate) + PRTime thisUpdate) { CERTCertificate *issuerCert = NULL, *defRespCert; SECItem *keyHash = NULL; @@ -4332,10 +4332,10 @@ ocsp_AuthorizedResponderForCertID(CERTCertDBHandle *handle, #define OCSP_ALLOWABLE_LAPSE_SECONDS (24L * 60L * 60L) static PRBool -ocsp_TimeIsRecent(int64 checkTime) +ocsp_TimeIsRecent(PRTime checkTime) { - int64 now = PR_Now(); - int64 lapse, tmp; + PRTime now = PR_Now(); + PRTime lapse, tmp; LL_I2L(lapse, OCSP_ALLOWABLE_LAPSE_SECONDS); LL_I2L(tmp, PR_USEC_PER_SEC); @@ -4407,10 +4407,10 @@ static SECStatus ocsp_VerifySingleResponse(CERTOCSPSingleResponse *single, CERTCertDBHandle *handle, CERTCertificate *signerCert, - int64 producedAt) + PRTime producedAt) { CERTOCSPCertID *certID = single->certID; - int64 now, thisUpdate, nextUpdate, tmstamp, tmp; + PRTime now, thisUpdate, nextUpdate, tmstamp, tmp; SECStatus rv; OCSP_TRACE(("OCSP ocsp_VerifySingleResponse, nextUpdate: %d\n", @@ -4496,7 +4496,7 @@ CERT_GetOCSPAuthorityInfoAccessLocation(const CERTCertificate *cert) SECItem *encodedAuthInfoAccess = NULL; CERTAuthInfoAccess **authInfoAccess = NULL; char *locURI = NULL; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; SECStatus rv; int i; @@ -4650,9 +4650,9 @@ ocsp_GetResponderLocation(CERTCertDBHandle *handle, CERTCertificate *cert, * SECFailure otherwise. */ static SECStatus -ocsp_CertRevokedAfter(ocspRevokedInfo *revokedInfo, int64 time) +ocsp_CertRevokedAfter(ocspRevokedInfo *revokedInfo, PRTime time) { - int64 revokedTime; + PRTime revokedTime; SECStatus rv; rv = DER_GeneralizedTimeToTime(&revokedTime, &revokedInfo->revocationTime); @@ -4675,7 +4675,7 @@ ocsp_CertRevokedAfter(ocspRevokedInfo *revokedInfo, int64 time) * at the specified time. */ static SECStatus -ocsp_CertHasGoodStatus(ocspCertStatus *status, int64 time) +ocsp_CertHasGoodStatus(ocspCertStatus *status, PRTime time) { SECStatus rv; switch (status->certStatusType) { @@ -4701,7 +4701,7 @@ ocsp_CertHasGoodStatus(ocspCertStatus *status, int64 time) static SECStatus ocsp_SingleResponseCertHasGoodStatus(CERTOCSPSingleResponse *single, - int64 time) + PRTime time) { return ocsp_CertHasGoodStatus(single->certStatus, time); } @@ -4717,7 +4717,7 @@ ocsp_SingleResponseCertHasGoodStatus(CERTOCSPSingleResponse *single, */ SECStatus ocsp_GetCachedOCSPResponseStatusIfFresh(CERTOCSPCertID *certID, - int64 time, + PRTime time, PRBool ignoreGlobalOcspFailureSetting, SECStatus *rvOcsp, SECErrorCodes *missingResponseError) @@ -4789,7 +4789,7 @@ ocsp_FetchingFailureIsVerificationFailure(void) * XXX in the long term also need a boolean parameter that specifies * whether to check the cert chain, as well; for now we check only * the leaf (the specified certificate) - * int64 time + * PRTime time * time for which status is to be determined * void *pwArg * argument for password prompting, if needed @@ -4826,7 +4826,7 @@ ocsp_FetchingFailureIsVerificationFailure(void) */ SECStatus CERT_CheckOCSPStatus(CERTCertDBHandle *handle, CERTCertificate *cert, - int64 time, void *pwArg) + PRTime time, void *pwArg) { CERTOCSPCertID *certID; PRBool certIDWasConsumed = PR_FALSE; @@ -4880,7 +4880,7 @@ CERT_CheckOCSPStatus(CERTCertDBHandle *handle, CERTCertificate *cert, * certificate DB of the cert that is being checked * CERTCertificate *cert * the certificate being checked - * int64 time + * PRTime time * time for which status is to be determined * SECItem *encodedResponse * the DER encoded bytes of the OCSP response @@ -4893,7 +4893,7 @@ CERT_CheckOCSPStatus(CERTCertDBHandle *handle, CERTCertificate *cert, SECStatus CERT_CacheOCSPResponseFromSideChannel(CERTCertDBHandle *handle, CERTCertificate *cert, - int64 time, + PRTime time, const SECItem *encodedResponse, void *pwArg) { @@ -4980,7 +4980,7 @@ static SECStatus ocsp_GetOCSPStatusFromNetwork(CERTCertDBHandle *handle, CERTOCSPCertID *certID, CERTCertificate *cert, - int64 time, + PRTime time, void *pwArg, PRBool *certIDWasConsumed, SECStatus *rv_ocsp) @@ -5086,7 +5086,7 @@ ocsp_GetOCSPStatusFromNetwork(CERTCertDBHandle *handle, * the cert ID corresponding to |cert| * CERTCertificate *cert * the certificate being checked - * int64 time + * PRTime time * time for which status is to be determined * void *pwArg * the opaque argument to the password prompting function. @@ -5108,7 +5108,7 @@ static SECStatus ocsp_CacheEncodedOCSPResponse(CERTCertDBHandle *handle, CERTOCSPCertID *certID, CERTCertificate *cert, - int64 time, + PRTime time, void *pwArg, const SECItem *encodedResponse, PRBool cacheInvalid, @@ -5199,13 +5199,13 @@ ocsp_GetVerifiedSingleResponseForCertID(CERTCertDBHandle *handle, CERTOCSPResponse *response, CERTOCSPCertID *certID, CERTCertificate *signerCert, - int64 time, + PRTime time, CERTOCSPSingleResponse **pSingleResponse) { SECStatus rv; ocspResponseData *responseData; - int64 producedAt; + PRTime producedAt; CERTOCSPSingleResponse *single; /* @@ -5248,7 +5248,7 @@ CERT_GetOCSPStatusForCertID(CERTCertDBHandle *handle, CERTOCSPResponse *response, CERTOCSPCertID *certID, CERTCertificate *signerCert, - int64 time) + PRTime time) { /* * We do not update the cache, because: @@ -5282,7 +5282,7 @@ cert_ProcessOCSPResponse(CERTCertDBHandle *handle, CERTOCSPResponse *response, CERTOCSPCertID *certID, CERTCertificate *signerCert, - int64 time, + PRTime time, PRBool *certIDWasConsumed, SECStatus *cacheUpdateStatus) { diff --git a/lib/certhigh/ocspi.h b/lib/certhigh/ocspi.h index e792a5f529..bf2462ec6c 100644 --- a/lib/certhigh/ocspi.h +++ b/lib/certhigh/ocspi.h @@ -18,7 +18,7 @@ ocspSignature * ocsp_GetResponseSignature(CERTOCSPResponse *response); SECItem * -ocsp_DigestValue(PRArenaPool *arena, SECOidTag digestAlg, +ocsp_DigestValue(PLArenaPool *arena, SECOidTag digestAlg, SECItem *fill, const SECItem *src); PRBool @@ -37,13 +37,13 @@ ocsp_VerifyResponseSignature(CERTCertificate *signerCert, CERTOCSPRequest * cert_CreateSingleCertOCSPRequest(CERTOCSPCertID *certID, CERTCertificate *singleCert, - int64 time, + PRTime time, PRBool addServiceLocator, CERTCertificate *signerCert); SECStatus ocsp_GetCachedOCSPResponseStatusIfFresh(CERTOCSPCertID *certID, - int64 time, + PRTime time, PRBool ignoreOcspFailureMode, SECStatus *rvOcsp, SECErrorCodes *missingResponseError); @@ -63,7 +63,7 @@ ocsp_GetCachedOCSPResponseStatusIfFresh(CERTOCSPCertID *certID, * CERTCertificate *signerCert * the certificate that was used to sign the OCSP response. * must be obtained via a call to CERT_VerifyOCSPResponseSignature. - * int64 time + * PRTime time * The time at which we're checking the status for. * PRBool *certIDWasConsumed * In and Out parameter. @@ -85,7 +85,7 @@ cert_ProcessOCSPResponse(CERTCertDBHandle *handle, CERTOCSPResponse *response, CERTOCSPCertID *certID, CERTCertificate *signerCert, - int64 time, + PRTime time, PRBool *certIDWasConsumed, SECStatus *cacheUpdateStatus); diff --git a/lib/certhigh/ocspti.h b/lib/certhigh/ocspti.h index 7f0267b959..a2b3852f25 100644 --- a/lib/certhigh/ocspti.h +++ b/lib/certhigh/ocspti.h @@ -72,7 +72,7 @@ typedef struct ocspTBSRequestStr ocspTBSRequest; * An OCSPRequest; this is what is sent (encoded) to an OCSP responder. */ struct CERTOCSPRequestStr { - PRArenaPool *arena; /* local; not part of encoding */ + PLArenaPool *arena; /* local; not part of encoding */ ocspTBSRequest *tbsRequest; ocspSignature *optionalSignature; }; @@ -144,7 +144,7 @@ struct ocspSignatureStr { * XXX figure out how to get rid of that arena -- there must be a way */ struct ocspSingleRequestStr { - PRArenaPool *arena; /* just a copy of the response arena, + PLArenaPool *arena; /* just a copy of the response arena, * needed here for extension handling * routines, on creation only */ CERTOCSPCertID *reqCert; @@ -169,7 +169,7 @@ struct CERTOCSPCertIDStr { SECItem issuerSHA1KeyHash; /* keep other hashes around when */ SECItem issuerMD5KeyHash; /* we have them */ SECItem issuerMD2KeyHash; - PRArenaPool *poolp; + PLArenaPool *poolp; }; /* @@ -209,7 +209,7 @@ typedef enum { * type ocspResponseStatus. */ struct CERTOCSPResponseStr { - PRArenaPool *arena; /* local; not part of encoding */ + PLArenaPool *arena; /* local; not part of encoding */ SECItem responseStatus; /* an ENUMERATED, see above */ ocspResponseStatus statusValue; /* local; not part of encoding */ ocspResponseBytes *responseBytes; /* only when status is successful */ @@ -284,7 +284,7 @@ struct ocspResponderIDStr { * XXX figure out how to get rid of that arena -- there must be a way */ struct CERTOCSPSingleResponseStr { - PRArenaPool *arena; /* just a copy of the response arena, + PLArenaPool *arena; /* just a copy of the response arena, * needed here for extension handling * routines, on creation only */ CERTOCSPCertID *certID; diff --git a/lib/crmf/asn1cmn.c b/lib/crmf/asn1cmn.c index 763bbbb2c6..af86670663 100644 --- a/lib/crmf/asn1cmn.c +++ b/lib/crmf/asn1cmn.c @@ -115,7 +115,7 @@ const SEC_ASN1Template CMMFPOPODecKeyChallContentTemplate[] = { }; SECStatus -cmmf_decode_process_cert_response(PRArenaPool *poolp, +cmmf_decode_process_cert_response(PLArenaPool *poolp, CERTCertDBHandle *db, CMMFCertResponse *inCertResp) { @@ -158,7 +158,7 @@ cmmf_get_certorenccertchoice_from_der(SECItem *der) } static SECStatus -cmmf_decode_process_certorenccert(PRArenaPool *poolp, +cmmf_decode_process_certorenccert(PLArenaPool *poolp, CERTCertDBHandle *db, CMMFCertOrEncCert *inCertOrEncCert) { @@ -208,7 +208,7 @@ cmmf_decode_process_certorenccert(PRArenaPool *poolp, } SECStatus -cmmf_decode_process_certified_key_pair(PRArenaPool *poolp, +cmmf_decode_process_certified_key_pair(PLArenaPool *poolp, CERTCertDBHandle *db, CMMFCertifiedKeyPair *inCertKeyPair) { diff --git a/lib/crmf/challcli.c b/lib/crmf/challcli.c index c38362160a..eaff349583 100644 --- a/lib/crmf/challcli.c +++ b/lib/crmf/challcli.c @@ -13,7 +13,7 @@ CMMFPOPODecKeyChallContent* CMMF_CreatePOPODecKeyChallContentFromDER(const char *buf, long len) { - PRArenaPool *poolp; + PLArenaPool *poolp; CMMFPOPODecKeyChallContent *challContent; SECStatus rv; @@ -90,7 +90,7 @@ CMMF_POPODecKeyChallContDecryptChallenge(CMMFPOPODecKeyChallContent *inChalCont, { CMMFChallenge *challenge; SECItem *decryptedRand=NULL; - PRArenaPool *poolp = NULL; + PLArenaPool *poolp = NULL; SECAlgorithmID *owf; SECStatus rv = SECFailure; SECOidTag tag; @@ -204,7 +204,7 @@ CMMF_EncodePOPODecKeyRespContent(long *inDecodedRand, CRMFEncoderOutputCallback inCallback, void *inArg) { - PRArenaPool *poolp; + PLArenaPool *poolp; CMMFPOPODecKeyRespContent *response; SECItem *currItem; SECStatus rv=SECFailure; diff --git a/lib/crmf/cmmfasn1.c b/lib/crmf/cmmfasn1.c index e1890799c9..711d4ab15f 100644 --- a/lib/crmf/cmmfasn1.c +++ b/lib/crmf/cmmfasn1.c @@ -52,7 +52,7 @@ CMMF_EncodePOPODecKeyChallContent(CMMFPOPODecKeyChallContent *inDecKeyChall, CMMFPOPODecKeyRespContent* CMMF_CreatePOPODecKeyRespContentFromDER(const char *buf, long len) { - PRArenaPool *poolp; + PLArenaPool *poolp; CMMFPOPODecKeyRespContent *decKeyResp; SECStatus rv; @@ -92,7 +92,7 @@ CMMFKeyRecRepContent* CMMF_CreateKeyRecRepContentFromDER(CERTCertDBHandle *db, const char *buf, long len) { - PRArenaPool *poolp; + PLArenaPool *poolp; CMMFKeyRecRepContent *keyRecContent; SECStatus rv; diff --git a/lib/crmf/cmmfchal.c b/lib/crmf/cmmfchal.c index 4e75ea51ff..8f7b2982a3 100644 --- a/lib/crmf/cmmfchal.c +++ b/lib/crmf/cmmfchal.c @@ -14,7 +14,7 @@ #include "keyhi.h" static int -cmmf_create_witness_and_challenge(PRArenaPool *poolp, +cmmf_create_witness_and_challenge(PLArenaPool *poolp, CMMFChallenge *challenge, long inRandom, SECItem *senderDER, @@ -126,7 +126,7 @@ cmmf_create_first_challenge(CMMFPOPODecKeyChallContent *challContent, SECOidData *oidData; CMMFChallenge *challenge; SECAlgorithmID *algId; - PRArenaPool *poolp; + PLArenaPool *poolp; SECStatus rv; oidData = SECOID_FindOIDByTag(SEC_OID_SHA1); @@ -156,7 +156,7 @@ cmmf_create_first_challenge(CMMFPOPODecKeyChallContent *challContent, CMMFPOPODecKeyChallContent* CMMF_CreatePOPODecKeyChallContent (void) { - PRArenaPool *poolp; + PLArenaPool *poolp; CMMFPOPODecKeyChallContent *challContent; poolp = PORT_NewArena(CRMF_DEFAULT_ARENA_SIZE); @@ -181,7 +181,7 @@ CMMF_POPODecKeyChallContentSetNextChallenge void *passwdArg) { CMMFChallenge *curChallenge; - PRArenaPool *genNamePool = NULL, *poolp; + PLArenaPool *genNamePool = NULL, *poolp; SECStatus rv; SECItem *genNameDER; void *mark; diff --git a/lib/crmf/cmmfi.h b/lib/crmf/cmmfi.h index 90fb556632..bfe3cb02bc 100644 --- a/lib/crmf/cmmfi.h +++ b/lib/crmf/cmmfi.h @@ -33,15 +33,15 @@ extern const SEC_ASN1Template CMMFCertifiedKeyPairTemplate[]; * implementation. */ -extern SECStatus cmmf_CopyCertResponse (PRArenaPool *poolp, +extern SECStatus cmmf_CopyCertResponse (PLArenaPool *poolp, CMMFCertResponse *dest, CMMFCertResponse *src); -extern SECStatus cmmf_CopyPKIStatusInfo (PRArenaPool *poolp, +extern SECStatus cmmf_CopyPKIStatusInfo (PLArenaPool *poolp, CMMFPKIStatusInfo *dest, CMMFPKIStatusInfo *src); -extern SECStatus cmmf_CopyCertifiedKeyPair(PRArenaPool *poolp, +extern SECStatus cmmf_CopyCertifiedKeyPair(PLArenaPool *poolp, CMMFCertifiedKeyPair *dest, CMMFCertifiedKeyPair *src); @@ -52,16 +52,16 @@ extern SECStatus cmmf_DestroyCertOrEncCert(CMMFCertOrEncCert *certOrEncCert, PRBool freeit); extern SECStatus cmmf_PKIStatusInfoSetStatus(CMMFPKIStatusInfo *statusInfo, - PRArenaPool *poolp, + PLArenaPool *poolp, CMMFPKIStatus inStatus); extern SECStatus cmmf_ExtractCertsFromList(CERTCertList *inCertList, - PRArenaPool *poolp, + PLArenaPool *poolp, CERTCertificate ***certArray); extern SECStatus cmmf_CertOrEncCertSetCertificate(CMMFCertOrEncCert *certOrEncCert, - PRArenaPool *poolp, + PLArenaPool *poolp, CERTCertificate *inCert); extern CMMFPKIStatus @@ -75,12 +75,12 @@ cmmf_CertOrEncCertGetCertificate(CMMFCertOrEncCert *certOrEncCert, CERTCertDBHandle *certdb); extern SECStatus -cmmf_decode_process_cert_response(PRArenaPool *poolp, +cmmf_decode_process_cert_response(PLArenaPool *poolp, CERTCertDBHandle *db, CMMFCertResponse *inCertResp); extern SECStatus -cmmf_decode_process_certified_key_pair(PRArenaPool *poolp, +cmmf_decode_process_certified_key_pair(PLArenaPool *poolp, CERTCertDBHandle *db, CMMFCertifiedKeyPair *inCertKeyPair); @@ -89,7 +89,7 @@ cmmf_user_encode(void *src, CRMFEncoderOutputCallback inCallback, void *inArg, const SEC_ASN1Template *inTemplate); extern SECStatus -cmmf_copy_secitem (PRArenaPool *poolp, SECItem *dest, SECItem *src); +cmmf_copy_secitem (PLArenaPool *poolp, SECItem *dest, SECItem *src); #endif /*_CMMFI_H_*/ diff --git a/lib/crmf/cmmfit.h b/lib/crmf/cmmfit.h index 8a166764e5..84f81c3d61 100644 --- a/lib/crmf/cmmfit.h +++ b/lib/crmf/cmmfit.h @@ -70,7 +70,7 @@ struct CMMFCertResponseStr { struct CMMFCertRepContentStr { CERTCertificate **caPubs; CMMFCertResponse **response; - PRArenaPool *poolp; + PLArenaPool *poolp; PRBool isDecoded; }; @@ -91,14 +91,14 @@ struct CMMFRandStr { struct CMMFPOPODecKeyChallContentStr { CMMFChallenge **challenges; - PRArenaPool *poolp; + PLArenaPool *poolp; int numChallenges; int numAllocated; }; struct CMMFPOPODecKeyRespContentStr { SECItem **responses; - PRArenaPool *poolp; + PLArenaPool *poolp; }; struct CMMFKeyRecRepContentStr { @@ -106,7 +106,7 @@ struct CMMFKeyRecRepContentStr { CERTCertificate *newSigCert; CERTCertificate **caCerts; CMMFCertifiedKeyPair **keyPairHist; - PRArenaPool *poolp; + PLArenaPool *poolp; int numKeyPairs; int allocKeyPairs; PRBool isDecoded; diff --git a/lib/crmf/cmmfrec.c b/lib/crmf/cmmfrec.c index fab289b8e9..880e846f05 100644 --- a/lib/crmf/cmmfrec.c +++ b/lib/crmf/cmmfrec.c @@ -16,7 +16,7 @@ CMMFKeyRecRepContent* CMMF_CreateKeyRecRepContent(void) { - PRArenaPool *poolp; + PLArenaPool *poolp; CMMFKeyRecRepContent *keyRecContent; poolp = PORT_NewArena(CRMF_DEFAULT_ARENA_SIZE); @@ -122,7 +122,7 @@ CMMF_KeyRecRepContentSetCertifiedKeyPair(CMMFKeyRecRepContent *inKeyRecRep, { CMMFCertifiedKeyPair *keyPair; CRMFEncryptedValue *dummy; - PRArenaPool *poolp; + PLArenaPool *poolp; void *mark; SECStatus rv; diff --git a/lib/crmf/cmmfresp.c b/lib/crmf/cmmfresp.c index a0ec49903f..420bbe4db8 100644 --- a/lib/crmf/cmmfresp.c +++ b/lib/crmf/cmmfresp.c @@ -19,7 +19,7 @@ CMMFCertRepContent* CMMF_CreateCertRepContent(void) { CMMFCertRepContent *retCertRep; - PRArenaPool *poolp; + PLArenaPool *poolp; poolp = PORT_NewArena(CRMF_DEFAULT_ARENA_SIZE); if (poolp == NULL) { @@ -40,7 +40,7 @@ CMMF_CreateCertRepContent(void) SECStatus cmmf_CertOrEncCertSetCertificate(CMMFCertOrEncCert *certOrEncCert, - PRArenaPool *poolp, + PLArenaPool *poolp, CERTCertificate *inCert) { SECItem *derDest = NULL; @@ -80,7 +80,7 @@ cmmf_CertOrEncCertSetCertificate(CMMFCertOrEncCert *certOrEncCert, SECStatus cmmf_ExtractCertsFromList(CERTCertList *inCertList, - PRArenaPool *poolp, + PLArenaPool *poolp, CERTCertificate ***certArray) { CERTCertificate **arrayLocalCopy; @@ -124,7 +124,7 @@ CMMF_CertRepContentSetCertResponses(CMMFCertRepContent *inCertRepContent, CMMFCertResponse **inCertResponses, int inNumResponses) { - PRArenaPool *poolp; + PLArenaPool *poolp; CMMFCertResponse **respArr, *newResp; void *mark; SECStatus rv; @@ -243,7 +243,7 @@ SECStatus CMMF_CertRepContentSetCAPubs(CMMFCertRepContent *inCertRepContent, CERTCertList *inCAPubs) { - PRArenaPool *poolp; + PLArenaPool *poolp; void *mark; SECStatus rv; diff --git a/lib/crmf/crmfcont.c b/lib/crmf/crmfcont.c index c5ba5a897c..cc386ea30c 100644 --- a/lib/crmf/crmfcont.c +++ b/lib/crmf/crmfcont.c @@ -31,7 +31,7 @@ crmf_add_new_control(CRMFCertRequest *inCertReq,SECOidTag inTag, { SECOidData *oidData; SECStatus rv; - PRArenaPool *poolp; + PLArenaPool *poolp; int numControls = 0; CRMFControl *newControl; CRMFControl **controls; @@ -152,7 +152,7 @@ CRMF_DestroyEncryptedValue(CRMFEncryptedValue *inEncrValue) } SECStatus -crmf_copy_encryptedvalue_secalg(PRArenaPool *poolp, +crmf_copy_encryptedvalue_secalg(PLArenaPool *poolp, SECAlgorithmID *srcAlgId, SECAlgorithmID **destAlgId) { @@ -178,7 +178,7 @@ crmf_copy_encryptedvalue_secalg(PRArenaPool *poolp, } SECStatus -crmf_copy_encryptedvalue(PRArenaPool *poolp, +crmf_copy_encryptedvalue(PLArenaPool *poolp, CRMFEncryptedValue *srcValue, CRMFEncryptedValue *destValue) { @@ -241,7 +241,7 @@ crmf_copy_encryptedvalue(PRArenaPool *poolp, } SECStatus -crmf_copy_encryptedkey(PRArenaPool *poolp, +crmf_copy_encryptedkey(PLArenaPool *poolp, CRMFEncryptedKey *srcEncrKey, CRMFEncryptedKey *destEncrKey) { @@ -605,7 +605,7 @@ crmf_decode_params(SECItem *inParams) { SECItem *params; SECStatus rv = SECFailure; - PRArenaPool *poolp; + PLArenaPool *poolp; poolp = PORT_NewArena(CRMF_DEFAULT_ARENA_SIZE); if (poolp == NULL) { @@ -641,7 +641,7 @@ crmf_get_key_size_from_mech(CK_MECHANISM_TYPE mechType) } SECStatus -crmf_encrypted_value_unwrap_priv_key(PRArenaPool *poolp, +crmf_encrypted_value_unwrap_priv_key(PLArenaPool *poolp, CRMFEncryptedValue *encValue, SECKEYPrivateKey *privKey, SECKEYPublicKey *newPubKey, @@ -900,7 +900,7 @@ CRMF_DestroyEncryptedKey(CRMFEncryptedKey *inEncrKey) } SECStatus -crmf_copy_pkiarchiveoptions(PRArenaPool *poolp, +crmf_copy_pkiarchiveoptions(PLArenaPool *poolp, CRMFPKIArchiveOptions *destOpt, CRMFPKIArchiveOptions *srcOpt) { @@ -1009,7 +1009,7 @@ crmf_get_pkiarchiveoptions_subtemplate(CRMFControl *inControl) } static SECStatus -crmf_encode_pkiarchiveoptions(PRArenaPool *poolp, CRMFControl *inControl) +crmf_encode_pkiarchiveoptions(PLArenaPool *poolp, CRMFControl *inControl) { const SEC_ASN1Template *asn1Template; @@ -1034,7 +1034,7 @@ CRMF_CertRequestSetPKIArchiveOptions(CRMFCertRequest *inCertReq, CRMFPKIArchiveOptions *inOptions) { CRMFControl *newControl; - PRArenaPool *poolp; + PLArenaPool *poolp; SECStatus rv; void *mark; diff --git a/lib/crmf/crmfdec.c b/lib/crmf/crmfdec.c index cfc2fbfdc3..6be165fa72 100644 --- a/lib/crmf/crmfdec.c +++ b/lib/crmf/crmfdec.c @@ -163,7 +163,7 @@ static SECStatus crmf_decode_process_pop(CRMFCertReqMsg *inCertReqMsg) { SECItem *derPOP; - PRArenaPool *poolp; + PLArenaPool *poolp; CRMFProofOfPossession *pop; void *mark; SECStatus rv; @@ -217,7 +217,7 @@ crmf_decode_process_pop(CRMFCertReqMsg *inCertReqMsg) } static SECStatus -crmf_decode_process_single_control(PRArenaPool *poolp, +crmf_decode_process_single_control(PLArenaPool *poolp, CRMFControl *inControl) { const SEC_ASN1Template *asn1Template = NULL; @@ -245,7 +245,7 @@ crmf_decode_process_controls(CRMFCertReqMsg *inCertReqMsg) { int i, numControls; SECStatus rv; - PRArenaPool *poolp; + PLArenaPool *poolp; CRMFControl **controls; numControls = CRMF_CertRequestGetNumControls(inCertReqMsg->certReq); @@ -285,7 +285,7 @@ crmf_decode_process_single_reqmsg(CRMFCertReqMsg *inCertReqMsg) CRMFCertReqMsg* CRMF_CreateCertReqMsgFromDER (const char * buf, long len) { - PRArenaPool *poolp; + PLArenaPool *poolp; CRMFCertReqMsg *certReqMsg; SECStatus rv; @@ -322,7 +322,7 @@ CRMF_CreateCertReqMessagesFromDER(const char *buf, long len) long arenaSize; int i; SECStatus rv; - PRArenaPool *poolp; + PLArenaPool *poolp; CRMFCertReqMessages *certReqMsgs; PORT_Assert (buf != NULL); diff --git a/lib/crmf/crmfget.c b/lib/crmf/crmfget.c index a2d1dd28e1..4886cda9b3 100644 --- a/lib/crmf/crmfget.c +++ b/lib/crmf/crmfget.c @@ -37,7 +37,7 @@ crmf_destroy_validity(CRMFOptionalValidity *inValidity, PRBool freeit) } static SECStatus -crmf_copy_cert_request_validity(PRArenaPool *poolp, +crmf_copy_cert_request_validity(PLArenaPool *poolp, CRMFOptionalValidity **destValidity, CRMFOptionalValidity *srcValidity) { @@ -73,7 +73,7 @@ crmf_copy_cert_request_validity(PRArenaPool *poolp, } static SECStatus -crmf_copy_extensions(PRArenaPool *poolp, +crmf_copy_extensions(PLArenaPool *poolp, CRMFCertTemplate *destTemplate, CRMFCertExtension **srcExt) { @@ -119,7 +119,7 @@ crmf_copy_extensions(PRArenaPool *poolp, } static SECStatus -crmf_copy_cert_request_template(PRArenaPool *poolp, +crmf_copy_cert_request_template(PLArenaPool *poolp, CRMFCertTemplate *destTemplate, CRMFCertTemplate *srcTemplate) { @@ -201,7 +201,7 @@ crmf_copy_cert_request_template(PRArenaPool *poolp, } static CRMFControl* -crmf_copy_control(PRArenaPool *poolp, CRMFControl *srcControl) +crmf_copy_control(PLArenaPool *poolp, CRMFControl *srcControl) { CRMFControl *newControl; SECStatus rv; @@ -246,7 +246,7 @@ crmf_copy_control(PRArenaPool *poolp, CRMFControl *srcControl) } static SECStatus -crmf_copy_cert_request_controls(PRArenaPool *poolp, +crmf_copy_cert_request_controls(PLArenaPool *poolp, CRMFCertRequest *destReq, CRMFCertRequest *srcReq) { @@ -285,7 +285,7 @@ crmf_copy_cert_request_controls(PRArenaPool *poolp, CRMFCertRequest* -crmf_copy_cert_request(PRArenaPool *poolp, CRMFCertRequest *srcReq) +crmf_copy_cert_request(PLArenaPool *poolp, CRMFCertRequest *srcReq) { CRMFCertRequest *newReq = NULL; SECStatus rv; @@ -338,7 +338,7 @@ CRMF_DestroyGetValidity(CRMFGetValidity *inValidity) } SECStatus -crmf_make_bitstring_copy(PRArenaPool *arena, SECItem *dest, SECItem *src) +crmf_make_bitstring_copy(PLArenaPool *arena, SECItem *dest, SECItem *src) { int origLenBits; int bytesToCopy; diff --git a/lib/crmf/crmfi.h b/lib/crmf/crmfi.h index fcde0aca19..0dc9b4986a 100644 --- a/lib/crmf/crmfi.h +++ b/lib/crmf/crmfi.h @@ -108,12 +108,12 @@ extern const unsigned char hexFalse; /* * Prototypes for helper routines used internally by multiple files. */ -extern SECStatus crmf_encode_integer(PRArenaPool *poolp, SECItem *dest, +extern SECStatus crmf_encode_integer(PLArenaPool *poolp, SECItem *dest, long value); -extern SECStatus crmf_make_bitstring_copy(PRArenaPool *arena, SECItem *dest, +extern SECStatus crmf_make_bitstring_copy(PLArenaPool *arena, SECItem *dest, SECItem *src); -extern SECStatus crmf_copy_pkiarchiveoptions(PRArenaPool *poolp, +extern SECStatus crmf_copy_pkiarchiveoptions(PLArenaPool *poolp, CRMFPKIArchiveOptions *destOpt, CRMFPKIArchiveOptions *srcOpt); extern SECStatus @@ -122,36 +122,36 @@ extern SECStatus extern const SEC_ASN1Template* crmf_get_pkiarchiveoptions_subtemplate(CRMFControl *inControl); -extern SECStatus crmf_copy_encryptedkey(PRArenaPool *poolp, +extern SECStatus crmf_copy_encryptedkey(PLArenaPool *poolp, CRMFEncryptedKey *srcEncrKey, CRMFEncryptedKey *destEncrKey); extern SECStatus -crmf_copy_encryptedvalue(PRArenaPool *poolp, +crmf_copy_encryptedvalue(PLArenaPool *poolp, CRMFEncryptedValue *srcValue, CRMFEncryptedValue *destValue); extern SECStatus -crmf_copy_encryptedvalue_secalg(PRArenaPool *poolp, +crmf_copy_encryptedvalue_secalg(PLArenaPool *poolp, SECAlgorithmID *srcAlgId, SECAlgorithmID **destAlgId); -extern SECStatus crmf_template_copy_secalg(PRArenaPool *poolp, +extern SECStatus crmf_template_copy_secalg(PLArenaPool *poolp, SECAlgorithmID **dest, SECAlgorithmID *src); -extern SECStatus crmf_copy_cert_name(PRArenaPool *poolp, CERTName **dest, +extern SECStatus crmf_copy_cert_name(PLArenaPool *poolp, CERTName **dest, CERTName *src); -extern SECStatus crmf_template_add_public_key(PRArenaPool *poolp, +extern SECStatus crmf_template_add_public_key(PLArenaPool *poolp, CERTSubjectPublicKeyInfo **dest, CERTSubjectPublicKeyInfo *pubKey); -extern CRMFCertExtension* crmf_create_cert_extension(PRArenaPool *poolp, +extern CRMFCertExtension* crmf_create_cert_extension(PLArenaPool *poolp, SECOidTag tag, PRBool isCritical, SECItem *data); extern CRMFCertRequest* -crmf_copy_cert_request(PRArenaPool *poolp, CRMFCertRequest *srcReq); +crmf_copy_cert_request(PLArenaPool *poolp, CRMFCertRequest *srcReq); extern SECStatus crmf_destroy_encrypted_value(CRMFEncryptedValue *inEncrValue, PRBool freeit); @@ -165,7 +165,7 @@ extern CK_MECHANISM_TYPE crmf_get_mechanism_from_public_key(SECKEYPublicKey *inPubKey); extern SECStatus -crmf_encrypted_value_unwrap_priv_key(PRArenaPool *poolp, +crmf_encrypted_value_unwrap_priv_key(PLArenaPool *poolp, CRMFEncryptedValue *encValue, SECKEYPrivateKey *privKey, SECKEYPublicKey *newPubKey, @@ -179,7 +179,7 @@ extern SECItem* crmf_get_public_value(SECKEYPublicKey *pubKey, SECItem *dest); extern CRMFCertExtension* -crmf_copy_cert_extension(PRArenaPool *poolp, CRMFCertExtension *inExtension); +crmf_copy_cert_extension(PLArenaPool *poolp, CRMFCertExtension *inExtension); extern SECStatus crmf_create_prtime(SECItem *src, PRTime **dest); diff --git a/lib/crmf/crmfit.h b/lib/crmf/crmfit.h index 531d4467d1..a8defcd49d 100644 --- a/lib/crmf/crmfit.h +++ b/lib/crmf/crmfit.h @@ -9,7 +9,7 @@ struct CRMFCertReqMessagesStr { CRMFCertReqMsg **messages; - PRArenaPool *poolp; + PLArenaPool *poolp; }; struct CRMFCertExtensionStr { @@ -107,7 +107,7 @@ struct CRMFCertRequestStr { /* The following members are used by the internal implementation, but * are not part of the encoding. */ - PRArenaPool *poolp; + PLArenaPool *poolp; PRUint32 requestID; /* This is the value that will be encoded into * the certReqId field. */ @@ -125,7 +125,7 @@ struct CRMFCertReqMsgStr { SECItem derPOP; /* This arena will be used for allocating memory when decoding. */ - PRArenaPool *poolp; + PLArenaPool *poolp; PRBool isDecoded; }; diff --git a/lib/crmf/crmfpop.c b/lib/crmf/crmfpop.c index 1ffb03bdbc..78381bf79e 100644 --- a/lib/crmf/crmfpop.c +++ b/lib/crmf/crmfpop.c @@ -35,7 +35,7 @@ CRMF_CertReqMsgSetRAVerifiedPOP(CRMFCertReqMsg *inCertReqMsg) { SECItem *dummy; CRMFProofOfPossession *pop; - PRArenaPool *poolp; + PLArenaPool *poolp; void *mark; PORT_Assert(inCertReqMsg != NULL && inCertReqMsg->pop == NULL); @@ -73,7 +73,7 @@ crmf_get_key_sign_tag(SECKEYPublicKey *inPubKey) } static SECAlgorithmID* -crmf_create_poposignkey_algid(PRArenaPool *poolp, +crmf_create_poposignkey_algid(PLArenaPool *poolp, SECKEYPublicKey *inPubKey) { SECAlgorithmID *algID; @@ -102,7 +102,7 @@ crmf_create_poposignkey_algid(PRArenaPool *poolp, } static CRMFPOPOSigningKeyInput* -crmf_create_poposigningkeyinput(PRArenaPool *poolp, CERTCertificate *inCert, +crmf_create_poposigningkeyinput(PLArenaPool *poolp, CERTCertificate *inCert, CRMFMACPasswordCallback fn, void *arg) { /* PSM isn't going to do this, so we'll fail here for now.*/ @@ -147,7 +147,7 @@ crmf_encode_certreq(CRMFCertRequest *inCertReq, SECItem *derDest) } static SECStatus -crmf_sign_certreq(PRArenaPool *poolp, +crmf_sign_certreq(PLArenaPool *poolp, CRMFPOPOSigningKey *crmfSignKey, CRMFCertRequest *certReq, SECKEYPrivateKey *inKey, @@ -183,7 +183,7 @@ crmf_sign_certreq(PRArenaPool *poolp, } static SECStatus -crmf_create_poposignkey(PRArenaPool *poolp, +crmf_create_poposignkey(PLArenaPool *poolp, CRMFCertReqMsg *inCertReqMsg, CRMFPOPOSigningKeyInput *signKeyInput, SECKEYPrivateKey *inPrivKey, @@ -228,7 +228,7 @@ CRMF_CertReqMsgSetSignaturePOP(CRMFCertReqMsg *inCertReqMsg, void *arg) { SECAlgorithmID *algID; - PRArenaPool *poolp; + PLArenaPool *poolp; SECItem derTemp = {siBuffer, NULL, 0}; void *mark; SECStatus rv; @@ -320,7 +320,7 @@ crmf_get_popoprivkey_subtemplate(CRMFPOPOPrivKey *inPrivKey) } static SECStatus -crmf_encode_popoprivkey(PRArenaPool *poolp, +crmf_encode_popoprivkey(PLArenaPool *poolp, CRMFCertReqMsg *inCertReqMsg, CRMFPOPOPrivKey *popoPrivKey, const SEC_ASN1Template *privKeyTemplate) @@ -394,7 +394,7 @@ static SECStatus crmf_add_privkey_thismessage(CRMFCertReqMsg *inCertReqMsg, SECItem *encPrivKey, CRMFPOPChoice inChoice) { - PRArenaPool *poolp; + PLArenaPool *poolp; void *mark; CRMFPOPOPrivKey *popoPrivKey; CRMFProofOfPossession *pop; @@ -441,7 +441,7 @@ static SECStatus crmf_add_privkey_dhmac(CRMFCertReqMsg *inCertReqMsg, SECItem *dhmac, CRMFPOPChoice inChoice) { - PRArenaPool *poolp; + PLArenaPool *poolp; void *mark; CRMFPOPOPrivKey *popoPrivKey; CRMFProofOfPossession *pop; @@ -484,7 +484,7 @@ crmf_add_privkey_subseqmessage(CRMFCertReqMsg *inCertReqMsg, CRMFPOPChoice inChoice) { void *mark; - PRArenaPool *poolp; + PLArenaPool *poolp; CRMFProofOfPossession *pop; CRMFPOPOPrivKey *popoPrivKey; SECStatus rv; diff --git a/lib/crmf/crmfreq.c b/lib/crmf/crmfreq.c index 5ccc7a0a55..7da81cdbf4 100644 --- a/lib/crmf/crmfreq.c +++ b/lib/crmf/crmfreq.c @@ -19,7 +19,7 @@ const unsigned char hexFalse = 0x00; SECStatus -crmf_encode_integer(PRArenaPool *poolp, SECItem *dest, long value) +crmf_encode_integer(PLArenaPool *poolp, SECItem *dest, long value) { SECItem *dummy; @@ -32,7 +32,7 @@ crmf_encode_integer(PRArenaPool *poolp, SECItem *dest, long value) } SECStatus -crmf_encode_unsigned_integer(PRArenaPool *poolp, SECItem *dest, +crmf_encode_unsigned_integer(PLArenaPool *poolp, SECItem *dest, unsigned long value) { SECItem *dummy; @@ -46,7 +46,7 @@ crmf_encode_unsigned_integer(PRArenaPool *poolp, SECItem *dest, } static SECStatus -crmf_copy_secitem (PRArenaPool *poolp, SECItem *dest, SECItem *src) +crmf_copy_secitem (PLArenaPool *poolp, SECItem *dest, SECItem *src) { return SECITEM_CopyItem (poolp, dest, src); } @@ -88,7 +88,7 @@ CRMF_DoesRequestHaveField (CRMFCertRequest *inCertReq, CRMFCertRequest * CRMF_CreateCertRequest (PRUint32 inRequestID) { - PRArenaPool *poolp; + PLArenaPool *poolp; CRMFCertRequest *certReq; SECStatus rv; @@ -142,19 +142,19 @@ CRMF_DestroyCertRequest(CRMFCertRequest *inCertReq) } static SECStatus -crmf_template_add_version(PRArenaPool *poolp, SECItem *dest, long version) +crmf_template_add_version(PLArenaPool *poolp, SECItem *dest, long version) { return (crmf_encode_integer(poolp, dest, version)); } static SECStatus -crmf_template_add_serialnumber(PRArenaPool *poolp, SECItem *dest, long serial) +crmf_template_add_serialnumber(PLArenaPool *poolp, SECItem *dest, long serial) { return (crmf_encode_integer(poolp, dest, serial)); } SECStatus -crmf_template_copy_secalg (PRArenaPool *poolp, SECAlgorithmID **dest, +crmf_template_copy_secalg (PLArenaPool *poolp, SECAlgorithmID **dest, SECAlgorithmID* src) { SECStatus rv; @@ -189,7 +189,7 @@ crmf_template_copy_secalg (PRArenaPool *poolp, SECAlgorithmID **dest, } SECStatus -crmf_copy_cert_name(PRArenaPool *poolp, CERTName **dest, +crmf_copy_cert_name(PLArenaPool *poolp, CERTName **dest, CERTName *src) { CERTName *newName; @@ -215,7 +215,7 @@ crmf_copy_cert_name(PRArenaPool *poolp, CERTName **dest, } static SECStatus -crmf_template_add_issuer (PRArenaPool *poolp, CERTName **dest, +crmf_template_add_issuer (PLArenaPool *poolp, CERTName **dest, CERTName* issuerName) { return crmf_copy_cert_name(poolp, dest, issuerName); @@ -223,7 +223,7 @@ crmf_template_add_issuer (PRArenaPool *poolp, CERTName **dest, static SECStatus -crmf_template_add_validity (PRArenaPool *poolp, CRMFOptionalValidity **dest, +crmf_template_add_validity (PLArenaPool *poolp, CRMFOptionalValidity **dest, CRMFValidityCreationInfo *info) { SECStatus rv; @@ -263,14 +263,14 @@ crmf_template_add_validity (PRArenaPool *poolp, CRMFOptionalValidity **dest, } static SECStatus -crmf_template_add_subject (PRArenaPool *poolp, CERTName **dest, +crmf_template_add_subject (PLArenaPool *poolp, CERTName **dest, CERTName *subject) { return crmf_copy_cert_name(poolp, dest, subject); } SECStatus -crmf_template_add_public_key(PRArenaPool *poolp, +crmf_template_add_public_key(PLArenaPool *poolp, CERTSubjectPublicKeyInfo **dest, CERTSubjectPublicKeyInfo *pubKey) { @@ -297,7 +297,7 @@ crmf_template_add_public_key(PRArenaPool *poolp, } static SECStatus -crmf_copy_bitstring (PRArenaPool *poolp, SECItem *dest, const SECItem *src) +crmf_copy_bitstring (PLArenaPool *poolp, SECItem *dest, const SECItem *src) { SECStatus rv; SECItem byteSrc; @@ -310,14 +310,14 @@ crmf_copy_bitstring (PRArenaPool *poolp, SECItem *dest, const SECItem *src) } static SECStatus -crmf_template_add_issuer_uid(PRArenaPool *poolp, SECItem *dest, +crmf_template_add_issuer_uid(PLArenaPool *poolp, SECItem *dest, const SECItem *issuerUID) { return crmf_copy_bitstring (poolp, dest, issuerUID); } static SECStatus -crmf_template_add_subject_uid(PRArenaPool *poolp, SECItem *dest, +crmf_template_add_subject_uid(PLArenaPool *poolp, SECItem *dest, const SECItem *subjectUID) { return crmf_copy_bitstring (poolp, dest, subjectUID); @@ -341,7 +341,7 @@ crmf_zeroize_new_extensions (CRMFCertExtension **extensions, * structure that owns this template. */ static SECStatus -crmf_template_add_extensions(PRArenaPool *poolp, CRMFCertTemplate *inTemplate, +crmf_template_add_extensions(PLArenaPool *poolp, CRMFCertTemplate *inTemplate, CRMFCertExtCreationInfo *extensions) { void *mark; @@ -404,7 +404,7 @@ CRMF_CertRequestSetTemplateField(CRMFCertRequest *inCertReq, void *data) { CRMFCertTemplate *certTemplate; - PRArenaPool *poolp; + PLArenaPool *poolp; SECStatus rv = SECFailure; void *mark; @@ -484,7 +484,7 @@ CRMF_CertReqMsgSetCertRequest (CRMFCertReqMsg *inCertReqMsg, CRMFCertReqMsg* CRMF_CreateCertReqMsg(void) { - PRArenaPool *poolp; + PLArenaPool *poolp; CRMFCertReqMsg *reqMsg; poolp = PORT_NewArena(CRMF_DEFAULT_ARENA_SIZE); @@ -522,7 +522,7 @@ CRMF_DestroyCertReqMsg(CRMFCertReqMsg *inCertReqMsg) } CRMFCertExtension* -crmf_create_cert_extension(PRArenaPool *poolp, +crmf_create_cert_extension(PLArenaPool *poolp, SECOidTag id, PRBool isCritical, SECItem *data) diff --git a/lib/crmf/respcli.c b/lib/crmf/respcli.c index f6c94931c4..653bd8a61c 100644 --- a/lib/crmf/respcli.c +++ b/lib/crmf/respcli.c @@ -22,7 +22,7 @@ CMMFCertRepContent* CMMF_CreateCertRepContentFromDER(CERTCertDBHandle *db, const char *buf, long len) { - PRArenaPool *poolp; + PLArenaPool *poolp; CMMFCertRepContent *certRepContent; SECStatus rv; int i; diff --git a/lib/crmf/respcmn.c b/lib/crmf/respcmn.c index c9be9cf490..1353d367ec 100644 --- a/lib/crmf/respcmn.c +++ b/lib/crmf/respcmn.c @@ -99,7 +99,7 @@ crmf_create_prtime(SECItem *src, PRTime **dest) } CRMFCertExtension* -crmf_copy_cert_extension(PRArenaPool *poolp, CRMFCertExtension *inExtension) +crmf_copy_cert_extension(PLArenaPool *poolp, CRMFCertExtension *inExtension) { PRBool isCritical; SECOidTag id; @@ -214,7 +214,7 @@ cmmf_DestroyCertOrEncCert(CMMFCertOrEncCert *certOrEncCert, PRBool freeit) } SECStatus -cmmf_copy_secitem (PRArenaPool *poolp, SECItem *dest, SECItem *src) +cmmf_copy_secitem (PLArenaPool *poolp, SECItem *dest, SECItem *src) { SECStatus rv; @@ -246,7 +246,7 @@ CMMF_DestroyCertifiedKeyPair(CMMFCertifiedKeyPair *inCertKeyPair) } SECStatus -cmmf_CopyCertResponse(PRArenaPool *poolp, +cmmf_CopyCertResponse(PLArenaPool *poolp, CMMFCertResponse *dest, CMMFCertResponse *src) { @@ -284,7 +284,7 @@ cmmf_CopyCertResponse(PRArenaPool *poolp, } static SECStatus -cmmf_CopyCertOrEncCert(PRArenaPool *poolp, CMMFCertOrEncCert *dest, +cmmf_CopyCertOrEncCert(PLArenaPool *poolp, CMMFCertOrEncCert *dest, CMMFCertOrEncCert *src) { SECStatus rv = SECSuccess; @@ -318,7 +318,7 @@ cmmf_CopyCertOrEncCert(PRArenaPool *poolp, CMMFCertOrEncCert *dest, } SECStatus -cmmf_CopyCertifiedKeyPair(PRArenaPool *poolp, CMMFCertifiedKeyPair *dest, +cmmf_CopyCertifiedKeyPair(PLArenaPool *poolp, CMMFCertifiedKeyPair *dest, CMMFCertifiedKeyPair *src) { SECStatus rv; @@ -353,7 +353,7 @@ cmmf_CopyCertifiedKeyPair(PRArenaPool *poolp, CMMFCertifiedKeyPair *dest, } SECStatus -cmmf_CopyPKIStatusInfo(PRArenaPool *poolp, CMMFPKIStatusInfo *dest, +cmmf_CopyPKIStatusInfo(PLArenaPool *poolp, CMMFPKIStatusInfo *dest, CMMFPKIStatusInfo *src) { SECStatus rv; @@ -385,7 +385,7 @@ cmmf_CertOrEncCertGetCertificate(CMMFCertOrEncCert *certOrEncCert, SECStatus cmmf_PKIStatusInfoSetStatus(CMMFPKIStatusInfo *statusInfo, - PRArenaPool *poolp, + PLArenaPool *poolp, CMMFPKIStatus inStatus) { SECItem *dummy; diff --git a/lib/crmf/servget.c b/lib/crmf/servget.c index d748d86f8e..757a7fe396 100644 --- a/lib/crmf/servget.c +++ b/lib/crmf/servget.c @@ -344,7 +344,7 @@ CRMF_POPOSigningKeyGetSignature(CRMFPOPOSigningKey *inSignKey) } static SECStatus -crmf_copy_poposigningkey(PRArenaPool *poolp, +crmf_copy_poposigningkey(PLArenaPool *poolp, CRMFPOPOSigningKey *inPopoSignKey, CRMFPOPOSigningKey *destPopoSignKey) { @@ -384,7 +384,7 @@ crmf_copy_poposigningkey(PRArenaPool *poolp, } static SECStatus -crmf_copy_popoprivkey(PRArenaPool *poolp, +crmf_copy_popoprivkey(PLArenaPool *poolp, CRMFPOPOPrivKey *srcPrivKey, CRMFPOPOPrivKey *destPrivKey) { @@ -415,7 +415,7 @@ crmf_copy_popoprivkey(PRArenaPool *poolp, } static CRMFProofOfPossession* -crmf_copy_pop(PRArenaPool *poolp, CRMFProofOfPossession *srcPOP) +crmf_copy_pop(PLArenaPool *poolp, CRMFProofOfPossession *srcPOP) { CRMFProofOfPossession *newPOP; SECStatus rv; @@ -468,7 +468,7 @@ static CRMFCertReqMsg* crmf_copy_cert_req_msg(CRMFCertReqMsg *srcReqMsg) { CRMFCertReqMsg *newReqMsg; - PRArenaPool *poolp; + PLArenaPool *poolp; poolp = PORT_NewArena(CRMF_DEFAULT_ARENA_SIZE); if (poolp == NULL) { @@ -536,7 +536,7 @@ CRMF_CertReqMessagesGetNumMessages(CRMFCertReqMessages *inCertReqMsgs) CRMFCertRequest* CRMF_CertReqMsgGetCertRequest(CRMFCertReqMsg *inCertReqMsg) { - PRArenaPool *poolp = NULL; + PLArenaPool *poolp = NULL; CRMFCertRequest *newCertReq = NULL; PORT_Assert(inCertReqMsg != NULL); @@ -628,7 +628,7 @@ CRMF_CertReqMsgGetPOPOSigningKey(CRMFCertReqMsg *inCertReqMsg, static SECStatus crmf_copy_name(CERTName *destName, CERTName *srcName) { - PRArenaPool *poolp = NULL; + PLArenaPool *poolp = NULL; SECStatus rv; if (destName->arena != NULL) { diff --git a/lib/cryptohi/seckey.c b/lib/cryptohi/seckey.c index 34e26bc9d6..a0c80d49df 100644 --- a/lib/cryptohi/seckey.c +++ b/lib/cryptohi/seckey.c @@ -266,7 +266,7 @@ SECKEY_DestroyPublicKey(SECKEYPublicKey *pubk) } SECStatus -SECKEY_CopySubjectPublicKeyInfo(PRArenaPool *arena, +SECKEY_CopySubjectPublicKeyInfo(PLArenaPool *arena, CERTSubjectPublicKeyInfo *to, CERTSubjectPublicKeyInfo *from) { @@ -445,7 +445,7 @@ SECKEY_UpdateCertPQG(CERTCertificate * subjectCert) * a V3 certificate data structure. */ SECStatus -SECKEY_DSADecodePQG(PRArenaPool *arena, SECKEYPublicKey *pubk, SECItem *params) { +SECKEY_DSADecodePQG(PLArenaPool *arena, SECKEYPublicKey *pubk, SECItem *params) { SECStatus rv; SECItem newparams; @@ -550,7 +550,7 @@ seckey_ExtractPublicKey(CERTSubjectPublicKeyInfo *spki) SECKEYPublicKey *pubk; SECItem os, newOs, newParms; SECStatus rv; - PRArenaPool *arena; + PLArenaPool *arena; SECOidTag tag; arena = PORT_NewArena (DER_DEFAULT_CHUNKSIZE); @@ -1026,7 +1026,7 @@ SECKEYPrivateKey * SECKEY_CopyPrivateKey(const SECKEYPrivateKey *privk) { SECKEYPrivateKey *copyk; - PRArenaPool *arena; + PLArenaPool *arena; if (!privk || !privk->pkcs11Slot) { PORT_SetError(SEC_ERROR_INVALID_ARGS); @@ -1072,7 +1072,7 @@ SECKEYPublicKey * SECKEY_CopyPublicKey(const SECKEYPublicKey *pubk) { SECKEYPublicKey *copyk; - PRArenaPool *arena; + PLArenaPool *arena; SECStatus rv = SECSuccess; arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); @@ -1157,7 +1157,7 @@ SECKEYPublicKey * SECKEY_ConvertToPublicKey(SECKEYPrivateKey *privk) { SECKEYPublicKey *pubk; - PRArenaPool *arena; + PLArenaPool *arena; CERTCertificate *cert; SECStatus rv; @@ -1216,7 +1216,7 @@ CERTSubjectPublicKeyInfo * SECKEY_CreateSubjectPublicKeyInfo(SECKEYPublicKey *pubk) { CERTSubjectPublicKeyInfo *spki; - PRArenaPool *arena; + PLArenaPool *arena; SECItem params = { siBuffer, NULL, 0 }; if (!pubk) { @@ -1346,7 +1346,7 @@ SECKEY_DestroySubjectPublicKeyInfo(CERTSubjectPublicKeyInfo *spki) SECKEYPublicKey * SECKEY_DecodeDERPublicKey(SECItem *pubkder) { - PRArenaPool *arena; + PLArenaPool *arena; SECKEYPublicKey *pubk; SECStatus rv; SECItem newPubkder; @@ -1427,7 +1427,7 @@ SECKEY_EncodeDERSubjectPublicKeyInfo(SECKEYPublicKey *pubk) CERTSubjectPublicKeyInfo * SECKEY_DecodeDERSubjectPublicKeyInfo(SECItem *spkider) { - PRArenaPool *arena; + PLArenaPool *arena; CERTSubjectPublicKeyInfo *spki; SECStatus rv; SECItem newSpkider; @@ -1492,7 +1492,7 @@ SECKEY_ConvertAndDecodePublicKeyAndChallenge(char *pkacstr, char *challenge, CERTPublicKeyAndChallenge pkac; SECStatus rv; SECItem signedItem; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; CERTSignedData sd; SECItem sig; SECKEYPublicKey *pubKey = NULL; @@ -1587,7 +1587,7 @@ void SECKEY_DestroyPrivateKeyInfo(SECKEYPrivateKeyInfo *pvk, PRBool freeit) { - PRArenaPool *poolp; + PLArenaPool *poolp; if(pvk != NULL) { if(pvk->arena) { @@ -1618,7 +1618,7 @@ void SECKEY_DestroyEncryptedPrivateKeyInfo(SECKEYEncryptedPrivateKeyInfo *epki, PRBool freeit) { - PRArenaPool *poolp; + PLArenaPool *poolp; if(epki != NULL) { if(epki->arena) { @@ -1645,7 +1645,7 @@ SECKEY_DestroyEncryptedPrivateKeyInfo(SECKEYEncryptedPrivateKeyInfo *epki, } SECStatus -SECKEY_CopyPrivateKeyInfo(PRArenaPool *poolp, +SECKEY_CopyPrivateKeyInfo(PLArenaPool *poolp, SECKEYPrivateKeyInfo *to, SECKEYPrivateKeyInfo *from) { @@ -1669,7 +1669,7 @@ SECKEY_CopyPrivateKeyInfo(PRArenaPool *poolp, } SECStatus -SECKEY_CopyEncryptedPrivateKeyInfo(PRArenaPool *poolp, +SECKEY_CopyEncryptedPrivateKeyInfo(PLArenaPool *poolp, SECKEYEncryptedPrivateKeyInfo *to, SECKEYEncryptedPrivateKeyInfo *from) { @@ -1706,7 +1706,7 @@ SECKEY_ImportDERPublicKey(SECItem *derKey, CK_KEY_TYPE type) SECKEYPublicKey *pubk = NULL; SECStatus rv = SECFailure; SECItem newDerKey; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; if (!derKey) { return NULL; @@ -1766,7 +1766,7 @@ SECKEY_ImportDERPublicKey(SECItem *derKey, CK_KEY_TYPE type) SECKEYPrivateKeyList* SECKEY_NewPrivateKeyList(void) { - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; SECKEYPrivateKeyList *ret = NULL; arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); @@ -1843,7 +1843,7 @@ SECKEY_AddPrivateKeyToListTail( SECKEYPrivateKeyList *list, SECKEYPublicKeyList* SECKEY_NewPublicKeyList(void) { - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; SECKEYPublicKeyList *ret = NULL; arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); diff --git a/lib/cryptohi/secsign.c b/lib/cryptohi/secsign.c index 301fa410fe..b93ace4fac 100644 --- a/lib/cryptohi/secsign.c +++ b/lib/cryptohi/secsign.c @@ -142,7 +142,7 @@ SGN_End(SGNContext *cx, SECItem *result) int signatureLen; SECStatus rv; SECItem digder, sigitem; - PRArenaPool *arena = 0; + PLArenaPool *arena = 0; SECKEYPrivateKey *privKey = cx->key; SGNDigestInfo *di = 0; @@ -298,7 +298,7 @@ SEC_ASN1_CHOOSER_IMPLEMENT(CERT_SignedDataTemplate) SECStatus -SEC_DerSignData(PRArenaPool *arena, SECItem *result, +SEC_DerSignData(PLArenaPool *arena, SECItem *result, const unsigned char *buf, int len, SECKEYPrivateKey *pk, SECOidTag algID) { @@ -369,7 +369,7 @@ SGN_Digest(SECKEYPrivateKey *privKey, int modulusLen; SECStatus rv; SECItem digder; - PRArenaPool *arena = 0; + PLArenaPool *arena = 0; SGNDigestInfo *di = 0; diff --git a/lib/cryptohi/secvfy.c b/lib/cryptohi/secvfy.c index b02fa3e7b8..c1ac39bc73 100644 --- a/lib/cryptohi/secvfy.c +++ b/lib/cryptohi/secvfy.c @@ -182,7 +182,7 @@ sec_DecodeSigAlg(const SECKEYPublicKey *key, SECOidTag sigAlg, const SECItem *param, SECOidTag *encalg, SECOidTag *hashalg) { int len; - PRArenaPool *arena; + PLArenaPool *arena; SECStatus rv; SECItem oid; diff --git a/lib/dbm/include/mcom_db.h b/lib/dbm/include/mcom_db.h index ed41836240..e3b9ccd8de 100644 --- a/lib/dbm/include/mcom_db.h +++ b/lib/dbm/include/mcom_db.h @@ -40,6 +40,14 @@ #endif #include "prtypes.h" +#if !defined(XP_BEOS) && !defined(XP_OS2) && !defined(XP_UNIX) || defined(NTO) +typedef PRUintn uint; +#endif +typedef PRUint8 uint8; +typedef PRUint16 uint16; +typedef PRInt32 int32; +typedef PRUint32 uint32; + #include #ifdef __DBINTERFACE_PRIVATE diff --git a/lib/freebl/blapi.h b/lib/freebl/blapi.h index 8e8a39774d..b43c9f6d3c 100644 --- a/lib/freebl/blapi.h +++ b/lib/freebl/blapi.h @@ -833,7 +833,7 @@ extern SECStatus MD5_Hash(unsigned char *dest, const char *src); ** Hash a non-null terminated string "src" into "dest" using MD5 */ extern SECStatus MD5_HashBuf(unsigned char *dest, const unsigned char *src, - uint32 src_length); + PRUint32 src_length); /* ** Create a new MD5 context @@ -1001,7 +1001,7 @@ extern SECStatus SHA1_Hash(unsigned char *dest, const char *src); ** Hash a non-null terminated string "src" into "dest" using SHA-1 */ extern SECStatus SHA1_HashBuf(unsigned char *dest, const unsigned char *src, - uint32 src_length); + PRUint32 src_length); /* ** Create a new SHA-1 context @@ -1103,7 +1103,7 @@ extern void SHA224_End(SHA224Context *cx, unsigned char *digest, extern void SHA224_EndRaw(SHA224Context *cx, unsigned char *digest, unsigned int *digestLen, unsigned int maxDigestLen); extern SECStatus SHA224_HashBuf(unsigned char *dest, const unsigned char *src, - uint32 src_length); + PRUint32 src_length); extern SECStatus SHA224_Hash(unsigned char *dest, const char *src); extern void SHA224_TraceState(SHA224Context *cx); extern unsigned int SHA224_FlattenSize(SHA224Context *cx); @@ -1132,7 +1132,7 @@ extern void SHA256_End(SHA256Context *cx, unsigned char *digest, extern void SHA256_EndRaw(SHA256Context *cx, unsigned char *digest, unsigned int *digestLen, unsigned int maxDigestLen); extern SECStatus SHA256_HashBuf(unsigned char *dest, const unsigned char *src, - uint32 src_length); + PRUint32 src_length); extern SECStatus SHA256_Hash(unsigned char *dest, const char *src); extern void SHA256_TraceState(SHA256Context *cx); extern unsigned int SHA256_FlattenSize(SHA256Context *cx); @@ -1161,7 +1161,7 @@ extern void SHA512_EndRaw(SHA512Context *cx, unsigned char *digest, extern void SHA512_End(SHA512Context *cx, unsigned char *digest, unsigned int *digestLen, unsigned int maxDigestLen); extern SECStatus SHA512_HashBuf(unsigned char *dest, const unsigned char *src, - uint32 src_length); + PRUint32 src_length); extern SECStatus SHA512_Hash(unsigned char *dest, const char *src); extern void SHA512_TraceState(SHA512Context *cx); extern unsigned int SHA512_FlattenSize(SHA512Context *cx); @@ -1190,7 +1190,7 @@ extern void SHA384_End(SHA384Context *cx, unsigned char *digest, extern void SHA384_EndRaw(SHA384Context *cx, unsigned char *digest, unsigned int *digestLen, unsigned int maxDigestLen); extern SECStatus SHA384_HashBuf(unsigned char *dest, const unsigned char *src, - uint32 src_length); + PRUint32 src_length); extern SECStatus SHA384_Hash(unsigned char *dest, const char *src); extern void SHA384_TraceState(SHA384Context *cx); extern unsigned int SHA384_FlattenSize(SHA384Context *cx); diff --git a/lib/freebl/dh.c b/lib/freebl/dh.c index 9b35951332..bfedfc962e 100644 --- a/lib/freebl/dh.c +++ b/lib/freebl/dh.c @@ -44,7 +44,7 @@ dh_GetSecretKeyLen(unsigned int primeLen) SECStatus DH_GenParam(int primeLen, DHParams **params) { - PRArenaPool *arena; + PLArenaPool *arena; DHParams *dhparams; unsigned char *pb = NULL; unsigned char *ab = NULL; @@ -135,7 +135,7 @@ DH_GenParam(int primeLen, DHParams **params) SECStatus DH_NewKey(DHParams *params, DHPrivateKey **privKey) { - PRArenaPool *arena; + PLArenaPool *arena; DHPrivateKey *key; mp_int g, xa, p, Ya; mp_err err = MP_OKAY; diff --git a/lib/freebl/dsa.c b/lib/freebl/dsa.c index e1f69002ac..ad3ce00435 100644 --- a/lib/freebl/dsa.c +++ b/lib/freebl/dsa.c @@ -158,7 +158,7 @@ dsa_NewKeyExtended(const PQGParams *params, const SECItem * seed, mp_int p, g; mp_int x, y; mp_err err; - PRArenaPool *arena; + PLArenaPool *arena; DSAPrivateKey *key; /* Check args. */ if (!params || !privKey || !seed || !seed->data) { diff --git a/lib/freebl/ec.c b/lib/freebl/ec.c index e1d1ac74c3..a8c7832d48 100644 --- a/lib/freebl/ec.c +++ b/lib/freebl/ec.c @@ -204,7 +204,7 @@ ec_NewKey(ECParams *ecParams, ECPrivateKey **privKey, { SECStatus rv = SECFailure; #ifdef NSS_ENABLE_ECC - PRArenaPool *arena; + PLArenaPool *arena; ECPrivateKey *key; mp_int k; mp_err err = MP_OKAY; diff --git a/lib/freebl/loader.c b/lib/freebl/loader.c index 9f05db0e9d..212173091a 100644 --- a/lib/freebl/loader.c +++ b/lib/freebl/loader.c @@ -557,7 +557,7 @@ MD5_Hash(unsigned char *dest, const char *src) } SECStatus -MD5_HashBuf(unsigned char *dest, const unsigned char *src, uint32 src_length) +MD5_HashBuf(unsigned char *dest, const unsigned char *src, PRUint32 src_length) { if (!vector && PR_SUCCESS != freebl_RunLoaderOnce()) return SECFailure; @@ -720,7 +720,7 @@ SHA1_Hash(unsigned char *dest, const char *src) } SECStatus -SHA1_HashBuf(unsigned char *dest, const unsigned char *src, uint32 src_length) +SHA1_HashBuf(unsigned char *dest, const unsigned char *src, PRUint32 src_length) { if (!vector && PR_SUCCESS != freebl_RunLoaderOnce()) return SECFailure; @@ -918,7 +918,7 @@ SHA256_Hash(unsigned char *dest, const char *src) } SECStatus -SHA256_HashBuf(unsigned char *dest, const unsigned char *src, uint32 src_length) +SHA256_HashBuf(unsigned char *dest, const unsigned char *src, PRUint32 src_length) { if (!vector && PR_SUCCESS != freebl_RunLoaderOnce()) return SECFailure; @@ -1008,7 +1008,7 @@ SHA512_Hash(unsigned char *dest, const char *src) } SECStatus -SHA512_HashBuf(unsigned char *dest, const unsigned char *src, uint32 src_length) +SHA512_HashBuf(unsigned char *dest, const unsigned char *src, PRUint32 src_length) { if (!vector && PR_SUCCESS != freebl_RunLoaderOnce()) return SECFailure; @@ -1099,7 +1099,7 @@ SHA384_Hash(unsigned char *dest, const char *src) } SECStatus -SHA384_HashBuf(unsigned char *dest, const unsigned char *src, uint32 src_length) +SHA384_HashBuf(unsigned char *dest, const unsigned char *src, PRUint32 src_length) { if (!vector && PR_SUCCESS != freebl_RunLoaderOnce()) return SECFailure; @@ -1744,7 +1744,7 @@ SHA224_Hash(unsigned char *dest, const char *src) } SECStatus -SHA224_HashBuf(unsigned char *dest, const unsigned char *src, uint32 src_length) +SHA224_HashBuf(unsigned char *dest, const unsigned char *src, PRUint32 src_length) { if (!vector && PR_SUCCESS != freebl_RunLoaderOnce()) return SECFailure; diff --git a/lib/freebl/loader.h b/lib/freebl/loader.h index 6148ab1b4c..8f070c4d1b 100644 --- a/lib/freebl/loader.h +++ b/lib/freebl/loader.h @@ -139,7 +139,7 @@ struct FREEBLVectorStr { SECStatus (* p_MD5_Hash)(unsigned char *dest, const char *src); SECStatus (* p_MD5_HashBuf)(unsigned char *dest, const unsigned char *src, - uint32 src_length); + PRUint32 src_length); MD5Context *(* p_MD5_NewContext)(void); @@ -184,7 +184,7 @@ struct FREEBLVectorStr { SECStatus (* p_SHA1_Hash)(unsigned char *dest, const char *src); SECStatus (* p_SHA1_HashBuf)(unsigned char *dest, const unsigned char *src, - uint32 src_length); + PRUint32 src_length); SHA1Context *(* p_SHA1_NewContext)(void); @@ -243,7 +243,7 @@ struct FREEBLVectorStr { void (* p_SHA256_End)(SHA256Context *cx, unsigned char *digest, unsigned int *digestLen, unsigned int maxDigestLen); SECStatus (* p_SHA256_HashBuf)(unsigned char *dest, const unsigned char *src, - uint32 src_length); + PRUint32 src_length); SECStatus (* p_SHA256_Hash)(unsigned char *dest, const char *src); void (* p_SHA256_TraceState)(SHA256Context *cx); unsigned int (* p_SHA256_FlattenSize)(SHA256Context *cx); @@ -258,7 +258,7 @@ struct FREEBLVectorStr { void (* p_SHA512_End)(SHA512Context *cx, unsigned char *digest, unsigned int *digestLen, unsigned int maxDigestLen); SECStatus (* p_SHA512_HashBuf)(unsigned char *dest, const unsigned char *src, - uint32 src_length); + PRUint32 src_length); SECStatus (* p_SHA512_Hash)(unsigned char *dest, const char *src); void (* p_SHA512_TraceState)(SHA512Context *cx); unsigned int (* p_SHA512_FlattenSize)(SHA512Context *cx); @@ -273,7 +273,7 @@ struct FREEBLVectorStr { void (* p_SHA384_End)(SHA384Context *cx, unsigned char *digest, unsigned int *digestLen, unsigned int maxDigestLen); SECStatus (* p_SHA384_HashBuf)(unsigned char *dest, const unsigned char *src, - uint32 src_length); + PRUint32 src_length); SECStatus (* p_SHA384_Hash)(unsigned char *dest, const char *src); void (* p_SHA384_TraceState)(SHA384Context *cx); unsigned int (* p_SHA384_FlattenSize)(SHA384Context *cx); @@ -551,7 +551,7 @@ struct FREEBLVectorStr { void (* p_SHA224_End)(SHA224Context *cx, unsigned char *digest, unsigned int *digestLen, unsigned int maxDigestLen); SECStatus (*p_SHA224_HashBuf)(unsigned char *dest, const unsigned char *src, - uint32 src_length); + PRUint32 src_length); SECStatus (*p_SHA224_Hash)(unsigned char *dest, const char *src); void (*p_SHA224_TraceState)(SHA224Context *cx); unsigned int (* p_SHA224_FlattenSize)(SHA224Context *cx); diff --git a/lib/freebl/md5.c b/lib/freebl/md5.c index 2929a633df..1a0916e2db 100644 --- a/lib/freebl/md5.c +++ b/lib/freebl/md5.c @@ -198,7 +198,7 @@ MD5_Hash(unsigned char *dest, const char *src) } SECStatus -MD5_HashBuf(unsigned char *dest, const unsigned char *src, uint32 src_length) +MD5_HashBuf(unsigned char *dest, const unsigned char *src, PRUint32 src_length) { unsigned int len; MD5Context cx; diff --git a/lib/freebl/mpi/mpmontg.c b/lib/freebl/mpi/mpmontg.c index f13ea50623..4b5c54986c 100644 --- a/lib/freebl/mpi/mpmontg.c +++ b/lib/freebl/mpi/mpmontg.c @@ -626,9 +626,9 @@ typedef unsigned int mp_weave_word; * mp_digits where each digit is stored in big endian order. * * since we need to interleave on a byte by byte basis, we need to collect - * several mpi structures together into a single uint32 before we write. We - * also need to make sure the uint32 is arranged so that the first value of - * the first array winds up in b[0]. This means construction of that uint32 + * several mpi structures together into a single PRUint32 before we write. We + * also need to make sure the PRUint32 is arranged so that the first value of + * the first array winds up in b[0]. This means construction of that PRUint32 * is endian specific (even though the layout of the mp_digits in the array * is always big endian). * diff --git a/lib/freebl/pqg.c b/lib/freebl/pqg.c index 0b9904c7ff..56cdd20cc7 100644 --- a/lib/freebl/pqg.c +++ b/lib/freebl/pqg.c @@ -228,8 +228,8 @@ PQG_Check(const PQGParams *params) return SECFailure; } - L = PQG_GetLength(¶ms->prime)*BITS_PER_BYTE; - N = PQG_GetLength(¶ms->subPrime)*BITS_PER_BYTE; + L = PQG_GetLength(¶ms->prime)*PR_BITS_PER_BYTE; + N = PQG_GetLength(¶ms->subPrime)*PR_BITS_PER_BYTE; if (L < 1024) { int j; @@ -261,8 +261,8 @@ PQG_GetHashType(const PQGParams *params) return HASH_AlgNULL; } - L = PQG_GetLength(¶ms->prime)*BITS_PER_BYTE; - N = PQG_GetLength(¶ms->subPrime)*BITS_PER_BYTE; + L = PQG_GetLength(¶ms->prime)*PR_BITS_PER_BYTE; + N = PQG_GetLength(¶ms->subPrime)*PR_BITS_PER_BYTE; return getFirstHash(L, N); } @@ -271,7 +271,7 @@ PQG_GetHashType(const PQGParams *params) ** global random number generator. */ static SECStatus -getPQseed(SECItem *seed, PRArenaPool* arena) +getPQseed(SECItem *seed, PLArenaPool* arena) { SECStatus rv; @@ -443,7 +443,7 @@ const SECItem * seed, /* input. */ unsigned char U[HASH_LENGTH_MAX]; SECStatus rv = SECSuccess; mp_err err = MP_OKAY; - int N_bytes = N/BITS_PER_BYTE; /* length of N in bytes rather than bits */ + int N_bytes = N/PR_BITS_PER_BYTE; /* length of N in bytes rather than bits */ int hashLen = HASH_ResultLen(hashtype); int offset = 0; @@ -485,7 +485,7 @@ const SECItem * seed, /* input. */ ** This implments steps 4 thorough 22 of FIPS 186-3 A.1.2.1 and ** steps 16 through 34 of FIPS 186-2 C.6 */ -#define MAX_ST_SEED_BITS HASH_LENGTH_MAX*BITS_PER_BYTE +#define MAX_ST_SEED_BITS (HASH_LENGTH_MAX*PR_BITS_PER_BYTE) SECStatus makePrimefromPrimesShaweTaylor( HASH_HashType hashtype, /* selected Hashing algorithm */ @@ -504,7 +504,7 @@ makePrimefromPrimesShaweTaylor( mp_int two_length_minus_1; SECStatus rv = SECFailure; int hashlen = HASH_ResultLen(hashtype); - int outlen = hashlen*BITS_PER_BYTE; + int outlen = hashlen*PR_BITS_PER_BYTE; int offset; unsigned char bit, mask; /* x needs to hold roundup(L/outlen)*outlen. @@ -580,7 +580,7 @@ makePrimefromPrimesShaweTaylor( ** iterations=ceiling(length/outlen). First we find the offset in ** bytes into the array where the high bit is. */ - offset = (outlen*iterations - length)/BITS_PER_BYTE; + offset = (outlen*iterations - length)/PR_BITS_PER_BYTE; /* now we want to set the 'high bit', since length may not be a * multiple of 8,*/ bit = 1 << ((length-1) & 0x7); /* select the proper bit in the byte */ @@ -734,7 +734,7 @@ const SECItem * input_seed, /* input. */ mp_int one; SECStatus rv = SECFailure; int hashlen = HASH_ResultLen(hashtype); - int outlen = hashlen*BITS_PER_BYTE; + int outlen = hashlen*PR_BITS_PER_BYTE; int offset; unsigned char bit, mask; unsigned char x[HASH_LENGTH_MAX*2]; @@ -795,7 +795,7 @@ const SECItem * input_seed, /* input. */ ** length at this point is 32 bits. So first we find the offset in bytes ** into the array where the high bit is. */ - offset = (outlen - length)/BITS_PER_BYTE; + offset = (outlen - length)/PR_BITS_PER_BYTE; /* now we want to set the 'high bit'. We have to calculate this since * length may not be a multiple of 8.*/ bit = 1 << ((length-1) & 0x7); /* select the proper bit in the byte */ @@ -1009,7 +1009,7 @@ const mp_int * Q, /* input. */ CHECK_MPI_OK( mp_init(&V_n) ); hashlen = HASH_ResultLen(hashtype); - outlen = hashlen*BITS_PER_BYTE; + outlen = hashlen*PR_BITS_PER_BYTE; /* L - 1 = n*outlen + b */ n = (L - 1) / outlen; @@ -1237,7 +1237,7 @@ pqg_ParamGen(unsigned int L, unsigned int N, pqgGenType type, unsigned int maxCount; HASH_HashType hashtype; SECItem *seed; /* Per FIPS 186, app 2.2. 186-3 app A.1.1.2 */ - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; PQGParams *params = NULL; PQGVerify *verify = NULL; PRBool passed; @@ -1253,7 +1253,7 @@ pqg_ParamGen(unsigned int L, unsigned int N, pqgGenType type, /* Step 1. L and N already checked by caller*/ /* Step 2. if (seedlen < N) return INVALID; */ - if (seedBytes < N/BITS_PER_BYTE || !pParams || !pVfy) { + if (seedBytes < N/PR_BITS_PER_BYTE || !pParams || !pVfy) { PORT_SetError(SEC_ERROR_INVALID_ARGS); return SECFailure; } @@ -1305,13 +1305,13 @@ pqg_ParamGen(unsigned int L, unsigned int N, pqgGenType type, /* getFirstHash gives us the smallest acceptable hash for this key * strength */ hashtype = getFirstHash(L,N); - outlen = HASH_ResultLen(hashtype)*BITS_PER_BYTE; + outlen = HASH_ResultLen(hashtype)*PR_BITS_PER_BYTE; /* Step 3: n = Ceil(L/outlen)-1; (same as n = Floor((L-1)/outlen)) */ n = (L - 1) / outlen; /* Step 4: b = L -1 - (n*outlen); (same as n = (L-1) mod outlen) */ b = (L - 1) % outlen; - seedlen = seedBytes * BITS_PER_BYTE; /* bits in seed */ + seedlen = seedBytes * PR_BITS_PER_BYTE; /* bits in seed */ step_5: /* ****************************************************************** ** Step 5. (Step 1 in 186-1) @@ -1737,7 +1737,7 @@ PQG_VerifyParams(const PQGParams *params, } else { /* 10. P generated from (L, counter, g, SEED, Q) matches P * in PQGParams. */ - outlen = HASH_ResultLen(hashtype)*BITS_PER_BYTE; + outlen = HASH_ResultLen(hashtype)*PR_BITS_PER_BYTE; n = (L - 1) / outlen; offset = vfy->counter * (n + 1) + ((type == FIPS186_1_TYPE) ? 2 : 1); CHECK_SEC_OK( makePfromQandSeed(hashtype, L, N, offset, g, &vfy->seed, diff --git a/lib/freebl/rsa.c b/lib/freebl/rsa.c index e6dc802d8e..8a9a11217c 100644 --- a/lib/freebl/rsa.c +++ b/lib/freebl/rsa.c @@ -239,7 +239,7 @@ RSA_NewKey(int keySizeInBits, SECItem *publicExponent) SECStatus rv = SECSuccess; int prerr = 0; RSAPrivateKey *key = NULL; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; /* Require key size to be a multiple of 16 bits. */ if (!publicExponent || keySizeInBits % 16 != 0 || BAD_RSA_KEY_SIZE(keySizeInBits/8, publicExponent->len)) { @@ -260,7 +260,7 @@ RSA_NewKey(int keySizeInBits, SECItem *publicExponent) } key->arena = arena; /* length of primes p and q (in bytes) */ - primeLen = keySizeInBits / (2 * BITS_PER_BYTE); + primeLen = keySizeInBits / (2 * PR_BITS_PER_BYTE); MP_DIGITS(&p) = 0; MP_DIGITS(&q) = 0; MP_DIGITS(&e) = 0; @@ -653,7 +653,7 @@ rsa_get_primes_from_exponents(mp_int *e, mp_int *d, mp_int *p, mp_int *q, SECStatus RSA_PopulatePrivateKey(RSAPrivateKey *key) { - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; PRBool needPublicExponent = PR_TRUE; PRBool needPrivateExponent = PR_TRUE; PRBool hasModulus = PR_FALSE; @@ -712,7 +712,7 @@ RSA_PopulatePrivateKey(RSAPrivateKey *key) if (key->prime1.data[0] == 0) { primeLen--; } - keySizeInBits = primeLen * 2 * BITS_PER_BYTE; + keySizeInBits = primeLen * 2 * PR_BITS_PER_BYTE; SECITEM_TO_MPINT(key->prime1, &p); prime_count++; } @@ -721,7 +721,7 @@ RSA_PopulatePrivateKey(RSAPrivateKey *key) if (key->prime2.data[0] == 0) { primeLen--; } - keySizeInBits = primeLen * 2 * BITS_PER_BYTE; + keySizeInBits = primeLen * 2 * PR_BITS_PER_BYTE; SECITEM_TO_MPINT(key->prime2, prime_count ? &q : &p); prime_count++; } @@ -731,7 +731,7 @@ RSA_PopulatePrivateKey(RSAPrivateKey *key) if (key->modulus.data[0] == 0) { modLen--; } - keySizeInBits = modLen * BITS_PER_BYTE; + keySizeInBits = modLen * PR_BITS_PER_BYTE; SECITEM_TO_MPINT(key->modulus, &n); hasModulus = PR_TRUE; } @@ -1354,7 +1354,7 @@ RSA_PrivateKeyOpDoubleChecked(RSAPrivateKey *key, } static SECStatus -swap_in_key_value(PRArenaPool *arena, mp_int *mpval, SECItem *buffer) +swap_in_key_value(PLArenaPool *arena, mp_int *mpval, SECItem *buffer) { int len; mp_err err = MP_OKAY; diff --git a/lib/freebl/sha512.c b/lib/freebl/sha512.c index 1bcfa172d7..0e6baa87f2 100644 --- a/lib/freebl/sha512.c +++ b/lib/freebl/sha512.c @@ -492,7 +492,7 @@ SHA256_EndRaw(SHA256Context *ctx, unsigned char *digest, SECStatus SHA256_HashBuf(unsigned char *dest, const unsigned char *src, - uint32 src_length) + PRUint32 src_length) { SHA256Context ctx; unsigned int outLen; @@ -594,7 +594,7 @@ SHA224_EndRaw(SHA256Context *ctx, unsigned char *digest, SECStatus SHA224_HashBuf(unsigned char *dest, const unsigned char *src, - uint32 src_length) + PRUint32 src_length) { SHA256Context ctx; unsigned int outLen; @@ -1296,7 +1296,7 @@ SHA512_EndRaw(SHA512Context *ctx, unsigned char *digest, SECStatus SHA512_HashBuf(unsigned char *dest, const unsigned char *src, - uint32 src_length) + PRUint32 src_length) { SHA512Context ctx; unsigned int outLen; @@ -1412,7 +1412,7 @@ SHA384_EndRaw(SHA384Context *ctx, unsigned char *digest, SECStatus SHA384_HashBuf(unsigned char *dest, const unsigned char *src, - uint32 src_length) + PRUint32 src_length) { SHA512Context ctx; unsigned int outLen; diff --git a/lib/freebl/sha_fast.c b/lib/freebl/sha_fast.c index 4db53fe15b..b826cf93ac 100644 --- a/lib/freebl/sha_fast.c +++ b/lib/freebl/sha_fast.c @@ -405,7 +405,7 @@ SHA1_DestroyContext(SHA1Context *cx, PRBool freeit) } SECStatus -SHA1_HashBuf(unsigned char *dest, const unsigned char *src, uint32 src_length) +SHA1_HashBuf(unsigned char *dest, const unsigned char *src, PRUint32 src_length) { SHA1Context ctx; unsigned int outLen; diff --git a/lib/freebl/stubs.c b/lib/freebl/stubs.c index e57976b30f..ab7cfe2f45 100644 --- a/lib/freebl/stubs.c +++ b/lib/freebl/stubs.c @@ -140,11 +140,11 @@ STUB_DECLARE(PRStatus,PR_WaitCondVar,(PRCondVar *cvar, PRIntervalTime timeout)); -STUB_DECLARE(SECItem *,SECITEM_AllocItem_Util,(PRArenaPool *arena, +STUB_DECLARE(SECItem *,SECITEM_AllocItem_Util,(PLArenaPool *arena, SECItem *item,unsigned int len)); STUB_DECLARE(SECComparison,SECITEM_CompareItem_Util,(const SECItem *a, const SECItem *b)); -STUB_DECLARE(SECStatus,SECITEM_CopyItem_Util,(PRArenaPool *arena, +STUB_DECLARE(SECStatus,SECITEM_CopyItem_Util,(PLArenaPool *arena, SECItem *to,const SECItem *from)); STUB_DECLARE(void,SECITEM_FreeItem_Util,(SECItem *zap, PRBool freeit)); STUB_DECLARE(void,SECITEM_ZfreeItem_Util,(SECItem *zap, PRBool freeit)); @@ -486,7 +486,7 @@ SECITEM_FreeItem_stub(SECItem *zap, PRBool freeit) } extern SECItem * -SECITEM_AllocItem_stub(PRArenaPool *arena, SECItem *item, unsigned int len) +SECITEM_AllocItem_stub(PLArenaPool *arena, SECItem *item, unsigned int len) { STUB_SAFE_CALL3(SECITEM_AllocItem_Util, arena, item, len); abort(); @@ -502,7 +502,7 @@ SECITEM_CompareItem_stub(const SECItem *a, const SECItem *b) } extern SECStatus -SECITEM_CopyItem_stub(PRArenaPool *arena, SECItem *to, const SECItem *from) +SECITEM_CopyItem_stub(PLArenaPool *arena, SECItem *to, const SECItem *from) { STUB_SAFE_CALL3(SECITEM_CopyItem_Util, arena, to, from); abort(); diff --git a/lib/freebl/unix_rand.c b/lib/freebl/unix_rand.c index 95c2d0595f..9139410210 100644 --- a/lib/freebl/unix_rand.c +++ b/lib/freebl/unix_rand.c @@ -33,7 +33,7 @@ size_t RNG_FileUpdate(const char *fileName, size_t limit); static size_t CopyLowBits(void *dst, size_t dstlen, void *src, size_t srclen) { union endianness { - int32 i; + PRInt32 i; char c[4]; } u; @@ -601,7 +601,7 @@ GiveSystemInfo(void) static size_t GetHighResClock(void *buf, size_t maxbytes) { - bigtime_t bigtime; /* Actually an int64 */ + bigtime_t bigtime; /* Actually a int64 */ bigtime = real_time_clock_usecs(); return CopyLowBits(buf, maxbytes, &bigtime, sizeof(bigtime)); @@ -611,7 +611,7 @@ static void GiveSystemInfo(void) { system_info *info = NULL; - int32 val; + PRInt32 val; get_system_info(info); if (info) { val = info->boot_time; diff --git a/lib/jar/jar.h b/lib/jar/jar.h index 9a60058910..8815560506 100644 --- a/lib/jar/jar.h +++ b/lib/jar/jar.h @@ -141,7 +141,7 @@ typedef struct JAR_Physical_ { unsigned long length; unsigned long uncompressed_length; #if defined(XP_UNIX) || defined(XP_BEOS) - uint16 mode; + PRUint16 mode; #endif } JAR_Physical; diff --git a/lib/jar/jzlib.h b/lib/jar/jzlib.h index dd5b4d8e99..aa25c28bbb 100644 --- a/lib/jar/jzlib.h +++ b/lib/jar/jzlib.h @@ -174,7 +174,7 @@ typedef z_stream FAR *z_streamp; /* basic functions */ #ifdef MOZILLA_CLIENT -PR_PUBLIC_API(extern const char *) zlibVersion (void); +PR_EXTERN(const char *) zlibVersion (void); #else extern const char * EXPORT zlibVersion OF((void)); #endif @@ -208,7 +208,7 @@ extern int EXPORT deflateInit OF((z_streamp strm, int level)); #ifdef MOZILLA_CLIENT -PR_PUBLIC_API(extern int) deflate (z_streamp strm, int flush); +PR_EXTERN(int) deflate (z_streamp strm, int flush); #else extern int EXPORT deflate OF((z_streamp strm, int flush)); #endif @@ -281,7 +281,7 @@ extern int EXPORT deflate OF((z_streamp strm, int flush)); #ifdef MOZILLA_CLIENT -PR_PUBLIC_API(extern int) deflateEnd (z_streamp strm); +PR_EXTERN(int) deflateEnd (z_streamp strm); #else extern int EXPORT deflateEnd OF((z_streamp strm)); #endif @@ -315,7 +315,7 @@ extern int EXPORT inflateInit OF((z_streamp strm)); #ifdef MOZILLA_CLIENT -PR_PUBLIC_API(extern int) inflate (z_streamp strm, int flush); +PR_EXTERN(int) inflate (z_streamp strm, int flush); #else extern int EXPORT inflate OF((z_streamp strm, int flush)); #endif @@ -374,7 +374,7 @@ extern int EXPORT inflate OF((z_streamp strm, int flush)); #ifdef MOZILLA_CLIENT -PR_PUBLIC_API(extern int) inflateEnd (z_streamp strm); +PR_EXTERN(int) inflateEnd (z_streamp strm); #else extern int EXPORT inflateEnd OF((z_streamp strm)); #endif @@ -454,9 +454,9 @@ extern int EXPORT deflateInit2 OF((z_streamp strm, */ #ifdef MOZILLA_CLIENT -PR_PUBLIC_API(extern int) deflateSetDictionary (z_streamp strm, - const Bytef *dictionary, - uInt dictLength); +PR_EXTERN(int) deflateSetDictionary (z_streamp strm, + const Bytef *dictionary, + uInt dictLength); #else extern int EXPORT deflateSetDictionary OF((z_streamp strm, const Bytef *dictionary, @@ -489,7 +489,7 @@ extern int EXPORT deflateSetDictionary OF((z_streamp strm, */ #ifdef MOZILLA_CLIENT -PR_PUBLIC_API(extern int) deflateCopy (z_streamp dest, z_streamp source); +PR_EXTERN(int) deflateCopy (z_streamp dest, z_streamp source); #else extern int EXPORT deflateCopy OF((z_streamp dest, z_streamp source)); #endif @@ -515,7 +515,7 @@ extern int EXPORT deflateCopy OF((z_streamp dest, z_streamp source)); */ #ifdef MOZILLA_CLIENT -PR_PUBLIC_API(extern int) deflateReset (z_streamp strm); +PR_EXTERN(int) deflateReset (z_streamp strm); #else extern int EXPORT deflateReset OF((z_streamp strm)); #endif @@ -530,7 +530,7 @@ extern int EXPORT deflateReset OF((z_streamp strm)); */ #ifdef MOZILLA_CLIENT -PR_PUBLIC_API(extern int) deflateParams (z_streamp strm, int level, int strategy); +PR_EXTERN(int) deflateParams (z_streamp strm, int level, int strategy); #else extern int EXPORT deflateParams OF((z_streamp strm, int level, int strategy)); #endif @@ -587,8 +587,8 @@ extern int EXPORT inflateInit2 OF((z_streamp strm, */ #ifdef MOZILLA_CLIENT -PR_PUBLIC_API(extern int) inflateSetDictionary (z_streamp strm, - const Bytef *dictionary, +PR_EXTERN(int) inflateSetDictionary (z_streamp strm, + const Bytef *dictionary, uInt dictLength); #else extern int EXPORT inflateSetDictionary OF((z_streamp strm, @@ -612,7 +612,7 @@ extern int EXPORT inflateSetDictionary OF((z_streamp strm, */ #ifdef MOZILLA_CLIENT -PR_PUBLIC_API(extern int) inflateSync (z_streamp strm); +PR_EXTERN(int) inflateSync (z_streamp strm); #else extern int EXPORT inflateSync OF((z_streamp strm)); #endif @@ -631,7 +631,7 @@ extern int EXPORT inflateSync OF((z_streamp strm)); */ #ifdef MOZILLA_CLIENT -PR_PUBLIC_API(extern int) inflateReset (z_streamp strm); +PR_EXTERN(int) inflateReset (z_streamp strm); #else extern int EXPORT inflateReset OF((z_streamp strm)); #endif @@ -656,7 +656,7 @@ extern int EXPORT inflateReset OF((z_streamp strm)); */ #ifdef MOZILLA_CLIENT -PR_PUBLIC_API(extern int) compress (Bytef *dest, uLongf *destLen, +PR_EXTERN(int) compress (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen); #else extern int EXPORT compress OF((Bytef *dest, uLongf *destLen, @@ -676,10 +676,10 @@ extern int EXPORT compress OF((Bytef *dest, uLongf *destLen, */ #ifdef MOZILLA_CLIENT -PR_PUBLIC_API(extern int) uncompress (Bytef *dest, uLongf *destLen, +PR_EXTERN(int) uncompress (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen); #else -extern int EXPORT uncompress OF((Bytef *dest, uLongf *destLen, +extern int EXPORT uncompress OF((Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen)); #endif /* @@ -702,7 +702,7 @@ extern int EXPORT uncompress OF((Bytef *dest, uLongf *destLen, typedef voidp gzFile; #ifdef MOZILLA_CLIENT -PR_PUBLIC_API(extern gzFile) gzopen (const char *path, const char *mode); +PR_EXTERN(gzFile) gzopen (const char *path, const char *mode); #else extern gzFile EXPORT gzopen OF((const char *path, const char *mode)); #endif @@ -718,7 +718,7 @@ extern gzFile EXPORT gzopen OF((const char *path, const char *mode)); */ #ifdef MOZILLA_CLIENT -PR_PUBLIC_API(extern gzFile) gzdopen (int fd, const char *mode); +PR_EXTERN(gzFile) gzdopen (int fd, const char *mode); #else extern gzFile EXPORT gzdopen OF((int fd, const char *mode)); #endif @@ -735,7 +735,7 @@ extern gzFile EXPORT gzdopen OF((int fd, const char *mode)); */ #ifdef MOZILLA_CLIENT -PR_PUBLIC_API(extern int) gzread (gzFile file, voidp buf, unsigned len); +PR_EXTERN(int) gzread (gzFile file, voidp buf, unsigned len); #else extern int EXPORT gzread OF((gzFile file, voidp buf, unsigned len)); #endif @@ -747,7 +747,7 @@ extern int EXPORT gzread OF((gzFile file, voidp buf, unsigned len)); end of file, -1 for error). */ #ifdef MOZILLA_CLIENT -PR_PUBLIC_API(extern int) gzwrite (gzFile file, const voidp buf, unsigned len); +PR_EXTERN(int) gzwrite (gzFile file, const voidp buf, unsigned len); #else extern int EXPORT gzwrite OF((gzFile file, const voidp buf, unsigned len)); #endif @@ -758,7 +758,7 @@ extern int EXPORT gzwrite OF((gzFile file, const voidp buf, unsigned len)); */ #ifdef MOZILLA_CLIENT -PR_PUBLIC_API(extern int) gzflush (gzFile file, int flush); +PR_EXTERN(int) gzflush (gzFile file, int flush); #else extern int EXPORT gzflush OF((gzFile file, int flush)); #endif @@ -772,7 +772,7 @@ extern int EXPORT gzflush OF((gzFile file, int flush)); */ #ifdef MOZILLA_CLIENT -PR_PUBLIC_API(extern int) gzclose (gzFile file); +PR_EXTERN(int) gzclose (gzFile file); #else extern int EXPORT gzclose OF((gzFile file)); #endif @@ -783,7 +783,7 @@ extern int EXPORT gzclose OF((gzFile file)); */ #ifdef MOZILLA_CLIENT -PR_PUBLIC_API(extern const char *) gzerror (gzFile file, int *errnum); +PR_EXTERN(const char *) gzerror (gzFile file, int *errnum); #else extern const char * EXPORT gzerror OF((gzFile file, int *errnum)); #endif @@ -804,7 +804,7 @@ extern const char * EXPORT gzerror OF((gzFile file, int *errnum)); */ #ifdef MOZILLA_CLIENT -PR_PUBLIC_API(extern uLong) adler32 (uLong adler, const Bytef *buf, uInt len); +PR_EXTERN(uLong) adler32 (uLong adler, const Bytef *buf, uInt len); #else extern uLong EXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len)); #endif @@ -825,7 +825,7 @@ extern uLong EXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len)); */ #ifdef MOZILLA_CLIENT -PR_PUBLIC_API(extern uLong) crc32 (uLong crc, const Bytef *buf, uInt len); +PR_EXTERN(uLong) crc32 (uLong crc, const Bytef *buf, uInt len); #else extern uLong EXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len)); #endif @@ -851,15 +851,15 @@ extern uLong EXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len)); * and the compiler's view of z_stream: */ #ifdef MOZILLA_CLIENT -PR_PUBLIC_API(extern int) deflateInit_ (z_streamp strm, int level, const char *version, - int stream_size); -PR_PUBLIC_API(extern int) inflateInit_ (z_streamp strm, const char *version, - int stream_size); -PR_PUBLIC_API(extern int) deflateInit2_ (z_streamp strm, int level, int method, - int windowBits, int memLevel, int strategy, - const char *version, int stream_size); -PR_PUBLIC_API(extern int) inflateInit2_ (z_streamp strm, int windowBits, - const char *version, int stream_size); +PR_EXTERN(int) deflateInit (z_streamp strm, int level, const char *version, + int stream_size); +PR_EXTERN(int) inflateInit_(z_streamp strm, const char *version, + int stream_size); +PR_EXTERN(int) deflateInit2_(z_streamp strm, int level, int method, + int windowBits, int memLevel, int strategy, + const char *version, int stream_size); +PR_EXTERN(int) inflateInit2_(z_streamp strm, int windowBits, + const char *version, int stream_size); #else extern int EXPORT deflateInit_ OF((z_streamp strm, int level, const char *version, int stream_size)); diff --git a/lib/libpkix/pkix_pl_nss/module/pkix_pl_aiamgr.c b/lib/libpkix/pkix_pl_nss/module/pkix_pl_aiamgr.c index 10c31ee427..5dc7248d58 100644 --- a/lib/libpkix/pkix_pl_nss/module/pkix_pl_aiamgr.c +++ b/lib/libpkix/pkix_pl_nss/module/pkix_pl_aiamgr.c @@ -387,7 +387,7 @@ pkix_pl_AIAMgr_GetLDAPCerts( PKIX_PL_GeneralName *location = NULL; PKIX_PL_LdapClient *client = NULL; LDAPRequestParams request; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; char *domainName = NULL; void *nbio = NULL; diff --git a/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldapcertstore.c b/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldapcertstore.c index b3ac8ce19d..1b5d7577e7 100644 --- a/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldapcertstore.c +++ b/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldapcertstore.c @@ -50,7 +50,7 @@ pkix_pl_LdapCertStore_DecodeCrossCertPair( LDAPCertPair certPair = {{ siBuffer, NULL, 0 }, { siBuffer, NULL, 0 }}; SECStatus rv = SECFailure; - PRArenaPool *tempArena = NULL; + PLArenaPool *tempArena = NULL; PKIX_ENTER(CERTSTORE, "pkix_pl_LdapCertStore_DecodeCrossCertPair"); PKIX_NULLCHECK_TWO(derCCPItem, certList); @@ -408,7 +408,7 @@ pkix_pl_LdapCertStore_DestroyAVAList( * * PARAMETERS: * "arena" - * The address of the PRArenaPool used in creating the filter. Must be + * The address of the PLArenaPool used in creating the filter. Must be * non-NULL. * "name" * The address of the X500Name whose components define the desired @@ -426,7 +426,7 @@ pkix_pl_LdapCertStore_DestroyAVAList( */ static PKIX_Error * pkix_pl_LdapCertStore_MakeNameAVAList( - PRArenaPool *arena, + PLArenaPool *arena, PKIX_PL_X500Name *subjectName, LDAPNameComponent ***pList, void *plContext) @@ -570,7 +570,7 @@ pkix_pl_LdapCertStore_GetCert( PKIX_List **pCertList, void *plContext) { - PRArenaPool *requestArena = NULL; + PLArenaPool *requestArena = NULL; LDAPRequestParams requestParams; void *pollDesc = NULL; PKIX_Int32 minPathLen = 0; @@ -806,7 +806,7 @@ pkix_pl_LdapCertStore_GetCRL( { LDAPRequestParams requestParams; void *pollDesc = NULL; - PRArenaPool *requestArena = NULL; + PLArenaPool *requestArena = NULL; PKIX_UInt32 numNames = 0; PKIX_UInt32 thisName = 0; PKIX_PL_CRL *candidate = NULL; diff --git a/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldapdefaultclient.c b/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldapdefaultclient.c index af425cb0be..a191ad65d6 100644 --- a/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldapdefaultclient.c +++ b/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldapdefaultclient.c @@ -32,7 +32,7 @@ * * PARAMETERS: * "arena" - * The address of the PRArenaPool used in encoding the message. Must be + * The address of the PLArenaPool used in encoding the message. Must be * non-NULL. * "versionData" * The Int32 containing the version number to be encoded in the Bind @@ -57,7 +57,7 @@ */ static PKIX_Error * pkix_pl_LdapDefaultClient_MakeBind( - PRArenaPool *arena, + PLArenaPool *arena, PKIX_Int32 versionData, LDAPBindAPI *bindAPI, PKIX_UInt32 msgNum, @@ -135,7 +135,7 @@ pkix_pl_LdapDefaultClient_MakeBind( * * PARAMETERS: * "arena" - * The address of the PRArenaPool used in encoding the message. Must be + * The address of the PLArenaPool used in encoding the message. Must be * non-NULL. * "msgNum" * The Int32 containing the MessageID to be encoded in the Unbind message. @@ -154,7 +154,7 @@ pkix_pl_LdapDefaultClient_MakeBind( */ static PKIX_Error * pkix_pl_LdapDefaultClient_MakeUnbind( - PRArenaPool *arena, + PLArenaPool *arena, PKIX_UInt32 msgNum, SECItem **pUnbindMsg, void *plContext) @@ -202,7 +202,7 @@ pkix_pl_LdapDefaultClient_MakeUnbind( * * PARAMETERS: * "arena" - * The address of the PRArenaPool used in encoding the message. Must be + * The address of the PLArenaPool used in encoding the message. Must be * non-NULL. * "msgNum" * The Int32 containing the MessageID to be encoded in the Abandon message. @@ -221,7 +221,7 @@ pkix_pl_LdapDefaultClient_MakeUnbind( */ static PKIX_Error * pkix_pl_LdapDefaultClient_MakeAbandon( - PRArenaPool *arena, + PLArenaPool *arena, PKIX_UInt32 msgNum, SECItem **pAbandonMsg, void *plContext) @@ -267,7 +267,7 @@ pkix_pl_LdapDefaultClient_MakeAbandon( * * PARAMETERS: * "arena" - * The address of the PRArenaPool to be used in decoding the message. Must + * The address of the PLArenaPool to be used in decoding the message. Must * be non-NULL. * "src" * The address of the SECItem containing the DER- (or BER-)encoded string. @@ -289,7 +289,7 @@ pkix_pl_LdapDefaultClient_MakeAbandon( */ static PKIX_Error * pkix_pl_LdapDefaultClient_DecodeBindResponse( - PRArenaPool *arena, + PLArenaPool *arena, SECItem *src, LDAPMessage *pBindResponse, SECStatus *pStatus, @@ -576,7 +576,7 @@ pkix_pl_LdapDefaultClient_CreateHelper( PKIX_PL_LdapDefaultClient *ldapDefaultClient = NULL; PKIX_PL_Socket_Callback *callbackList; PRFileDesc *fileDesc = NULL; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; PKIX_ENTER(LDAPDEFAULTCLIENT, "pkix_pl_LdapDefaultClient_CreateHelper"); PKIX_NULLCHECK_TWO(socket, pClient); @@ -2149,7 +2149,7 @@ pkix_pl_LdapDefaultClient_Dispatch( * * PARAMETERS: * "arena" - * The address of the PRArenaPool used in creating the filter. Must be + * The address of the PLArenaPool used in creating the filter. Must be * non-NULL. * "nameComponent" * The address of a NULL-terminated list of LDAPNameComponents @@ -2167,7 +2167,7 @@ pkix_pl_LdapDefaultClient_Dispatch( */ static PKIX_Error * pkix_pl_LdapDefaultClient_MakeAndFilter( - PRArenaPool *arena, + PLArenaPool *arena, LDAPNameComponent **nameComponents, LDAPFilter **pFilter, void *plContext) diff --git a/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldapdefaultclient.h b/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldapdefaultclient.h index 591edd1a92..4abe043281 100644 --- a/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldapdefaultclient.h +++ b/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldapdefaultclient.h @@ -56,7 +56,7 @@ struct PKIX_PL_LdapDefaultClientStruct { PRPollDesc pollDesc; void *callbackList; /* cast this to (PKIX_PL_Socket_Callback *) */ LDAPBindAPI *bindAPI; - PRArenaPool *arena; + PLArenaPool *arena; PRTime lastIO; void *sendBuf; PKIX_UInt32 bytesToWrite; diff --git a/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldaprequest.c b/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldaprequest.c index 2f2e07fb1d..51ffce97ca 100644 --- a/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldaprequest.c +++ b/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldaprequest.c @@ -493,7 +493,7 @@ pkix_pl_LdapRequest_RegisterSelf(void *plContext) * FUNCTION: pkix_pl_LdapRequest_Create * DESCRIPTION: * - * This function creates an LdapRequest using the PRArenaPool pointed to by + * This function creates an LdapRequest using the PLArenaPool pointed to by * "arena", a message number whose value is "msgnum", a base object pointed to * by "issuerDN", a scope whose value is "scope", a derefAliases flag whose * value is "derefAliases", a sizeLimit whose value is "sizeLimit", a timeLimit @@ -506,7 +506,7 @@ pkix_pl_LdapRequest_RegisterSelf(void *plContext) * * PARAMETERS * "arena" - * The address of the PRArenaPool to be used in the encoding. Must be + * The address of the PLArenaPool to be used in the encoding. Must be * non-NULL. * "msgnum" * The UInt32 message number to be used for the messageID component of the @@ -615,7 +615,7 @@ pkix_pl_LdapRequest_RegisterSelf(void *plContext) */ PKIX_Error * pkix_pl_LdapRequest_Create( - PRArenaPool *arena, + PLArenaPool *arena, PKIX_UInt32 msgnum, char *issuerDN, ScopeType scope, diff --git a/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldaprequest.h b/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldaprequest.h index 7367d25d23..1d05a9447e 100644 --- a/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldaprequest.h +++ b/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldaprequest.h @@ -27,7 +27,7 @@ typedef enum { } PKIX_PL_LdapAttr; struct PKIX_PL_LdapRequestStruct{ - PRArenaPool *arena; + PLArenaPool *arena; PKIX_UInt32 msgnum; char *issuerDN; ScopeType scope; @@ -46,7 +46,7 @@ struct PKIX_PL_LdapRequestStruct{ PKIX_Error * pkix_pl_LdapRequest_Create( - PRArenaPool *arena, + PLArenaPool *arena, PKIX_UInt32 msgnum, char *issuerDN, ScopeType scope, diff --git a/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldapresponse.c b/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldapresponse.c index 941990511c..9d37f58f80 100644 --- a/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldapresponse.c +++ b/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldapresponse.c @@ -528,7 +528,7 @@ pkix_pl_LdapResponse_IsComplete( * * PARAMETERS * "arena" - * The address of the PRArenaPool to be used in the decoding. Must be + * The address of the PLArenaPool to be used in the decoding. Must be * non-NULL. * "response" * The address of the LdapResponse whose DER data is to be decoded. Must @@ -547,7 +547,7 @@ pkix_pl_LdapResponse_IsComplete( */ PKIX_Error * pkix_pl_LdapResponse_Decode( - PRArenaPool *arena, + PLArenaPool *arena, PKIX_PL_LdapResponse *response, SECStatus *pStatus, void *plContext) diff --git a/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldapresponse.h b/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldapresponse.h index c8ef053554..37dc916b1e 100644 --- a/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldapresponse.h +++ b/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldapresponse.h @@ -52,7 +52,7 @@ pkix_pl_LdapResponse_IsComplete( PKIX_Error * pkix_pl_LdapResponse_Decode( - PRArenaPool *arena, + PLArenaPool *arena, PKIX_PL_LdapResponse *response, SECStatus *pStatus, void *plContext); diff --git a/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldapt.h b/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldapt.h index b7dad6c26a..539803638c 100644 --- a/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldapt.h +++ b/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldapt.h @@ -146,7 +146,7 @@ typedef LDAPAttributeValueAssertion LDAPLessOrEqualFilter; typedef LDAPAttributeValueAssertion LDAPApproxMatchFilter; struct LDAPLocationStruct { - PRArenaPool *arena; + PLArenaPool *arena; void *serverSite; void **filterString; void **attrBitString; diff --git a/lib/libpkix/pkix_pl_nss/module/pkix_pl_nsscontext.c b/lib/libpkix/pkix_pl_nss/module/pkix_pl_nsscontext.c index 4935a4654f..171427558b 100755 --- a/lib/libpkix/pkix_pl_nss/module/pkix_pl_nsscontext.c +++ b/lib/libpkix/pkix_pl_nss/module/pkix_pl_nsscontext.c @@ -31,7 +31,7 @@ PKIX_PL_NssContext_Create( void **pNssContext) { PKIX_PL_NssContext *context = NULL; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; void *plContext = NULL; PKIX_ENTER(CONTEXT, "PKIX_PL_NssContext_Create"); diff --git a/lib/libpkix/pkix_pl_nss/module/pkix_pl_nsscontext.h b/lib/libpkix/pkix_pl_nss/module/pkix_pl_nsscontext.h index 0ab7645340..04441c2b24 100755 --- a/lib/libpkix/pkix_pl_nss/module/pkix_pl_nsscontext.h +++ b/lib/libpkix/pkix_pl_nss/module/pkix_pl_nsscontext.h @@ -20,7 +20,7 @@ extern "C" { struct PKIX_PL_NssContextStruct { SECCertificateUsage certificateUsage; - PRArenaPool *arena; + PLArenaPool *arena; void *wincx; PKIX_UInt32 timeoutSeconds; PKIX_UInt32 maxResponseLength; diff --git a/lib/libpkix/pkix_pl_nss/module/pkix_pl_pk11certstore.c b/lib/libpkix/pkix_pl_nss/module/pkix_pl_pk11certstore.c index 6be69ac2cb..078862c8b6 100755 --- a/lib/libpkix/pkix_pl_nss/module/pkix_pl_pk11certstore.c +++ b/lib/libpkix/pkix_pl_nss/module/pkix_pl_pk11certstore.c @@ -157,7 +157,7 @@ pkix_pl_Pk11CertStore_CertQuery( CERTCertificate *nssCert = NULL; CERTCertDBHandle *dbHandle = NULL; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; SECItem *nameItem = NULL; void *wincx = NULL; diff --git a/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crldp.c b/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crldp.c index dfe557100d..4bbf618e91 100644 --- a/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crldp.c +++ b/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crldp.c @@ -74,7 +74,7 @@ pkix_pl_CrlDp_Create( pkix_pl_CrlDp **pPkixDP, void *plContext) { - PRArenaPool *rdnArena = NULL; + PLArenaPool *rdnArena = NULL; CERTName *issuerNameCopy = NULL; pkix_pl_CrlDp *dpl = NULL; diff --git a/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crlentry.c b/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crlentry.c index 2cd1cad9c8..e2b3e02688 100644 --- a/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crlentry.c +++ b/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crlentry.c @@ -218,7 +218,7 @@ pkix_pl_CRLEntry_Extensions_Hashcode( void *plContext) { CERTCertExtension *extension = NULL; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; PKIX_UInt32 extHash = 0; PKIX_UInt32 hashValue = 0; SECItem *derBytes = NULL; @@ -393,7 +393,7 @@ pkix_pl_CRLEntry_Extensions_Equals( CERTCertExtension **secondExtensions; CERTCertExtension *firstExtension = NULL; CERTCertExtension *secondExtension = NULL; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; PKIX_Boolean cmpResult = PKIX_FALSE; SECItem *firstDerBytes = NULL; SECItem *secondDerBytes = NULL; diff --git a/lib/libpkix/pkix_pl_nss/pki/pkix_pl_infoaccess.c b/lib/libpkix/pkix_pl_nss/pki/pkix_pl_infoaccess.c index c2786be8ea..3ce6cbec24 100644 --- a/lib/libpkix/pkix_pl_nss/pki/pkix_pl_infoaccess.c +++ b/lib/libpkix/pkix_pl_nss/pki/pkix_pl_infoaccess.c @@ -511,7 +511,7 @@ PKIX_PL_InfoAccess_GetLocationType( * * PARAMETERS * "arena" - * Address of a PRArenaPool to be used in populating the LDAPLocation. + * Address of a PLArenaPool to be used in populating the LDAPLocation. * Must be non-NULL. * "startPos" * The address of char string that contains a subset of ldap location. @@ -533,7 +533,7 @@ PKIX_PL_InfoAccess_GetLocationType( */ static PKIX_Error * pkix_pl_InfoAccess_ParseTokens( - PRArenaPool *arena, + PLArenaPool *arena, char **startPos, /* return update */ char ***tokens, char separator, @@ -662,7 +662,7 @@ pkix_pl_UnescapeURL( * * This function parses the GeneralName pointed to by "generalName" into the * fields of the LDAPRequestParams pointed to by "request" and a domainName - * pointed to by "pDomainName", using the PRArenaPool pointed to by "arena" to + * pointed to by "pDomainName", using the PLArenaPool pointed to by "arena" to * allocate storage for the request components and for the domainName string. * * The expected GeneralName string should be in the format described by the @@ -679,7 +679,7 @@ pkix_pl_UnescapeURL( * Address of the GeneralName whose LDAPLocation is to be parsed. Must be * non-NULL. * "arena" - * Address of PRArenaPool to be used for the domainName and for components + * Address of PLArenaPool to be used for the domainName and for components * of the LDAPRequest. Must be non-NULL. * "request" * Address of the LDAPRequestParams into which request components are @@ -698,7 +698,7 @@ pkix_pl_UnescapeURL( PKIX_Error * pkix_pl_InfoAccess_ParseLocation( PKIX_PL_GeneralName *generalName, - PRArenaPool *arena, + PLArenaPool *arena, LDAPRequestParams *request, char **pDomainName, void *plContext) diff --git a/lib/libpkix/pkix_pl_nss/pki/pkix_pl_infoaccess.h b/lib/libpkix/pkix_pl_nss/pki/pkix_pl_infoaccess.h index e364e3d7fe..f56bfe1ca4 100644 --- a/lib/libpkix/pkix_pl_nss/pki/pkix_pl_infoaccess.h +++ b/lib/libpkix/pkix_pl_nss/pki/pkix_pl_infoaccess.h @@ -35,7 +35,7 @@ pkix_pl_InfoAccess_CreateList( PKIX_Error * pkix_pl_InfoAccess_ParseLocation( PKIX_PL_GeneralName *generalName, - PRArenaPool *arena, + PLArenaPool *arena, LDAPRequestParams *request, char **pDomainName, void *plContext); diff --git a/lib/libpkix/pkix_pl_nss/pki/pkix_pl_nameconstraints.c b/lib/libpkix/pkix_pl_nss/pki/pkix_pl_nameconstraints.c index b9557211e1..affea8741d 100644 --- a/lib/libpkix/pkix_pl_nss/pki/pkix_pl_nameconstraints.c +++ b/lib/libpkix/pkix_pl_nss/pki/pkix_pl_nameconstraints.c @@ -278,7 +278,7 @@ pkix_pl_CertNameConstraints_CheckNameSpaceNssNames( CERTNameConstraints **nssNameConstraintsList = NULL; CERTNameConstraints *nssNameConstraints = NULL; CERTGeneralName *nssMatchName = NULL; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; PKIX_UInt32 numItems = 0; PKIX_UInt32 i; SECStatus status = SECSuccess; @@ -1191,7 +1191,7 @@ PKIX_PL_CertNameConstraints_CheckNamesInNameSpace( CERTNameConstraints **nssNameConstraintsList = NULL; CERTNameConstraints *nssNameConstraints = NULL; CERTGeneralName *nssMatchName = NULL; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; PKIX_PL_GeneralName *name = NULL; PKIX_UInt32 numNameItems = 0; PKIX_UInt32 numNCItems = 0; diff --git a/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocspcertid.c b/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocspcertid.c index 1f51e773bb..77d0a9a3a2 100644 --- a/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocspcertid.c +++ b/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocspcertid.c @@ -113,7 +113,7 @@ PKIX_PL_OcspCertID_Create( void *plContext) { PKIX_PL_OcspCertID *cid = NULL; - int64 time = 0; + PRTime time = 0; PKIX_ENTER(DATE, "PKIX_PL_OcspCertID_Create"); PKIX_NULLCHECK_TWO(cert, object); @@ -181,7 +181,7 @@ PKIX_PL_OcspCertID_GetFreshCacheStatus( SECErrorCodes *missingResponseError, void *plContext) { - int64 time = 0; + PRTime time = 0; SECStatus rv; SECStatus rvOcsp; diff --git a/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocsprequest.c b/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocsprequest.c index c825d2eaf3..171a3d2d97 100644 --- a/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocsprequest.c +++ b/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocsprequest.c @@ -266,7 +266,7 @@ pkix_pl_OcspRequest_Create( SECStatus rv = SECFailure; SECItem *encoding = NULL; CERTOCSPRequest *certRequest = NULL; - int64 time = 0; + PRTime time = 0; PRBool addServiceLocatorExtension = PR_FALSE; CERTCertificate *nssCert = NULL; CERTCertificate *nssSignerCert = NULL; diff --git a/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocspresponse.h b/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocspresponse.h index f73f5819c5..cffc0512d4 100644 --- a/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocspresponse.h +++ b/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocspresponse.h @@ -25,7 +25,7 @@ extern "C" { #define MAX_OCSP_RESPONSE_LEN (64*1024) struct PKIX_PL_OcspResponseStruct{ - PRArenaPool *arena; + PLArenaPool *arena; const PKIX_PL_OcspRequest *request; const SEC_HttpClientFcn *httpClient; SEC_HTTP_SERVER_SESSION serverSession; @@ -33,7 +33,7 @@ struct PKIX_PL_OcspResponseStruct{ PKIX_PL_VerifyCallback verifyFcn; SECItem *encodedResponse; CERTCertDBHandle *handle; - int64 producedAt; + PRTime producedAt; PKIX_PL_Date *producedAtDate; PKIX_PL_Cert *pkixSignerCert; CERTOCSPResponse *nssOCSPResponse; diff --git a/lib/libpkix/pkix_pl_nss/pki/pkix_pl_x500name.c b/lib/libpkix/pkix_pl_nss/pki/pkix_pl_x500name.c index 05685171b0..e5ca4724e0 100644 --- a/lib/libpkix/pkix_pl_nss/pki/pkix_pl_x500name.c +++ b/lib/libpkix/pkix_pl_nss/pki/pkix_pl_x500name.c @@ -292,7 +292,7 @@ pkix_pl_X500Name_CreateFromUtf8( void *plContext) { PKIX_PL_X500Name *x500Name = NULL; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; CERTName *nssDN = NULL; SECItem *resultSecItem = NULL; @@ -396,7 +396,7 @@ PKIX_PL_X500Name_CreateFromCERTName( PKIX_PL_X500Name **pName, void *plContext) { - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; SECStatus rv = SECFailure; PKIX_PL_X500Name *x500Name = NULL; @@ -557,7 +557,7 @@ PKIX_PL_X500Name_Match( * Address of X500Name whose CERTName flag is to be encoded. Must be * non-NULL. * "arena" - * Address of the PRArenaPool to be used in the encoding, and in which + * Address of the PLArenaPool to be used in the encoding, and in which * "pSECName" will be allocated. Must be non-NULL. * "pSECName" * Address where result will be stored. Must be non-NULL. @@ -574,7 +574,7 @@ PKIX_PL_X500Name_Match( PKIX_Error * pkix_pl_X500Name_GetDERName( PKIX_PL_X500Name *xname, - PRArenaPool *arena, + PLArenaPool *arena, SECItem **pDERName, void *plContext) { diff --git a/lib/libpkix/pkix_pl_nss/pki/pkix_pl_x500name.h b/lib/libpkix/pkix_pl_nss/pki/pkix_pl_x500name.h index 5869c58bc6..a62bdb82d5 100644 --- a/lib/libpkix/pkix_pl_nss/pki/pkix_pl_x500name.h +++ b/lib/libpkix/pkix_pl_nss/pki/pkix_pl_x500name.h @@ -19,7 +19,7 @@ extern "C" { struct PKIX_PL_X500NameStruct{ - PRArenaPool *arena; /* X500Name arena. Shared arena with nssDN + PLArenaPool *arena; /* X500Name arena. Shared arena with nssDN * and derName */ CERTName nssDN; SECItem derName; /* adding DER encoded CERTName to the structure @@ -33,7 +33,7 @@ PKIX_Error *pkix_pl_X500Name_RegisterSelf(void *plContext); PKIX_Error *pkix_pl_X500Name_GetDERName( PKIX_PL_X500Name *xname, - PRArenaPool *arena, + PLArenaPool *arena, SECItem **pSECName, void *plContext); diff --git a/lib/nss/utilwrap.c b/lib/nss/utilwrap.c index 7d88e36245..a9ef690a5c 100644 --- a/lib/nss/utilwrap.c +++ b/lib/nss/utilwrap.c @@ -286,13 +286,13 @@ SECOidData *SECOID_FindOIDByTag(SECOidTag tagnum) return SECOID_FindOIDByTag_Util(tagnum); } -SECStatus SECOID_SetAlgorithmID(PRArenaPool *arena, SECAlgorithmID *aid, +SECStatus SECOID_SetAlgorithmID(PLArenaPool *arena, SECAlgorithmID *aid, SECOidTag tag, SECItem *params) { return SECOID_SetAlgorithmID_Util(arena, aid, tag, params); } -SECStatus SECOID_CopyAlgorithmID(PRArenaPool *arena, SECAlgorithmID *dest, +SECStatus SECOID_CopyAlgorithmID(PLArenaPool *arena, SECAlgorithmID *dest, SECAlgorithmID *src) { return SECOID_CopyAlgorithmID_Util(arena, dest, src); @@ -324,7 +324,7 @@ SECOidTag SECOID_AddEntry(const SECOidData * src) return SECOID_AddEntry_Util(src); } -SECItem *SECITEM_AllocItem(PRArenaPool *arena, SECItem *item, +SECItem *SECITEM_AllocItem(PLArenaPool *arena, SECItem *item, unsigned int len) { return SECITEM_AllocItem_Util(arena, item, len); @@ -340,7 +340,7 @@ PRBool SECITEM_ItemsAreEqual(const SECItem *a, const SECItem *b) return SECITEM_ItemsAreEqual_Util(a, b); } -SECStatus SECITEM_CopyItem(PRArenaPool *arena, SECItem *to, +SECStatus SECITEM_CopyItem(PLArenaPool *arena, SECItem *to, const SECItem *from) { return SECITEM_CopyItem_Util(arena, to, from); @@ -351,7 +351,7 @@ SECItem *SECITEM_DupItem(const SECItem *from) return SECITEM_DupItem_Util(from); } -SECItem *SECITEM_ArenaDupItem(PRArenaPool *arena, const SECItem *from) +SECItem *SECITEM_ArenaDupItem(PLArenaPool *arena, const SECItem *from) { return SECITEM_ArenaDupItem_Util(arena, from); } @@ -378,7 +378,7 @@ void SGN_DestroyDigestInfo(SGNDigestInfo *info) SGN_DestroyDigestInfo_Util(info); } -SECStatus SGN_CopyDigestInfo(PRArenaPool *poolp, +SECStatus SGN_CopyDigestInfo(PLArenaPool *poolp, SGNDigestInfo *a, SGNDigestInfo *b) { @@ -390,7 +390,7 @@ SECComparison SGN_CompareDigestInfo(SGNDigestInfo *a, SGNDigestInfo *b) return SGN_CompareDigestInfo_Util(a, b); } -SECStatus DER_Encode(PRArenaPool *arena, SECItem *dest, DERTemplate *t, +SECStatus DER_Encode(PLArenaPool *arena, SECItem *dest, DERTemplate *t, void *src) { return DER_Encode_Util(arena, dest, t, src); @@ -407,17 +407,17 @@ long DER_GetInteger(const SECItem *src) return DER_GetInteger_Util(src); } -SECStatus DER_TimeToUTCTime(SECItem *result, int64 time) +SECStatus DER_TimeToUTCTime(SECItem *result, PRTime time) { return DER_TimeToUTCTime_Util(result, time); } -SECStatus DER_AsciiToTime(int64 *result, const char *string) +SECStatus DER_AsciiToTime(PRTime *result, const char *string) { return DER_AsciiToTime_Util(result, string); } -SECStatus DER_UTCTimeToTime(int64 *result, const SECItem *time) +SECStatus DER_UTCTimeToTime(PRTime *result, const SECItem *time) { return DER_UTCTimeToTime_Util(result, time); } @@ -442,23 +442,23 @@ char *DER_TimeChoiceDayToAscii(SECItem *timechoice) return DER_TimeChoiceDayToAscii_Util(timechoice); } -SECStatus DER_TimeToGeneralizedTime(SECItem *dst, int64 gmttime) +SECStatus DER_TimeToGeneralizedTime(SECItem *dst, PRTime gmttime) { return DER_TimeToGeneralizedTime_Util(dst, gmttime); } -SECStatus DER_TimeToGeneralizedTimeArena(PRArenaPool* arenaOpt, - SECItem *dst, int64 gmttime) +SECStatus DER_TimeToGeneralizedTimeArena(PLArenaPool* arenaOpt, + SECItem *dst, PRTime gmttime) { return DER_TimeToGeneralizedTimeArena_Util(arenaOpt, dst, gmttime); } -SECStatus DER_GeneralizedTimeToTime(int64 *dst, const SECItem *time) +SECStatus DER_GeneralizedTimeToTime(PRTime *dst, const SECItem *time) { return DER_GeneralizedTimeToTime_Util(dst, time); } -char *CERT_GenTime2FormattedAscii (int64 genTime, char *format) +char *CERT_GenTime2FormattedAscii(PRTime genTime, char *format) { return CERT_GenTime2FormattedAscii_Util(genTime, format); } @@ -468,13 +468,13 @@ SECStatus DER_DecodeTimeChoice(PRTime* output, const SECItem* input) return DER_DecodeTimeChoice_Util(output, input); } -SECStatus DER_EncodeTimeChoice(PRArenaPool* arena, SECItem* output, +SECStatus DER_EncodeTimeChoice(PLArenaPool* arena, SECItem* output, PRTime input) { return DER_EncodeTimeChoice_Util(arena, output, input); } -SEC_ASN1DecoderContext *SEC_ASN1DecoderStart(PRArenaPool *pool, +SEC_ASN1DecoderContext *SEC_ASN1DecoderStart(PLArenaPool *pool, void *dest, const SEC_ASN1Template *t) { @@ -522,21 +522,21 @@ void SEC_ASN1DecoderClearNotifyProc(SEC_ASN1DecoderContext *cx) SEC_ASN1DecoderClearNotifyProc_Util(cx); } -SECStatus SEC_ASN1Decode(PRArenaPool *pool, void *dest, +SECStatus SEC_ASN1Decode(PLArenaPool *pool, void *dest, const SEC_ASN1Template *t, const char *buf, long len) { return SEC_ASN1Decode_Util(pool, dest, t, buf, len); } -SECStatus SEC_ASN1DecodeItem(PRArenaPool *pool, void *dest, +SECStatus SEC_ASN1DecodeItem(PLArenaPool *pool, void *dest, const SEC_ASN1Template *t, const SECItem *src) { return SEC_ASN1DecodeItem_Util(pool, dest, t, src); } -SECStatus SEC_QuickDERDecodeItem(PRArenaPool* arena, void* dest, +SECStatus SEC_QuickDERDecodeItem(PLArenaPool* arena, void* dest, const SEC_ASN1Template* templateEntry, const SECItem* src) { @@ -607,19 +607,19 @@ SECStatus SEC_ASN1Encode(const void *src, const SEC_ASN1Template *t, return SEC_ASN1Encode_Util(src, t, output_proc, output_arg); } -SECItem * SEC_ASN1EncodeItem(PRArenaPool *pool, SECItem *dest, +SECItem * SEC_ASN1EncodeItem(PLArenaPool *pool, SECItem *dest, const void *src, const SEC_ASN1Template *t) { return SEC_ASN1EncodeItem_Util(pool, dest, src, t); } -SECItem * SEC_ASN1EncodeInteger(PRArenaPool *pool, +SECItem * SEC_ASN1EncodeInteger(PLArenaPool *pool, SECItem *dest, long value) { return SEC_ASN1EncodeInteger_Util(pool, dest, value); } -SECItem * SEC_ASN1EncodeUnsignedInteger(PRArenaPool *pool, +SECItem * SEC_ASN1EncodeUnsignedInteger(PLArenaPool *pool, SECItem *dest, unsigned long value) { @@ -699,14 +699,14 @@ NSSBase64Encoder_Destroy (NSSBase64Encoder *data, PRBool abort_p) } SECItem * -NSSBase64_DecodeBuffer (PRArenaPool *arenaOpt, SECItem *outItemOpt, +NSSBase64_DecodeBuffer (PLArenaPool *arenaOpt, SECItem *outItemOpt, const char *inStr, unsigned int inLen) { return NSSBase64_DecodeBuffer_Util(arenaOpt, outItemOpt, inStr, inLen); } char * -NSSBase64_EncodeItem (PRArenaPool *arenaOpt, char *outStrOpt, +NSSBase64_EncodeItem (PLArenaPool *arenaOpt, char *outStrOpt, unsigned int maxOutLen, SECItem *inItem) { return NSSBase64_EncodeItem_Util(arenaOpt, outStrOpt, maxOutLen, inItem); diff --git a/lib/pk11wrap/pk11akey.c b/lib/pk11wrap/pk11akey.c index b392ffffea..12e2149f23 100644 --- a/lib/pk11wrap/pk11akey.c +++ b/lib/pk11wrap/pk11akey.c @@ -224,7 +224,7 @@ PK11_ImportPublicKey(PK11SlotInfo *slot, SECKEYPublicKey *pubKey, * take an attribute and copy it into a secitem */ static CK_RV -pk11_Attr2SecItem(PRArenaPool *arena, const CK_ATTRIBUTE *attr, SECItem *item) +pk11_Attr2SecItem(PLArenaPool *arena, const CK_ATTRIBUTE *attr, SECItem *item) { item->data = NULL; @@ -254,7 +254,7 @@ pk11_Attr2SecItem(PRArenaPool *arena, const CK_ATTRIBUTE *attr, SECItem *item) * Point length = (Roundup(curveLenInBits/8)*2+1) */ static int -pk11_get_EC_PointLenInBytes(PRArenaPool *arena, const SECItem *ecParams) +pk11_get_EC_PointLenInBytes(PLArenaPool *arena, const SECItem *ecParams) { SECItem oid; SECOidTag tag; @@ -366,7 +366,7 @@ pk11_get_EC_PointLenInBytes(PRArenaPool *arena, const SECItem *ecParams) * the passed in arena. */ static CK_RV -pk11_get_Decoded_ECPoint(PRArenaPool *arena, const SECItem *ecParams, +pk11_get_Decoded_ECPoint(PLArenaPool *arena, const SECItem *ecParams, const CK_ATTRIBUTE *ecPoint, SECItem *publicKeyValue) { SECItem encodedPublicValue; @@ -546,8 +546,8 @@ SECKEYPublicKey * PK11_ExtractPublicKey(PK11SlotInfo *slot,KeyType keyType,CK_OBJECT_HANDLE id) { CK_OBJECT_CLASS keyClass = CKO_PUBLIC_KEY; - PRArenaPool *arena; - PRArenaPool *tmp_arena; + PLArenaPool *arena; + PLArenaPool *tmp_arena; SECKEYPublicKey *pubKey; int templateCount = 0; CK_KEY_TYPE pk11KeyType; @@ -730,7 +730,7 @@ SECKEYPrivateKey * PK11_MakePrivKey(PK11SlotInfo *slot, KeyType keyType, PRBool isTemp, CK_OBJECT_HANDLE privID, void *wincx) { - PRArenaPool *arena; + PLArenaPool *arena; SECKEYPrivateKey *privKey; PRBool isPrivate; SECStatus rv; @@ -876,7 +876,7 @@ pk11_loadPrivKeyWithFlags(PK11SlotInfo *slot,SECKEYPrivateKey *privKey, CK_BBOOL ckfalse = CK_FALSE; CK_ATTRIBUTE *attrs = NULL, *ap; const int templateSize = sizeof(privTemplate)/sizeof(privTemplate[0]); - PRArenaPool *arena; + PLArenaPool *arena; CK_OBJECT_HANDLE objectID; int i, count = 0; int extra_count = 0; @@ -1512,7 +1512,7 @@ PK11_MakeKEAPubKey(unsigned char *keyData,int length) SECKEYPublicKey *pubk; SECItem pkData; SECStatus rv; - PRArenaPool *arena; + PLArenaPool *arena; pkData.data = keyData; pkData.len = length; @@ -1726,7 +1726,7 @@ PK11_ExportEncryptedPrivKeyInfo( void *wincx) /* context for password callback ? */ { SECKEYEncryptedPrivateKeyInfo *epki = NULL; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; SECAlgorithmID *algid; SECOidTag pbeAlgTag = SEC_OID_UNKNOWN; SECItem *crypto_param = NULL; @@ -1932,7 +1932,7 @@ PK11_GetPQGParamsFromPrivateKey(SECKEYPrivateKey *privKey) { CKA_BASE, NULL, 0 }, }; int pTemplateLen = sizeof(pTemplate)/sizeof(pTemplate[0]); - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; SECKEYPQGParams *params; CK_RV crv; diff --git a/lib/pk11wrap/pk11auth.c b/lib/pk11wrap/pk11auth.c index 61097d4214..14aeffa2b5 100644 --- a/lib/pk11wrap/pk11auth.c +++ b/lib/pk11wrap/pk11auth.c @@ -52,7 +52,7 @@ pk11_CheckPassword(PK11SlotInfo *slot, CK_SESSION_HANDLE session, int len = 0; CK_RV crv; SECStatus rv; - int64 currtime = PR_Now(); + PRTime currtime = PR_Now(); PRBool mustRetry; int retry = 0; @@ -132,7 +132,7 @@ PK11_CheckUserPassword(PK11SlotInfo *slot, const char *pw) int len = 0; CK_RV crv; SECStatus rv; - int64 currtime = PR_Now(); + PRTime currtime = PR_Now(); if (slot->protectedAuthPath) { len = 0; @@ -738,9 +738,9 @@ PK11_IsLoggedIn(PK11SlotInfo *slot,void *wincx) /* forget the password if we've been inactive too long */ if (askpw == 1) { - int64 currtime = PR_Now(); - int64 result; - int64 mult; + PRTime currtime = PR_Now(); + PRTime result; + PRTime mult; LL_I2L(result, timeout); LL_I2L(mult, 60*1000*1000); diff --git a/lib/pk11wrap/pk11mech.c b/lib/pk11wrap/pk11mech.c index e453abe7f3..e15a286b1d 100644 --- a/lib/pk11wrap/pk11mech.c +++ b/lib/pk11wrap/pk11mech.c @@ -1135,7 +1135,7 @@ PK11_ParamFromAlgid(SECAlgorithmID *algid) CK_RC2_PARAMS * rc2_ecb_params = NULL; CK_RC5_CBC_PARAMS * rc5_cbc_params = NULL; CK_RC5_PARAMS * rc5_ecb_params = NULL; - PRArenaPool * arena = NULL; + PLArenaPool * arena = NULL; SECItem * mech = NULL; SECOidTag algtag; SECStatus rv; @@ -1518,7 +1518,7 @@ PK11_GenerateNewParam(CK_MECHANISM_TYPE type, PK11SymKey *key) /* turn a PKCS #11 parameter into a DER Encoded Algorithm ID */ SECStatus PK11_ParamToAlgid(SECOidTag algTag, SECItem *param, - PRArenaPool *arena, SECAlgorithmID *algid) { + PLArenaPool *arena, SECAlgorithmID *algid) { CK_RC2_CBC_PARAMS *rc2_params; sec_rc2cbcParameter rc2; CK_RC5_CBC_PARAMS *rc5_params; diff --git a/lib/pk11wrap/pk11merge.c b/lib/pk11wrap/pk11merge.c index 8c966d2d06..ad9b1fda68 100644 --- a/lib/pk11wrap/pk11merge.c +++ b/lib/pk11wrap/pk11merge.c @@ -56,7 +56,7 @@ pk11_setAttributes(PK11SlotInfo *slot, CK_OBJECT_HANDLE id, * if target object is not given, create it. */ static SECStatus -pk11_copyAttributes(PRArenaPool *arena, +pk11_copyAttributes(PLArenaPool *arena, PK11SlotInfo *targetSlot, CK_OBJECT_HANDLE targetID, PK11SlotInfo *sourceSlot, CK_OBJECT_HANDLE sourceID, CK_ATTRIBUTE *copyTemplate, CK_ULONG copyTemplateCount) @@ -82,7 +82,7 @@ pk11_copyAttributes(PRArenaPool *arena, * look for a matching object across tokens. */ static SECStatus -pk11_matchAcrossTokens(PRArenaPool *arena, PK11SlotInfo *targetSlot, +pk11_matchAcrossTokens(PLArenaPool *arena, PK11SlotInfo *targetSlot, PK11SlotInfo *sourceSlot, CK_ATTRIBUTE *template, CK_ULONG tsize, CK_OBJECT_HANDLE id, CK_OBJECT_HANDLE *peer) @@ -202,7 +202,7 @@ pk11_mergePrivateKey(PK11SlotInfo *targetSlot, PK11SlotInfo *sourceSlot, SECItem nickItem; SECItem pwitem; SECItem publicValue; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; SECStatus rv = SECSuccess; unsigned int keyUsage; unsigned char randomData[SHA1_LENGTH]; @@ -331,7 +331,7 @@ pk11_mergePrivateKey(PK11SlotInfo *targetSlot, PK11SlotInfo *sourceSlot, * CKA_ID the it has returned in the passed. */ static SECStatus -pk11_incrementID(PRArenaPool *arena, CK_ATTRIBUTE *ptemplate) +pk11_incrementID(PLArenaPool *arena, CK_ATTRIBUTE *ptemplate) { unsigned char *buf = ptemplate->pValue; CK_ULONG len = ptemplate->ulValueLen; @@ -433,7 +433,7 @@ pk11_mergeSecretKey(PK11SlotInfo *targetSlot, PK11SlotInfo *sourceSlot, SECItem input; CK_OBJECT_HANDLE targetKeyID; CK_FLAGS flags; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; SECStatus rv = SECSuccess; CK_MECHANISM_TYPE keyMechType, cryptoMechType; CK_KEY_TYPE sourceKeyType, targetKeyType; @@ -607,7 +607,7 @@ pk11_mergePublicKey(PK11SlotInfo *targetSlot, PK11SlotInfo *sourceSlot, { SECKEYPublicKey *sourceKey = NULL; CK_OBJECT_HANDLE targetKeyID; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; SECStatus rv = SECSuccess; CK_ATTRIBUTE pubTemplate[] = { { CKA_ID, NULL, 0 }, @@ -746,7 +746,7 @@ pk11_mergeCert(PK11SlotInfo *targetSlot, PK11SlotInfo *sourceSlot, CK_OBJECT_HANDLE targetCertID = CK_INVALID_HANDLE; char *nickname = NULL; SECStatus rv = SECSuccess; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; CK_ATTRIBUTE sourceCKAID = {CKA_ID, NULL, 0}; CK_ATTRIBUTE targetCKAID = {CKA_ID, NULL, 0}; SECStatus lrv = SECSuccess; @@ -882,7 +882,7 @@ pk11_mergeCrl(PK11SlotInfo *targetSlot, PK11SlotInfo *sourceSlot, CK_OBJECT_HANDLE id, void *targetPwArg, void *sourcePwArg) { CK_OBJECT_HANDLE targetCrlID; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; SECStatus rv = SECSuccess; CK_ATTRIBUTE crlTemplate[] = { { CKA_SUBJECT, NULL, 0 }, @@ -944,7 +944,7 @@ pk11_mergeSmime(PK11SlotInfo *targetSlot, PK11SlotInfo *sourceSlot, CK_OBJECT_HANDLE id, void *targetPwArg, void *sourcePwArg) { CK_OBJECT_HANDLE targetSmimeID; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; SECStatus rv = SECSuccess; CK_ATTRIBUTE smimeTemplate[] = { { CKA_SUBJECT, NULL, 0 }, @@ -1064,7 +1064,7 @@ pk11_mergeTrust(PK11SlotInfo *targetSlot, PK11SlotInfo *sourceSlot, CK_OBJECT_HANDLE id, void *targetPwArg, void *sourcePwArg) { CK_OBJECT_HANDLE targetTrustID; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; SECStatus rv = SECSuccess; int error = 0; CK_ATTRIBUTE trustTemplate[] = { @@ -1228,7 +1228,7 @@ pk11_mergeObject(PK11SlotInfo *targetSlot, PK11SlotInfo *sourceSlot, } PK11MergeLogNode * -pk11_newMergeLogNode(PRArenaPool *arena, +pk11_newMergeLogNode(PLArenaPool *arena, PK11SlotInfo *slot, CK_OBJECT_HANDLE id, int error) { PK11MergeLogNode *newLog; @@ -1392,7 +1392,7 @@ PK11_MergeTokens(PK11SlotInfo *targetSlot, PK11SlotInfo *sourceSlot, PK11MergeLog * PK11_CreateMergeLog(void) { - PRArenaPool *arena; + PLArenaPool *arena; PK11MergeLog *log; arena = PORT_NewArena( DER_DEFAULT_CHUNKSIZE); diff --git a/lib/pk11wrap/pk11nobj.c b/lib/pk11wrap/pk11nobj.c index db2b6fb3a6..427b09eac8 100644 --- a/lib/pk11wrap/pk11nobj.c +++ b/lib/pk11wrap/pk11nobj.c @@ -33,7 +33,7 @@ extern const NSSError NSS_ERROR_NOT_FOUND; CK_TRUST -pk11_GetTrustField(PK11SlotInfo *slot, PRArenaPool *arena, +pk11_GetTrustField(PK11SlotInfo *slot, PLArenaPool *arena, CK_OBJECT_HANDLE id, CK_ATTRIBUTE_TYPE type) { CK_TRUST rv = 0; @@ -55,7 +55,7 @@ pk11_GetTrustField(PK11SlotInfo *slot, PRArenaPool *arena, PRBool pk11_HandleTrustObject(PK11SlotInfo *slot, CERTCertificate *cert, CERTCertTrust *trust) { - PRArenaPool *arena; + PLArenaPool *arena; CK_ATTRIBUTE tobjTemplate[] = { { CKA_CLASS, NULL, 0 }, @@ -719,7 +719,7 @@ CERTSignedCrl * crl_storeCRL (PK11SlotInfo *slot,char *url, /* import the CRL into the token */ CERTSignedCrl* PK11_ImportCRL(PK11SlotInfo * slot, SECItem *derCRL, char *url, - int type, void *wincx, PRInt32 importOptions, PRArenaPool* arena, + int type, void *wincx, PRInt32 importOptions, PLArenaPool* arena, PRInt32 decodeoptions) { CERTSignedCrl *newCrl, *crl; diff --git a/lib/pk11wrap/pk11obj.c b/lib/pk11wrap/pk11obj.c index 3855d80fa8..2db8e8e888 100644 --- a/lib/pk11wrap/pk11obj.c +++ b/lib/pk11wrap/pk11obj.c @@ -84,7 +84,7 @@ PK11_DestroyTokenObject(PK11SlotInfo *slot,CK_OBJECT_HANDLE object) { */ SECStatus PK11_ReadAttribute(PK11SlotInfo *slot, CK_OBJECT_HANDLE id, - CK_ATTRIBUTE_TYPE type, PRArenaPool *arena, SECItem *result) { + CK_ATTRIBUTE_TYPE type, PLArenaPool *arena, SECItem *result) { CK_ATTRIBUTE attr = { 0, NULL, 0 }; CK_RV crv; @@ -173,7 +173,7 @@ PK11_HasAttributeSet( PK11SlotInfo *slot, CK_OBJECT_HANDLE id, * provided, allocate space out of the arena. */ CK_RV -PK11_GetAttributes(PRArenaPool *arena,PK11SlotInfo *slot, +PK11_GetAttributes(PLArenaPool *arena,PK11SlotInfo *slot, CK_OBJECT_HANDLE obj,CK_ATTRIBUTE *attr, int count) { int i; @@ -1736,7 +1736,7 @@ PK11_MatchItem(PK11SlotInfo *slot, CK_OBJECT_HANDLE searchID, /* if you change the array, change the variable below as well */ CK_OBJECT_HANDLE peerID; CK_OBJECT_HANDLE parent; - PRArenaPool *arena; + PLArenaPool *arena; CK_RV crv; /* now we need to create space for the public key */ diff --git a/lib/pk11wrap/pk11pars.c b/lib/pk11wrap/pk11pars.c index 97393381a9..314062bdaf 100644 --- a/lib/pk11wrap/pk11pars.c +++ b/lib/pk11wrap/pk11pars.c @@ -22,7 +22,7 @@ static SECMODModule * secmod_NewModule(void) { SECMODModule *newMod; - PRArenaPool *arena; + PLArenaPool *arena; /* create an arena in which dllName and commonName can be @@ -730,7 +730,7 @@ secmod_mkTokenChild(char **next, int *length, char *child, CK_SLOT_ID id) #define TOKEN_STRING " tokens=[" char * -secmod_MkAppendTokensList(PRArenaPool *arena, char *oldParam, char *newToken, +secmod_MkAppendTokensList(PLArenaPool *arena, char *oldParam, char *newToken, CK_SLOT_ID newID, char **children, CK_SLOT_ID *ids) { char *rawParam = NULL; /* oldParam with tokens stripped off */ diff --git a/lib/pk11wrap/pk11pbe.c b/lib/pk11wrap/pk11pbe.c index 093c3ea9d2..cc72faf608 100644 --- a/lib/pk11wrap/pk11pbe.c +++ b/lib/pk11wrap/pk11pbe.c @@ -26,7 +26,7 @@ typedef struct SEC_PKCS5PBEParameterStr SEC_PKCS5PBEParameter; struct SEC_PKCS5PBEParameterStr { - PRArenaPool *poolp; + PLArenaPool *poolp; SECItem salt; /* octet string */ SECItem iteration; /* integer */ SECItem keyLength; /* PKCS5v2 only */ @@ -39,7 +39,7 @@ struct SEC_PKCS5PBEParameterStr { * and SEC_OID_PKCS5_PBMAC1 */ struct sec_pkcs5V2ParameterStr { - PRArenaPool *poolp; + PLArenaPool *poolp; SECAlgorithmID pbeAlgId; /* real pbe algorithms */ SECAlgorithmID cipherAlgId; /* encryption/mac */ }; @@ -144,9 +144,9 @@ sec_pkcs5GetCryptoFromAlgTag(SECOidTag algorithm) * if arena is passed in, use it, otherwise create a new arena. */ sec_pkcs5V2Parameter * -sec_pkcs5_v2_get_v2_param(PRArenaPool *arena, SECAlgorithmID *algid) +sec_pkcs5_v2_get_v2_param(PLArenaPool *arena, SECAlgorithmID *algid) { - PRArenaPool *localArena = NULL; + PLArenaPool *localArena = NULL; sec_pkcs5V2Parameter *pbeV2_param; SECStatus rv; @@ -313,7 +313,7 @@ int sec_pkcs5v2_key_length(SECAlgorithmID *algid) { SECOidTag algorithm; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; SEC_PKCS5PBEParameter p5_param; SECStatus rv; int length = -1; @@ -471,7 +471,7 @@ sec_pkcs5_create_pbe_parameter(SECOidTag algorithm, int keyLength, SECOidTag prfAlg) { - PRArenaPool *poolp = NULL; + PLArenaPool *poolp = NULL; SEC_PKCS5PBEParameter *pbe_param = NULL; SECStatus rv= SECSuccess; void *dummy = NULL; @@ -559,7 +559,7 @@ sec_pkcs5CreateAlgorithmID(SECOidTag algorithm, SECItem *salt, int iteration) { - PRArenaPool *poolp = NULL; + PLArenaPool *poolp = NULL; SECAlgorithmID *algid, *ret_algid = NULL; SECOidTag pbeAlgorithm = algorithm; SECItem der_param; @@ -740,7 +740,7 @@ pbe_PK11AlgidToParam(SECAlgorithmID *algid,SECItem *mech) SEC_PKCS5PBEParameter p5_param; SECItem *salt = NULL; SECOidTag algorithm = SECOID_GetAlgorithmTag(algid); - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; SECStatus rv = SECFailure; unsigned char *paramData = NULL; unsigned char *pSalt = NULL; @@ -868,7 +868,7 @@ pbe_PK11AlgidToParam(SECAlgorithmID *algid,SECItem *mech) * PBE algorithmID's directly. */ SECStatus -PBE_PK11ParamToAlgid(SECOidTag algTag, SECItem *param, PRArenaPool *arena, +PBE_PK11ParamToAlgid(SECOidTag algTag, SECItem *param, PLArenaPool *arena, SECAlgorithmID *algId) { CK_PBE_PARAMS *pbe_param; diff --git a/lib/pk11wrap/pk11pk12.c b/lib/pk11wrap/pk11pk12.c index c91ffd21bc..806b387618 100644 --- a/lib/pk11wrap/pk11pk12.c +++ b/lib/pk11wrap/pk11pk12.c @@ -30,7 +30,7 @@ /* member names from PKCS#1, section 7.2 */ struct SECKEYRSAPrivateKeyStr { - PRArenaPool * arena; + PLArenaPool * arena; SECItem version; SECItem modulus; SECItem publicExponent; @@ -59,7 +59,7 @@ typedef struct SECKEYDSAPrivateKeyStr SECKEYDSAPrivateKey; ** Structure member names suggested by PKCS#3. */ struct SECKEYDHPrivateKeyStr { - PRArenaPool * arena; + PLArenaPool * arena; SECItem prime; SECItem base; SECItem privateValue; @@ -217,7 +217,7 @@ PK11_ImportDERPrivateKeyInfoAndReturnKey(PK11SlotInfo *slot, SECItem *derPKI, void *wincx) { SECKEYPrivateKeyInfo *pki = NULL; - PRArenaPool *temparena = NULL; + PLArenaPool *temparena = NULL; SECStatus rv = SECFailure; temparena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); @@ -426,7 +426,7 @@ PK11_ImportPrivateKeyInfoAndReturnKey(PK11SlotInfo *slot, SECKEYRawPrivateKey *lpk = NULL; const SEC_ASN1Template *keyTemplate, *paramTemplate; void *paramDest = NULL; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; arena = PORT_NewArena(2048); if(!arena) { diff --git a/lib/pk11wrap/pk11pqg.c b/lib/pk11wrap/pk11pqg.c index 6827dcdbbc..be8adec4f5 100644 --- a/lib/pk11wrap/pk11pqg.c +++ b/lib/pk11wrap/pk11pqg.c @@ -64,8 +64,8 @@ PK11_PQG_ParamGenV2(unsigned int L, unsigned int N, CK_ULONG subPrimeBits = N; int pTemplateCount = sizeof(pTemplate)/sizeof(pTemplate[0]); int vTemplateCount = sizeof(vTemplate)/sizeof(vTemplate[0]); - PRArenaPool *parena = NULL; - PRArenaPool *varena = NULL; + PLArenaPool *parena = NULL; + PLArenaPool *varena = NULL; PQGParams *params = NULL; PQGVerify *verify = NULL; CK_ULONG seedBits = seedBytes*8; @@ -379,7 +379,7 @@ PK11_PQG_DestroyVerify(PQGVerify *vfy) { extern PQGParams * PK11_PQG_NewParams(const SECItem * prime, const SECItem * subPrime, const SECItem * base) { - PRArenaPool *arena; + PLArenaPool *arena; PQGParams *dest; SECStatus status; @@ -452,7 +452,7 @@ PK11_PQG_GetBaseFromParams(const PQGParams *params, SECItem *base) { extern PQGVerify * PK11_PQG_NewVerify(unsigned int counter, const SECItem * seed, const SECItem * h) { - PRArenaPool *arena; + PLArenaPool *arena; PQGVerify * dest; SECStatus status; diff --git a/lib/pk11wrap/pk11slot.c b/lib/pk11wrap/pk11slot.c index 2861a4daed..dede1e214e 100644 --- a/lib/pk11wrap/pk11slot.c +++ b/lib/pk11wrap/pk11slot.c @@ -1016,7 +1016,7 @@ PK11_ClearSlotList(PK11SlotInfo *slot) * turn a PKCS11 Static Label into a string */ char * -PK11_MakeString(PRArenaPool *arena,char *space, +PK11_MakeString(PLArenaPool *arena,char *space, char *staticString,int stringLen) { int i; diff --git a/lib/pk11wrap/pk11util.c b/lib/pk11wrap/pk11util.c index 31b48496ac..3197c184e7 100644 --- a/lib/pk11wrap/pk11util.c +++ b/lib/pk11wrap/pk11util.c @@ -1058,7 +1058,7 @@ secmod_HandleWaitForSlotEvent(SECMODModule *mod, unsigned long flags, SECMOD_GetReadLock(moduleLock); for (i=0; i < mod->slotCount; i++) { PK11SlotInfo *slot = mod->slots[i]; - uint16 series; + PRUint16 series; PRBool present; /* perm modules do not change */ diff --git a/lib/pk11wrap/secmodi.h b/lib/pk11wrap/secmodi.h index 2959ab5c14..d959ad9baa 100644 --- a/lib/pk11wrap/secmodi.h +++ b/lib/pk11wrap/secmodi.h @@ -81,7 +81,7 @@ char *secmod_ParseModuleSpecForTokens(PRBool convert, char ***children, CK_SLOT_ID **ids); void secmod_FreeChildren(char **children, CK_SLOT_ID *ids); -char *secmod_MkAppendTokensList(PRArenaPool *arena, char *origModuleSpec, +char *secmod_MkAppendTokensList(PLArenaPool *arena, char *origModuleSpec, char *newModuleSpec, CK_SLOT_ID newID, char **children, CK_SLOT_ID *ids); @@ -106,7 +106,7 @@ SECStatus PK11_CreateNewObject(PK11SlotInfo *slot, CK_SESSION_HANDLE session, SECStatus pbe_PK11AlgidToParam(SECAlgorithmID *algid,SECItem *mech); SECStatus PBE_PK11ParamToAlgid(SECOidTag algTag, SECItem *param, - PRArenaPool *arena, SECAlgorithmID *algId); + PLArenaPool *arena, SECAlgorithmID *algId); PK11SymKey *pk11_TokenKeyGenWithFlagsAndKeyType(PK11SlotInfo *slot, CK_MECHANISM_TYPE type, SECItem *param, CK_KEY_TYPE keyType, diff --git a/lib/pk11wrap/secmodti.h b/lib/pk11wrap/secmodti.h index d393c0f8a8..2b631306e6 100644 --- a/lib/pk11wrap/secmodti.h +++ b/lib/pk11wrap/secmodti.h @@ -72,17 +72,17 @@ struct PK11SlotInfoStr { * seconds */ int authTransact; /* allow multiple authentications off one password if * they are all part of the same transaction */ - int64 authTime; /* when were we last authenticated */ + PRTime authTime; /* when were we last authenticated */ int minPassword; /* smallest legal password */ int maxPassword; /* largest legal password */ - uint16 series; /* break up the slot info into various groups of + PRUint16 series; /* break up the slot info into various groups of * inserted tokens so that keys and certs can be * invalidated */ - uint16 flagSeries; /* record the last series for the last event + PRUint16 flagSeries;/* record the last series for the last event * returned for this slot */ PRBool flagState; /* record the state of the last event returned for this * slot. */ - uint16 wrapKey; /* current wrapping key for SSL master secrets */ + PRUint16 wrapKey; /* current wrapping key for SSL master secrets */ CK_MECHANISM_TYPE wrapMechanism; /* current wrapping mechanism for current wrapKey */ CK_OBJECT_HANDLE refKeys[1]; /* array of existing wrapping keys for */ @@ -128,7 +128,7 @@ struct PK11SymKeyStr { PK11Origin origin; /* where this key came from * (see def in secmodt.h) */ PK11SymKey *parent; /* potential owner key of the session */ - uint16 series; /* break up the slot info into various groups + PRUint16 series; /* break up the slot info into various groups * of inserted tokens so that keys and certs * can be invalidated */ void *userData; /* random data the application can attach to diff --git a/lib/pkcs12/p12creat.c b/lib/pkcs12/p12creat.c index 4457e12027..235ddfbeb4 100644 --- a/lib/pkcs12/p12creat.c +++ b/lib/pkcs12/p12creat.c @@ -19,7 +19,7 @@ SEC_PKCS12PFXItem * sec_pkcs12_new_pfx(void) { SEC_PKCS12PFXItem *pfx = NULL; - PRArenaPool *poolp = NULL; + PLArenaPool *poolp = NULL; poolp = PORT_NewArena(SEC_ASN1_DEFAULT_ARENA_SIZE); /* XXX Different size? */ if(poolp == NULL) @@ -43,7 +43,7 @@ sec_pkcs12_new_pfx(void) * the new structure is returned. */ SEC_PKCS12AuthenticatedSafe * -sec_pkcs12_new_asafe(PRArenaPool *poolp) +sec_pkcs12_new_asafe(PLArenaPool *poolp) { SEC_PKCS12AuthenticatedSafe *asafe = NULL; void *mark; @@ -68,7 +68,7 @@ sec_pkcs12_new_asafe(PRArenaPool *poolp) * length 0 with the first element being NULL */ SEC_PKCS12SafeContents * -sec_pkcs12_create_safe_contents(PRArenaPool *poolp) +sec_pkcs12_create_safe_contents(PLArenaPool *poolp) { SEC_PKCS12SafeContents *safe; void *mark; @@ -174,7 +174,7 @@ sec_pkcs12_create_external_bag(SEC_PKCS12Baggage *luggage) /* creates a baggage witha NULL terminated 0 length list */ SEC_PKCS12Baggage * -sec_pkcs12_create_baggage(PRArenaPool *poolp) +sec_pkcs12_create_baggage(PLArenaPool *poolp) { SEC_PKCS12Baggage *luggage; void *mark; diff --git a/lib/pkcs12/p12d.c b/lib/pkcs12/p12d.c index 6b2a90044c..b540f47d4b 100644 --- a/lib/pkcs12/p12d.c +++ b/lib/pkcs12/p12d.c @@ -41,7 +41,7 @@ struct sec_PKCS12SafeContentsContextStr { SEC_PKCS12DecoderContext *p12dcx; /* memory arena to allocate space from */ - PRArenaPool *arena; + PLArenaPool *arena; /* decoder context and destination for decoding safe contents */ SEC_ASN1DecoderContext *safeContentsA1Dcx; @@ -64,7 +64,7 @@ struct sec_PKCS12SafeContentsContextStr { * decode, the safe bags containing certificates and keys encountered. */ struct SEC_PKCS12DecoderContextStr { - PRArenaPool *arena; + PLArenaPool *arena; PK11SlotInfo *slot; void *wincx; PRBool error; @@ -1170,7 +1170,7 @@ SEC_PKCS12DecoderStart(SECItem *pwitem, PK11SlotInfo *slot, void *wincx, digestIOFn dRead, digestIOFn dWrite, void *dArg) { SEC_PKCS12DecoderContext *p12dcx; - PRArenaPool *arena; + PLArenaPool *arena; arena = PORT_NewArena(2048); /* different size? */ if(!arena) { @@ -1950,7 +1950,7 @@ sec_pkcs12_get_der_cert(sec_PKCS12SafeBag *cert) } struct certNickInfo { - PRArenaPool *arena; + PLArenaPool *arena; unsigned int nNicks; SECItem **nickList; unsigned int error; @@ -2041,7 +2041,7 @@ sec_pkcs12_get_existing_nick_for_dn(sec_PKCS12SafeBag *cert) { struct certNickInfo *nickArg = NULL; SECItem *derCert, *returnDn = NULL; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; CERTCertificate *tempCert; if(!cert) { @@ -3508,7 +3508,7 @@ sec_pkcs12_decoder_convert_old_safe_to_bags(SEC_PKCS12DecoderContext *p12dcx, } SEC_PKCS12DecoderContext * -sec_PKCS12ConvertOldSafeToNew(PRArenaPool *arena, PK11SlotInfo *slot, +sec_PKCS12ConvertOldSafeToNew(PLArenaPool *arena, PK11SlotInfo *slot, PRBool swapUnicode, SECItem *pwitem, void *wincx, SEC_PKCS12SafeContents *safe, SEC_PKCS12Baggage *baggage) diff --git a/lib/pkcs12/p12e.c b/lib/pkcs12/p12e.c index 74bc76cc1d..5584407f8e 100644 --- a/lib/pkcs12/p12e.c +++ b/lib/pkcs12/p12e.c @@ -62,7 +62,7 @@ typedef struct sec_pkcs12OutputBufferStr sec_pkcs12OutputBuffer; * PFX structure. */ struct SEC_PKCS12SafeInfoStr { - PRArenaPool *arena; + PLArenaPool *arena; /* information for setting up password encryption */ SECItem pwitem; @@ -85,7 +85,7 @@ struct SEC_PKCS12SafeInfoStr { * certificates and keys through PKCS 12. */ struct SEC_PKCS12ExportContextStr { - PRArenaPool *arena; + PLArenaPool *arena; PK11SlotInfo *slot; void *wincx; @@ -130,7 +130,7 @@ struct sec_pkcs12_hmac_and_output_info { * portion of PKCS 12. */ typedef struct sec_PKCS12EncoderContextStr { - PRArenaPool *arena; + PLArenaPool *arena; SEC_PKCS12ExportContext *p12exp; /* encoder information - this is set up based on whether @@ -178,7 +178,7 @@ SEC_PKCS12ExportContext * SEC_PKCS12CreateExportContext(SECKEYGetPasswordKey pwfn, void *pwfnarg, PK11SlotInfo *slot, void *wincx) { - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; SEC_PKCS12ExportContext *p12ctxt = NULL; /* allocate the arena and create the context */ @@ -583,7 +583,7 @@ SEC_PKCS12CreatePubKeyEncryptedSafe(SEC_PKCS12ExportContext *p12ctxt, /* creates a safe contents which safeBags will be appended to */ sec_PKCS12SafeContents * -sec_PKCS12CreateSafeContents(PRArenaPool *arena) +sec_PKCS12CreateSafeContents(PLArenaPool *arena) { sec_PKCS12SafeContents *safeContents; @@ -613,7 +613,7 @@ sec_PKCS12CreateSafeContents(PRArenaPool *arena) /* appends a safe bag to a safeContents using the specified arena. */ SECStatus -sec_pkcs12_append_bag_to_safe_contents(PRArenaPool *arena, +sec_pkcs12_append_bag_to_safe_contents(PLArenaPool *arena, sec_PKCS12SafeContents *safeContents, sec_PKCS12SafeBag *safeBag) { @@ -774,7 +774,7 @@ sec_PKCS12CreateSafeBag(SEC_PKCS12ExportContext *p12ctxt, SECOidTag bagType, * occurs NULL is returned. */ sec_PKCS12CertBag * -sec_PKCS12NewCertBag(PRArenaPool *arena, SECOidTag certType) +sec_PKCS12NewCertBag(PLArenaPool *arena, SECOidTag certType) { sec_PKCS12CertBag *certBag = NULL; SECOidData *bagType = NULL; @@ -818,7 +818,7 @@ sec_PKCS12NewCertBag(PRArenaPool *arena, SECOidTag certType) * occurs NULL is returned. */ sec_PKCS12CRLBag * -sec_PKCS12NewCRLBag(PRArenaPool *arena, SECOidTag crlType) +sec_PKCS12NewCRLBag(PLArenaPool *arena, SECOidTag crlType) { sec_PKCS12CRLBag *crlBag = NULL; SECOidData *bagType = NULL; diff --git a/lib/pkcs12/p12exp.c b/lib/pkcs12/p12exp.c index 3860c47acc..852ea37f78 100644 --- a/lib/pkcs12/p12exp.c +++ b/lib/pkcs12/p12exp.c @@ -168,7 +168,7 @@ sec_pkcs12_convert_nickname_list(char **nicknames) * a return of NULL indicates an error */ static SEC_PKCS12CertAndCRL * -sec_pkcs12_get_cert(PRArenaPool *poolp, +sec_pkcs12_get_cert(PLArenaPool *poolp, CERTCertificate *add_cert, SECItem *nickname) { @@ -240,7 +240,7 @@ sec_pkcs12_get_cert(PRArenaPool *poolp, * an error is indicated by a return of NULL */ static SEC_PKCS12PrivateKey * -sec_pkcs12_get_private_key(PRArenaPool *poolp, +sec_pkcs12_get_private_key(PLArenaPool *poolp, SECItem *nickname, CERTCertificate *cert, void *wincx) @@ -305,7 +305,7 @@ sec_pkcs12_get_private_key(PRArenaPool *poolp, * an error is indicated by a return of NULL */ static SEC_PKCS12ESPVKItem * -sec_pkcs12_get_shrouded_key(PRArenaPool *poolp, +sec_pkcs12_get_shrouded_key(PLArenaPool *poolp, SECItem *nickname, CERTCertificate *cert, SECOidTag algorithm, @@ -588,7 +588,7 @@ sec_pkcs12_append_safe_bag(SEC_PKCS12SafeContents *safe, /* append a certificate onto the end of a cert bag */ static SECStatus -sec_pkcs12_append_cert_to_bag(PRArenaPool *arena, +sec_pkcs12_append_cert_to_bag(PLArenaPool *arena, SEC_PKCS12SafeBag *safebag, CERTCertificate *cert, SECItem *nickname) @@ -754,7 +754,7 @@ sec_pkcs12_package_certs_and_keys(SECItem **nicknames, PKCS12UnicodeConvertFunction unicodeFn, void *wincx) { - PRArenaPool *permArena; + PLArenaPool *permArena; SEC_PKCS12SafeContents *safe = NULL; SEC_PKCS12Baggage *baggage = NULL; @@ -924,7 +924,7 @@ sec_pkcs12_encode_safe_contents(SEC_PKCS12SafeContents *safe) { SECItem *dsafe = NULL, *tsafe; void *dummy = NULL; - PRArenaPool *arena; + PLArenaPool *arena; if(safe == NULL) { return NULL; @@ -983,7 +983,7 @@ sec_pkcs12_get_auth_safe(SEC_PKCS12SafeContents *safe, void *wincx) { SECItem *src = NULL, *dest = NULL, *psalt = NULL; - PRArenaPool *poolp; + PLArenaPool *poolp; SEC_PKCS12AuthenticatedSafe *asafe; SEC_PKCS7ContentInfo *safe_cinfo = NULL; SEC_PKCS7ContentInfo *asafe_cinfo = NULL; diff --git a/lib/pkcs12/p12local.c b/lib/pkcs12/p12local.c index 99aaac9269..48ac3f58d1 100644 --- a/lib/pkcs12/p12local.c +++ b/lib/pkcs12/p12local.c @@ -253,7 +253,7 @@ sec_pkcs12_generate_key_from_password(SECOidTag algorithm, unsigned char *pre_hash=NULL; unsigned char *hash_dest=NULL; SECStatus res; - PRArenaPool *poolp; + PLArenaPool *poolp; SECItem *key = NULL; int key_len = 0; @@ -339,7 +339,7 @@ sec_pkcs12_generate_old_mac(SECItem *key, SECItem *msg) { SECStatus res; - PRArenaPool *temparena = NULL; + PLArenaPool *temparena = NULL; unsigned char *hash_dest=NULL, *hash_src1=NULL, *hash_src2 = NULL; int i; SECItem *mac = NULL; @@ -482,7 +482,7 @@ sec_pkcs12_compute_thumbprint(SECItem *der_cert) { SGNDigestInfo *thumb = NULL; SECItem digest; - PRArenaPool *temparena = NULL; + PLArenaPool *temparena = NULL; SECStatus rv = SECFailure; if(der_cert == NULL) @@ -884,7 +884,7 @@ sec_pkcs12_find_object(SEC_PKCS12SafeContents *safe, * required double 0 byte be placed at the end of the string */ PRBool -sec_pkcs12_convert_item_to_unicode(PRArenaPool *arena, SECItem *dest, +sec_pkcs12_convert_item_to_unicode(PLArenaPool *arena, SECItem *dest, SECItem *src, PRBool zeroTerm, PRBool asciiConvert, PRBool toUnicode) { diff --git a/lib/pkcs12/p12local.h b/lib/pkcs12/p12local.h index 9b9e7adc4e..024987cb1d 100644 --- a/lib/pkcs12/p12local.h +++ b/lib/pkcs12/p12local.h @@ -35,7 +35,7 @@ extern SECStatus sec_pkcs12_append_shrouded_key(SEC_PKCS12BaggageItem *bag, extern void *sec_pkcs12_find_object(SEC_PKCS12SafeContents *safe, SEC_PKCS12Baggage *baggage, SECOidTag objType, SECItem *nickname, SGNDigestInfo *thumbprint); -extern PRBool sec_pkcs12_convert_item_to_unicode(PRArenaPool *arena, SECItem *dest, +extern PRBool sec_pkcs12_convert_item_to_unicode(PLArenaPool *arena, SECItem *dest, SECItem *src, PRBool zeroTerm, PRBool asciiConvert, PRBool toUnicode); extern CK_MECHANISM_TYPE sec_pkcs12_algtag_to_mech(SECOidTag algtag); @@ -43,15 +43,15 @@ extern CK_MECHANISM_TYPE sec_pkcs12_algtag_to_mech(SECOidTag algtag); /* create functions */ extern SEC_PKCS12PFXItem *sec_pkcs12_new_pfx(void); extern SEC_PKCS12SafeContents *sec_pkcs12_create_safe_contents( - PRArenaPool *poolp); -extern SEC_PKCS12Baggage *sec_pkcs12_create_baggage(PRArenaPool *poolp); + PLArenaPool *poolp); +extern SEC_PKCS12Baggage *sec_pkcs12_create_baggage(PLArenaPool *poolp); extern SEC_PKCS12BaggageItem *sec_pkcs12_create_external_bag(SEC_PKCS12Baggage *luggage); extern void SEC_PKCS12DestroyPFX(SEC_PKCS12PFXItem *pfx); -extern SEC_PKCS12AuthenticatedSafe *sec_pkcs12_new_asafe(PRArenaPool *poolp); +extern SEC_PKCS12AuthenticatedSafe *sec_pkcs12_new_asafe(PLArenaPool *poolp); /* conversion from old to new */ extern SEC_PKCS12DecoderContext * -sec_PKCS12ConvertOldSafeToNew(PRArenaPool *arena, PK11SlotInfo *slot, +sec_PKCS12ConvertOldSafeToNew(PLArenaPool *arena, PK11SlotInfo *slot, PRBool swapUnicode, SECItem *pwitem, void *wincx, SEC_PKCS12SafeContents *safe, SEC_PKCS12Baggage *baggage); diff --git a/lib/pkcs7/certread.c b/lib/pkcs7/certread.c index 07e6149590..88812c771e 100644 --- a/lib/pkcs7/certread.c +++ b/lib/pkcs7/certread.c @@ -123,7 +123,7 @@ SEC_ReadPKCS7Certs(SECItem *pkcs7Item, CERTImportCertificateFunc f, void *arg) SECStatus rv; SECItem **certs; int count; - PRArenaPool *arena; + PLArenaPool *arena; arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); if ( arena == NULL ) { @@ -177,7 +177,7 @@ SEC_ReadCertSequence(SECItem *certsItem, CERTImportCertificateFunc f, void *arg) SECItem **certs; int count; SECItem **rawCerts = NULL; - PRArenaPool *arena; + PLArenaPool *arena; ContentInfo contentInfo; arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); @@ -499,7 +499,7 @@ CERT_DecodeCertPackage(char *certbuf, } typedef struct { - PRArenaPool *arena; + PLArenaPool *arena; SECItem cert; } collect_args; diff --git a/lib/pkcs7/p7common.c b/lib/pkcs7/p7common.c index 29b1282ae2..9a44f20b38 100644 --- a/lib/pkcs7/p7common.c +++ b/lib/pkcs7/p7common.c @@ -402,7 +402,7 @@ SEC_PKCS7SetContent(SEC_PKCS7ContentInfo *cinfo, * indicates a success. */ SECStatus -SEC_PKCS7EncryptContents(PRArenaPool *poolp, +SEC_PKCS7EncryptContents(PLArenaPool *poolp, SEC_PKCS7ContentInfo *cinfo, SECItem *key, void *wincx) @@ -559,7 +559,7 @@ SEC_PKCS7EncryptContents(PRArenaPool *poolp, * indicates a success. */ SECStatus -SEC_PKCS7DecryptContents(PRArenaPool *poolp, +SEC_PKCS7DecryptContents(PLArenaPool *poolp, SEC_PKCS7ContentInfo *cinfo, SECItem *key, void *wincx) diff --git a/lib/pkcs7/p7create.c b/lib/pkcs7/p7create.c index 988d4b2d7b..983b7b541f 100644 --- a/lib/pkcs7/p7create.c +++ b/lib/pkcs7/p7create.c @@ -21,7 +21,7 @@ const int NSS_PBE_DEFAULT_ITERATION_COUNT = 2000; /* used in p12e.c too */ static SECStatus -sec_pkcs7_init_content_info (SEC_PKCS7ContentInfo *cinfo, PRArenaPool *poolp, +sec_pkcs7_init_content_info (SEC_PKCS7ContentInfo *cinfo, PLArenaPool *poolp, SECOidTag kind, PRBool detached) { void *thing; @@ -110,7 +110,7 @@ sec_pkcs7_create_content_info (SECOidTag kind, PRBool detached, SECKEYGetPasswordKey pwfn, void *pwfn_arg) { SEC_PKCS7ContentInfo *cinfo; - PRArenaPool *poolp; + PLArenaPool *poolp; SECStatus rv; poolp = PORT_NewArena (1024); /* XXX what is right value? */ @@ -404,7 +404,7 @@ SEC_PKCS7CreateSignedData (CERTCertificate *cert, static SEC_PKCS7Attribute * -sec_pkcs7_create_attribute (PRArenaPool *poolp, SECOidTag oidtag, +sec_pkcs7_create_attribute (PLArenaPool *poolp, SECOidTag oidtag, SECItem *value, PRBool encoded) { SEC_PKCS7Attribute *attr; @@ -955,7 +955,7 @@ SEC_PKCS7AddCertificate (SEC_PKCS7ContentInfo *cinfo, CERTCertificate *cert) static SECStatus sec_pkcs7_init_encrypted_content_info (SEC_PKCS7EncryptedContentInfo *enccinfo, - PRArenaPool *poolp, + PLArenaPool *poolp, SECOidTag kind, PRBool detached, SECOidTag encalg, int keysize) { diff --git a/lib/pkcs7/p7decode.c b/lib/pkcs7/p7decode.c index 1e86f8f7ec..a7133b147b 100644 --- a/lib/pkcs7/p7decode.c +++ b/lib/pkcs7/p7decode.c @@ -44,7 +44,7 @@ struct SEC_PKCS7DecoderContextStr { SECKEYGetPasswordKey pwfn; void *pwfn_arg; struct sec_pkcs7_decoder_worker worker; - PRArenaPool *tmp_poolp; + PLArenaPool *tmp_poolp; int error; SEC_PKCS7GetDecryptKeyCallback dkcb; void *dkcb_arg; @@ -306,7 +306,7 @@ sec_pkcs7_decoder_start_digests (SEC_PKCS7DecoderContext *p7dcx, int depth, */ static SECStatus sec_pkcs7_decoder_finish_digests (SEC_PKCS7DecoderContext *p7dcx, - PRArenaPool *poolp, + PLArenaPool *poolp, SECItem ***digestsp) { struct sec_pkcs7_decoder_worker *worker; @@ -583,7 +583,7 @@ sec_pkcs7_decoder_start_decrypt (SEC_PKCS7DecoderContext *p7dcx, int depth, static SECStatus sec_pkcs7_decoder_finish_decrypt (SEC_PKCS7DecoderContext *p7dcx, - PRArenaPool *poolp, + PLArenaPool *poolp, SEC_PKCS7EncryptedContentInfo *enccinfo) { struct sec_pkcs7_decoder_worker *worker; @@ -958,7 +958,7 @@ SEC_PKCS7DecoderStart(SEC_PKCS7DecoderContentCallback cb, void *cb_arg, SEC_PKCS7DecoderContext *p7dcx; SEC_ASN1DecoderContext *dcx; SEC_PKCS7ContentInfo *cinfo; - PRArenaPool *poolp; + PLArenaPool *poolp; poolp = PORT_NewArena (1024); /* XXX what is right value? */ if (poolp == NULL) diff --git a/lib/pkcs7/p7encode.c b/lib/pkcs7/p7encode.c index 23e35a2a25..99b68ee517 100644 --- a/lib/pkcs7/p7encode.c +++ b/lib/pkcs7/p7encode.c @@ -61,7 +61,7 @@ sec_pkcs7_encoder_start_encrypt (SEC_PKCS7ContentInfo *cinfo, PK11SymKey *bulkkey; void *mark, *wincx; int i; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; /* Get the context in case we need it below. */ wincx = cinfo->pwfn_arg; @@ -661,7 +661,7 @@ sec_pkcs7_encoder_sig_and_certs (SEC_PKCS7ContentInfo *cinfo, SECItem **digests; SEC_PKCS7SignerInfo *signerinfo, **signerinfos; SECItem **rawcerts, ***rawcertsp; - PRArenaPool *poolp; + PLArenaPool *poolp; int certcount; int ci, cli, rci, si; @@ -1092,7 +1092,7 @@ SEC_PKCS7Encode (SEC_PKCS7ContentInfo *cinfo, * "pwfnarg" is an opaque argument to the above callback. */ SECItem * -SEC_PKCS7EncodeItem (PRArenaPool *pool, +SEC_PKCS7EncodeItem (PLArenaPool *pool, SECItem *dest, SEC_PKCS7ContentInfo *cinfo, PK11SymKey *bulkkey, diff --git a/lib/pkcs7/p7local.c b/lib/pkcs7/p7local.c index 4d9fcb5d38..6a7af1f809 100644 --- a/lib/pkcs7/p7local.c +++ b/lib/pkcs7/p7local.c @@ -140,7 +140,7 @@ sec_PKCS7CreateDecryptObject (PK11SymKey *key, SECAlgorithmID *algid) * have two simple cover functions which call it. */ sec_PKCS7CipherObject * -sec_PKCS7CreateEncryptObject (PRArenaPool *poolp, PK11SymKey *key, +sec_PKCS7CreateEncryptObject (PLArenaPool *poolp, PK11SymKey *key, SECOidTag algtag, SECAlgorithmID *algid) { sec_PKCS7CipherObject *result; @@ -923,7 +923,7 @@ static const SEC_ASN1Template sec_pkcs7_set_of_attribute_template[] = { * do the reordering.) */ SECItem * -sec_PKCS7EncodeAttributes (PRArenaPool *poolp, SECItem *dest, void *src) +sec_PKCS7EncodeAttributes (PLArenaPool *poolp, SECItem *dest, void *src) { return SEC_ASN1EncodeItem (poolp, dest, src, sec_pkcs7_set_of_attribute_template); @@ -937,7 +937,7 @@ sec_PKCS7EncodeAttributes (PRArenaPool *poolp, SECItem *dest, void *src) SECStatus sec_PKCS7ReorderAttributes (SEC_PKCS7Attribute **attrs) { - PRArenaPool *poolp; + PLArenaPool *poolp; int num_attrs, i, pass, besti; unsigned int j; SECItem **enc_attrs; diff --git a/lib/pkcs7/p7local.h b/lib/pkcs7/p7local.h index 6047f5c9c6..a9b7887486 100644 --- a/lib/pkcs7/p7local.h +++ b/lib/pkcs7/p7local.h @@ -49,7 +49,7 @@ extern SECItem *sec_PKCS7AttributeValue (SEC_PKCS7Attribute *attr); /* * Encode a set of attributes (found in "src"). */ -extern SECItem *sec_PKCS7EncodeAttributes (PRArenaPool *poolp, +extern SECItem *sec_PKCS7EncodeAttributes (PLArenaPool *poolp, SECItem *dest, void *src); /* @@ -71,7 +71,7 @@ sec_PKCS7CreateDecryptObject (PK11SymKey *key, SECAlgorithmID *algid); * and fill in the algorithm id. */ extern sec_PKCS7CipherObject * -sec_PKCS7CreateEncryptObject (PRArenaPool *poolp, PK11SymKey *key, +sec_PKCS7CreateEncryptObject (PLArenaPool *poolp, PK11SymKey *key, SECOidTag algtag, SECAlgorithmID *algid); /* diff --git a/lib/pkcs7/secmime.c b/lib/pkcs7/secmime.c index a703dc1705..12a1e20019 100644 --- a/lib/pkcs7/secmime.c +++ b/lib/pkcs7/secmime.c @@ -361,7 +361,7 @@ smime_fill_capability (smime_capability *cap) static long smime_choose_cipher (CERTCertificate *scert, CERTCertificate **rcerts) { - PRArenaPool *poolp; + PLArenaPool *poolp; long chosen_cipher; int *cipher_abilities; int *cipher_votes; diff --git a/lib/pki/pki3hack.c b/lib/pki/pki3hack.c index 2f2ede3a5b..6364eaf336 100644 --- a/lib/pki/pki3hack.c +++ b/lib/pki/pki3hack.c @@ -228,7 +228,7 @@ STAN_GetCertIdentifierFromDER(NSSArena *arenaOpt, NSSDER *der) SECItem secDER; SECItem secKey = { 0 }; SECStatus secrv; - PRArenaPool *arena; + PLArenaPool *arena; SECITEM_FROM_NSSITEM(&secDER, der); @@ -550,7 +550,7 @@ nssDecodedPKIXCertificate_Destroy ( if (cert) { PRBool freeSlot = cert->ownSlot; PK11SlotInfo *slot = cert->slot; - PRArenaPool *arena = cert->arena; + PLArenaPool *arena = cert->arena; /* zero cert before freeing. Any stale references to this cert * after this point will probably cause an exception. */ PORT_Memset(cert, 0, sizeof *cert); @@ -585,7 +585,7 @@ get_nss3trust_from_nss4trust(nssTrustLevel t) } static CERTCertTrust * -cert_trust_from_stan_trust(NSSTrust *t, PRArenaPool *arena) +cert_trust_from_stan_trust(NSSTrust *t, PLArenaPool *arena) { CERTCertTrust *rvTrust; unsigned int client; diff --git a/lib/smime/cmsarray.c b/lib/smime/cmsarray.c index 7ae96b1c47..9ac5c57d6f 100644 --- a/lib/smime/cmsarray.c +++ b/lib/smime/cmsarray.c @@ -27,7 +27,7 @@ * This allocates space for the array of pointers */ void ** -NSS_CMSArray_Alloc(PRArenaPool *poolp, int n) +NSS_CMSArray_Alloc(PLArenaPool *poolp, int n) { return (void **)PORT_ArenaZAlloc(poolp, n * sizeof(void *)); } @@ -38,7 +38,7 @@ NSS_CMSArray_Alloc(PRArenaPool *poolp, int n) * The array of pointers is either created (if array was empty before) or grown. */ SECStatus -NSS_CMSArray_Add(PRArenaPool *poolp, void ***array, void *obj) +NSS_CMSArray_Add(PLArenaPool *poolp, void ***array, void *obj) { void **p; int n; diff --git a/lib/smime/cmsattr.c b/lib/smime/cmsattr.c index df8c1c12d8..253abe9aa0 100644 --- a/lib/smime/cmsattr.c +++ b/lib/smime/cmsattr.c @@ -33,7 +33,7 @@ * with NSS_CMSAttribute_AddValue. */ NSSCMSAttribute * -NSS_CMSAttribute_Create(PRArenaPool *poolp, SECOidTag oidtag, SECItem *value, PRBool encoded) +NSS_CMSAttribute_Create(PLArenaPool *poolp, SECOidTag oidtag, SECItem *value, PRBool encoded) { NSSCMSAttribute *attr; SECItem *copiedvalue; @@ -290,7 +290,7 @@ const SEC_ASN1Template nss_cms_set_of_attribute_template[] = { * do the reordering.) */ SECItem * -NSS_CMSAttributeArray_Encode(PRArenaPool *poolp, NSSCMSAttribute ***attrs, SECItem *dest) +NSS_CMSAttributeArray_Encode(PLArenaPool *poolp, NSSCMSAttribute ***attrs, SECItem *dest) { return SEC_ASN1EncodeItem (poolp, dest, (void *)attrs, nss_cms_set_of_attribute_template); } diff --git a/lib/smime/cmscipher.c b/lib/smime/cmscipher.c index 221ad241ff..16d643615b 100644 --- a/lib/smime/cmscipher.c +++ b/lib/smime/cmscipher.c @@ -117,7 +117,7 @@ NSS_CMSCipherContext_StartDecrypt(PK11SymKey *key, SECAlgorithmID *algid) * have two simple cover functions which call it. */ NSSCMSCipherContext * -NSS_CMSCipherContext_StartEncrypt(PRArenaPool *poolp, PK11SymKey *key, SECAlgorithmID *algid) +NSS_CMSCipherContext_StartEncrypt(PLArenaPool *poolp, PK11SymKey *key, SECAlgorithmID *algid) { NSSCMSCipherContext *cc; void *ciphercx; diff --git a/lib/smime/cmsdecode.c b/lib/smime/cmsdecode.c index 135176361a..0c2ca68f3d 100644 --- a/lib/smime/cmsdecode.c +++ b/lib/smime/cmsdecode.c @@ -44,12 +44,12 @@ static SECStatus nss_cms_after_data(NSSCMSDecoderContext *p7dcx); static SECStatus nss_cms_after_end(NSSCMSDecoderContext *p7dcx); static void nss_cms_decoder_work_data(NSSCMSDecoderContext *p7dcx, const unsigned char *data, unsigned long len, PRBool final); -static NSSCMSDecoderData *nss_cms_create_decoder_data(PRArenaPool *poolp); +static NSSCMSDecoderData *nss_cms_create_decoder_data(PLArenaPool *poolp); extern const SEC_ASN1Template NSSCMSMessageTemplate[]; static NSSCMSDecoderData * -nss_cms_create_decoder_data(PRArenaPool *poolp) +nss_cms_create_decoder_data(PLArenaPool *poolp) { NSSCMSDecoderData *decoderData = NULL; @@ -591,7 +591,7 @@ nss_cms_decoder_update_filter (void *arg, const char *data, unsigned long len, * "decrypt_key_cb", "decrypt_key_cb_arg" - callback function for getting bulk key for encryptedData */ NSSCMSDecoderContext * -NSS_CMSDecoder_Start(PRArenaPool *poolp, +NSS_CMSDecoder_Start(PLArenaPool *poolp, NSSCMSContentCallback cb, void *cb_arg, PK11PasswordFunc pwfn, void *pwfn_arg, NSSCMSGetDecryptKeyCallback decrypt_key_cb, diff --git a/lib/smime/cmslocal.h b/lib/smime/cmslocal.h index 7f579110c3..ee00c05101 100644 --- a/lib/smime/cmslocal.h +++ b/lib/smime/cmslocal.h @@ -56,7 +56,7 @@ NSS_CMSCipherContext_StartDecrypt(PK11SymKey *key, SECAlgorithmID *algid); * identifier (which may include an iv) appropriately. */ extern NSSCMSCipherContext * -NSS_CMSCipherContext_StartEncrypt(PRArenaPool *poolp, PK11SymKey *key, SECAlgorithmID *algid); +NSS_CMSCipherContext_StartEncrypt(PLArenaPool *poolp, PK11SymKey *key, SECAlgorithmID *algid); extern void NSS_CMSCipherContext_Destroy(NSSCMSCipherContext *cc); @@ -188,13 +188,13 @@ extern NSSCMSRecipientEncryptedKey *NSS_CMSRecipientEncryptedKey_Create(PLArenaP * NSS_CMSArray_Alloc - allocate an array in an arena */ extern void ** -NSS_CMSArray_Alloc(PRArenaPool *poolp, int n); +NSS_CMSArray_Alloc(PLArenaPool *poolp, int n); /* * NSS_CMSArray_Add - add an element to the end of an array */ extern SECStatus -NSS_CMSArray_Add(PRArenaPool *poolp, void ***array, void *obj); +NSS_CMSArray_Add(PLArenaPool *poolp, void ***array, void *obj); /* * NSS_CMSArray_IsEmpty - check if array is empty @@ -231,7 +231,7 @@ NSS_CMSArray_Sort(void **primary, int (*compare)(void *,void *), void **secondar * with NSS_CMSAttribute_AddValue. */ extern NSSCMSAttribute * -NSS_CMSAttribute_Create(PRArenaPool *poolp, SECOidTag oidtag, SECItem *value, PRBool encoded); +NSS_CMSAttribute_Create(PLArenaPool *poolp, SECOidTag oidtag, SECItem *value, PRBool encoded); /* * NSS_CMSAttribute_AddValue - add another value to an attribute @@ -271,7 +271,7 @@ NSS_CMSAttribute_CompareValue(NSSCMSAttribute *attr, SECItem *av); * do the reordering.) */ extern SECItem * -NSS_CMSAttributeArray_Encode(PRArenaPool *poolp, NSSCMSAttribute ***attrs, SECItem *dest); +NSS_CMSAttributeArray_Encode(PLArenaPool *poolp, NSSCMSAttribute ***attrs, SECItem *dest); /* * NSS_CMSAttributeArray_Reorder - sort attribute array by attribute's DER encoding diff --git a/lib/smime/cmsrecinfo.c b/lib/smime/cmsrecinfo.c index 92e49d1e26..5e08870b29 100644 --- a/lib/smime/cmsrecinfo.c +++ b/lib/smime/cmsrecinfo.c @@ -664,7 +664,7 @@ SECStatus NSS_CMSRecipientInfo_GetCertAndKey(NSSCMSRecipientInfo *ri, return rv; } -SECStatus NSS_CMSRecipientInfo_Encode(PRArenaPool* poolp, +SECStatus NSS_CMSRecipientInfo_Encode(PLArenaPool* poolp, const NSSCMSRecipientInfo *src, SECItem* returned) { diff --git a/lib/smime/cmssigdata.c b/lib/smime/cmssigdata.c index ae2a94a206..a4527d9305 100644 --- a/lib/smime/cmssigdata.c +++ b/lib/smime/cmssigdata.c @@ -1007,7 +1007,7 @@ NSS_CMSSignedData_SetDigestValue(NSSCMSSignedData *sigd, } SECStatus -NSS_CMSSignedData_AddDigest(PRArenaPool *poolp, +NSS_CMSSignedData_AddDigest(PLArenaPool *poolp, NSSCMSSignedData *sigd, SECOidTag digestalgtag, SECItem *digest) diff --git a/lib/smime/cmssiginfo.c b/lib/smime/cmssiginfo.c index b5d67ffe17..ae35f0538b 100644 --- a/lib/smime/cmssiginfo.c +++ b/lib/smime/cmssiginfo.c @@ -271,7 +271,7 @@ NSS_CMSSignerInfo_VerifyCertificate(NSSCMSSignerInfo *signerinfo, CERTCertDBHand SECCertUsage certusage) { CERTCertificate *cert; - int64 stime; + PRTime stime; if ((cert = NSS_CMSSignerInfo_GetSigningCertificate(signerinfo, certdb)) == NULL) { signerinfo->verificationStatus = NSSCMSVS_SigningCertNotFound; diff --git a/lib/smime/cmsudf.c b/lib/smime/cmsudf.c index b18cb19368..13071113e7 100644 --- a/lib/smime/cmsudf.c +++ b/lib/smime/cmsudf.c @@ -40,7 +40,7 @@ static PRLock *nsscmstypeHashLock; /* the hash table itself */ static PLHashTable *nsscmstypeHash; /* arena to hold all the hash table data */ -static PRArenaPool *nsscmstypeArena; +static PLArenaPool *nsscmstypeArena; /* * clean up our global tables diff --git a/lib/smime/cmsutil.c b/lib/smime/cmsutil.c index 1eb3d37dfb..2fe8564319 100644 --- a/lib/smime/cmsutil.c +++ b/lib/smime/cmsutil.c @@ -27,7 +27,7 @@ SECStatus NSS_CMSArray_SortByDER(void **objs, const SEC_ASN1Template *objtemplate, void **objs2) { - PRArenaPool *poolp; + PLArenaPool *poolp; int num_objs; SECItem **enc_objs; SECStatus rv = SECFailure; diff --git a/lib/smime/smimeutil.c b/lib/smime/smimeutil.c index f4ae5e79fd..0a7d446bb3 100644 --- a/lib/smime/smimeutil.c +++ b/lib/smime/smimeutil.c @@ -352,7 +352,7 @@ nss_SMIME_FindCipherForSMIMECap(NSSSMIMECapability *cap) static long smime_choose_cipher(CERTCertificate *scert, CERTCertificate **rcerts) { - PRArenaPool *poolp; + PLArenaPool *poolp; long cipher; long chosen_cipher; int *cipher_abilities; diff --git a/lib/softoken/ecdecode.c b/lib/softoken/ecdecode.c index ead09f58b4..b04d022862 100644 --- a/lib/softoken/ecdecode.c +++ b/lib/softoken/ecdecode.c @@ -21,7 +21,7 @@ * in the hexadecimal string must be optional. */ static SECItem * -hexString2SECItem(PRArenaPool *arena, SECItem *item, const char *str) +hexString2SECItem(PLArenaPool *arena, SECItem *item, const char *str) { int i = 0; int byteval = 0; @@ -63,7 +63,7 @@ hexString2SECItem(PRArenaPool *arena, SECItem *item, const char *str) /* Copy all of the fields from srcParams into dstParams */ SECStatus -EC_CopyParams(PRArenaPool *arena, ECParams *dstParams, +EC_CopyParams(PLArenaPool *arena, ECParams *dstParams, const ECParams *srcParams) { SECStatus rv = SECFailure; @@ -147,7 +147,7 @@ gf_populate_params(ECCurveName name, ECFieldType field_type, ECParams *params) } SECStatus -EC_FillParams(PRArenaPool *arena, const SECItem *encodedParams, +EC_FillParams(PLArenaPool *arena, const SECItem *encodedParams, ECParams *params) { SECStatus rv = SECFailure; @@ -571,7 +571,7 @@ EC_FillParams(PRArenaPool *arena, const SECItem *encodedParams, SECStatus EC_DecodeParams(const SECItem *encodedParams, ECParams **ecparams) { - PRArenaPool *arena; + PLArenaPool *arena; ECParams *params; SECStatus rv = SECFailure; diff --git a/lib/softoken/legacydb/lgcreate.c b/lib/softoken/legacydb/lgcreate.c index e4f659c711..ac40031631 100644 --- a/lib/softoken/legacydb/lgcreate.c +++ b/lib/softoken/legacydb/lgcreate.c @@ -401,7 +401,7 @@ lg_createPublicKeyObject(SDB *sdb, CK_KEY_TYPE key_type, SECItem *pubKey; #ifdef NSS_ENABLE_ECC SECItem pubKey2Space = {siBuffer, NULL, 0}; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; #endif /* NSS_ENABLE_ECC */ NSSLOWKEYDBHandle *keyHandle = NULL; diff --git a/lib/softoken/legacydb/lowcert.c b/lib/softoken/legacydb/lowcert.c index fabc286cf7..f0869db9d1 100644 --- a/lib/softoken/legacydb/lowcert.c +++ b/lib/softoken/legacydb/lowcert.c @@ -345,7 +345,7 @@ nsslowcert_IsNewer(NSSLOWCERTCertificate *certa, NSSLOWCERTCertificate *certb) #define SOFT_DEFAULT_CHUNKSIZE 2048 static SECStatus -nsslowcert_KeyFromIssuerAndSN(PRArenaPool *arena, +nsslowcert_KeyFromIssuerAndSN(PLArenaPool *arena, SECItem *issuer, SECItem *sn, SECItem *key) { unsigned int len = sn->len + issuer->len; @@ -702,7 +702,7 @@ nsslowcert_FixupEmailAddr(char *emailAddr) * DER certificate. */ SECStatus -nsslowcert_KeyFromDERCert(PRArenaPool *arena, SECItem *derCert, SECItem *key) +nsslowcert_KeyFromDERCert(PLArenaPool *arena, SECItem *derCert, SECItem *key) { int rv; NSSLOWCERTCertKey certkey; @@ -730,7 +730,7 @@ nsslowcert_ExtractPublicKey(NSSLOWCERTCertificate *cert) NSSLOWKEYPublicKey *pubk; SECItem os; SECStatus rv; - PRArenaPool *arena; + PLArenaPool *arena; SECOidTag tag; SECItem newDerSubjKeyInfo; diff --git a/lib/softoken/legacydb/lowkey.c b/lib/softoken/legacydb/lowkey.c index 4532483307..f455cf9c26 100644 --- a/lib/softoken/legacydb/lowkey.c +++ b/lib/softoken/legacydb/lowkey.c @@ -154,7 +154,7 @@ const SEC_ASN1Template lg_nsslowkey_ECPrivateKeyTemplate[] = { * oid and DER data. */ SECStatus -LGEC_FillParams(PRArenaPool *arena, const SECItem *encodedParams, +LGEC_FillParams(PLArenaPool *arena, const SECItem *encodedParams, ECParams *params) { SECOidTag tag; @@ -194,7 +194,7 @@ LGEC_FillParams(PRArenaPool *arena, const SECItem *encodedParams, /* Copy all of the fields from srcParams into dstParams */ SECStatus -LGEC_CopyParams(PRArenaPool *arena, ECParams *dstParams, +LGEC_CopyParams(PLArenaPool *arena, ECParams *dstParams, const ECParams *srcParams) { SECStatus rv = SECFailure; diff --git a/lib/softoken/legacydb/lowkeyi.h b/lib/softoken/legacydb/lowkeyi.h index d23245f714..8054cc8688 100644 --- a/lib/softoken/legacydb/lowkeyi.h +++ b/lib/softoken/legacydb/lowkeyi.h @@ -140,11 +140,11 @@ nsslowkey_FindKeyNicknameByPublicKey(NSSLOWKEYDBHandle *handle, * smaller version of EC_FillParams. In this code, we only need * oid and DER data. */ -SECStatus LGEC_FillParams(PRArenaPool *arena, const SECItem *encodedParams, +SECStatus LGEC_FillParams(PLArenaPool *arena, const SECItem *encodedParams, ECParams *params); /* Copy all of the fields from srcParams into dstParams */ -SECStatus LGEC_CopyParams(PRArenaPool *arena, ECParams *dstParams, +SECStatus LGEC_CopyParams(PLArenaPool *arena, ECParams *dstParams, const ECParams *srcParams); #endif SEC_END_PROTOS diff --git a/lib/softoken/legacydb/pcert.h b/lib/softoken/legacydb/pcert.h index 159ff7061a..9d23cfc748 100644 --- a/lib/softoken/legacydb/pcert.h +++ b/lib/softoken/legacydb/pcert.h @@ -128,7 +128,7 @@ extern NSSLOWCERTCertificate * nsslowcert_DecodeDERCertificate (SECItem *derSignedCert, char *nickname); SECStatus -nsslowcert_KeyFromDERCert(PRArenaPool *arena, SECItem *derCert, SECItem *key); +nsslowcert_KeyFromDERCert(PLArenaPool *arena, SECItem *derCert, SECItem *key); certDBEntrySMime * nsslowcert_ReadDBSMimeEntry(NSSLOWCERTCertDBHandle *certHandle, diff --git a/lib/softoken/legacydb/pcertdb.c b/lib/softoken/legacydb/pcertdb.c index 347b6dd5f8..d3c757d170 100644 --- a/lib/softoken/legacydb/pcertdb.c +++ b/lib/softoken/legacydb/pcertdb.c @@ -387,7 +387,7 @@ pkcs11_copyStaticData(unsigned char *data, int len, static void DestroyDBEntry(certDBEntry *entry) { - PRArenaPool *arena = entry->common.arena; + PLArenaPool *arena = entry->common.arena; /* must be one of our certDBEntry from the free list */ if (arena == NULL) { @@ -458,7 +458,7 @@ DeleteDBEntry(NSSLOWCERTCertDBHandle *handle, certDBEntryType type, SECItem *dbk static SECStatus ReadDBEntry(NSSLOWCERTCertDBHandle *handle, certDBEntryCommon *entry, - SECItem *dbkey, SECItem *dbentry, PRArenaPool *arena) + SECItem *dbkey, SECItem *dbentry, PLArenaPool *arena) { DBT data, key; int ret; @@ -574,7 +574,7 @@ WriteDBEntry(NSSLOWCERTCertDBHandle *handle, certDBEntryCommon *entry, * encode a database cert record */ static SECStatus -EncodeDBCertEntry(certDBEntryCert *entry, PRArenaPool *arena, SECItem *dbitem) +EncodeDBCertEntry(certDBEntryCert *entry, PLArenaPool *arena, SECItem *dbitem) { unsigned int nnlen; unsigned char *buf; @@ -630,7 +630,7 @@ EncodeDBCertEntry(certDBEntryCert *entry, PRArenaPool *arena, SECItem *dbitem) * encode a database key for a cert record */ static SECStatus -EncodeDBCertKey(const SECItem *certKey, PRArenaPool *arena, SECItem *dbkey) +EncodeDBCertKey(const SECItem *certKey, PLArenaPool *arena, SECItem *dbkey) { unsigned int len = certKey->len + SEC_DB_KEY_HEADER_LEN; if (len > NSS_MAX_LEGACY_DB_KEY_SIZE) @@ -656,7 +656,7 @@ EncodeDBCertKey(const SECItem *certKey, PRArenaPool *arena, SECItem *dbkey) } static SECStatus -EncodeDBGenericKey(const SECItem *certKey, PRArenaPool *arena, SECItem *dbkey, +EncodeDBGenericKey(const SECItem *certKey, PLArenaPool *arena, SECItem *dbkey, certDBEntryType entryType) { /* @@ -789,7 +789,7 @@ NewDBCertEntry(SECItem *derCert, char *nickname, NSSLOWCERTCertTrust *trust, int flags) { certDBEntryCert *entry; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; int nnlen; arena = PORT_NewArena( DER_DEFAULT_CHUNKSIZE ); @@ -856,7 +856,7 @@ DecodeV4DBCertEntry(unsigned char *buf, int len) certDBEntryCert *entry; int certlen; int nnlen; - PRArenaPool *arena; + PLArenaPool *arena; /* make sure length is at least long enough for the header */ if ( len < DBCERT_V4_HEADER_LEN ) { @@ -934,7 +934,7 @@ static SECStatus WriteDBCertEntry(NSSLOWCERTCertDBHandle *handle, certDBEntryCert *entry) { SECItem dbitem, dbkey; - PRArenaPool *tmparena = NULL; + PLArenaPool *tmparena = NULL; SECItem tmpitem; SECStatus rv; @@ -1101,7 +1101,7 @@ ReadDBCertEntry(NSSLOWCERTCertDBHandle *handle, const SECItem *certKey) * encode a database cert record */ static SECStatus -EncodeDBCrlEntry(certDBEntryRevocation *entry, PRArenaPool *arena, SECItem *dbitem) +EncodeDBCrlEntry(certDBEntryRevocation *entry, PLArenaPool *arena, SECItem *dbitem) { unsigned int nnlen = 0; unsigned char *buf; @@ -1205,7 +1205,7 @@ static certDBEntryRevocation * NewDBCrlEntry(SECItem *derCrl, char * url, certDBEntryType crlType, int flags) { certDBEntryRevocation *entry; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; int nnlen; arena = PORT_NewArena( DER_DEFAULT_CHUNKSIZE ); @@ -1265,7 +1265,7 @@ WriteDBCrlEntry(NSSLOWCERTCertDBHandle *handle, certDBEntryRevocation *entry, SECItem *crlKey ) { SECItem dbkey; - PRArenaPool *tmparena = NULL; + PLArenaPool *tmparena = NULL; SECItem encodedEntry; SECStatus rv; @@ -1307,7 +1307,7 @@ DeleteDBCrlEntry(NSSLOWCERTCertDBHandle *handle, const SECItem *crlKey, certDBEntryType crlType) { SECItem dbkey; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; SECStatus rv; arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); @@ -1343,8 +1343,8 @@ static certDBEntryRevocation * ReadDBCrlEntry(NSSLOWCERTCertDBHandle *handle, SECItem *certKey, certDBEntryType crlType) { - PRArenaPool *arena = NULL; - PRArenaPool *tmparena = NULL; + PLArenaPool *arena = NULL; + PLArenaPool *tmparena = NULL; certDBEntryRevocation *entry; SECItem dbkey; SECItem dbentry; @@ -1411,7 +1411,7 @@ nsslowcert_DestroyDBEntry(certDBEntry *entry) * Encode a database nickname record */ static SECStatus -EncodeDBNicknameEntry(certDBEntryNickname *entry, PRArenaPool *arena, +EncodeDBNicknameEntry(certDBEntryNickname *entry, PLArenaPool *arena, SECItem *dbitem) { unsigned char *buf; @@ -1443,7 +1443,7 @@ EncodeDBNicknameEntry(certDBEntryNickname *entry, PRArenaPool *arena, * Encode a database key for a nickname record */ static SECStatus -EncodeDBNicknameKey(char *nickname, PRArenaPool *arena, +EncodeDBNicknameKey(char *nickname, PLArenaPool *arena, SECItem *dbkey) { unsigned int nnlen; @@ -1523,7 +1523,7 @@ DecodeDBNicknameEntry(certDBEntryNickname *entry, SECItem *dbentry, static certDBEntryNickname * NewDBNicknameEntry(char *nickname, SECItem *subjectName, unsigned int flags) { - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; certDBEntryNickname *entry; int nnlen; SECStatus rv; @@ -1577,7 +1577,7 @@ NewDBNicknameEntry(char *nickname, SECItem *subjectName, unsigned int flags) static SECStatus DeleteDBNicknameEntry(NSSLOWCERTCertDBHandle *handle, char *nickname) { - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; SECStatus rv; SECItem dbkey; @@ -1617,8 +1617,8 @@ DeleteDBNicknameEntry(NSSLOWCERTCertDBHandle *handle, char *nickname) static certDBEntryNickname * ReadDBNicknameEntry(NSSLOWCERTCertDBHandle *handle, char *nickname) { - PRArenaPool *arena = NULL; - PRArenaPool *tmparena = NULL; + PLArenaPool *arena = NULL; + PLArenaPool *tmparena = NULL; certDBEntryNickname *entry; SECItem dbkey; SECItem dbentry; @@ -1688,7 +1688,7 @@ static SECStatus WriteDBNicknameEntry(NSSLOWCERTCertDBHandle *handle, certDBEntryNickname *entry) { SECItem dbitem, dbkey; - PRArenaPool *tmparena = NULL; + PLArenaPool *tmparena = NULL; SECStatus rv; tmparena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); @@ -1724,7 +1724,7 @@ WriteDBNicknameEntry(NSSLOWCERTCertDBHandle *handle, certDBEntryNickname *entry) } static SECStatus -EncodeDBSMimeEntry(certDBEntrySMime *entry, PRArenaPool *arena, +EncodeDBSMimeEntry(certDBEntrySMime *entry, PLArenaPool *arena, SECItem *dbitem) { unsigned char *buf; @@ -1778,7 +1778,7 @@ EncodeDBSMimeEntry(certDBEntrySMime *entry, PRArenaPool *arena, * Encode a database key for a SMIME record */ static SECStatus -EncodeDBSMimeKey(char *emailAddr, PRArenaPool *arena, +EncodeDBSMimeKey(char *emailAddr, PLArenaPool *arena, SECItem *dbkey) { unsigned int addrlen; @@ -1901,7 +1901,7 @@ static certDBEntrySMime * NewDBSMimeEntry(char *emailAddr, SECItem *subjectName, SECItem *smimeOptions, SECItem *optionsDate, unsigned int flags) { - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; certDBEntrySMime *entry; int addrlen; SECStatus rv; @@ -1980,7 +1980,7 @@ NewDBSMimeEntry(char *emailAddr, SECItem *subjectName, SECItem *smimeOptions, static SECStatus DeleteDBSMimeEntry(NSSLOWCERTCertDBHandle *handle, char *emailAddr) { - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; SECStatus rv; SECItem dbkey; @@ -2016,8 +2016,8 @@ DeleteDBSMimeEntry(NSSLOWCERTCertDBHandle *handle, char *emailAddr) certDBEntrySMime * nsslowcert_ReadDBSMimeEntry(NSSLOWCERTCertDBHandle *handle, char *emailAddr) { - PRArenaPool *arena = NULL; - PRArenaPool *tmparena = NULL; + PLArenaPool *arena = NULL; + PLArenaPool *tmparena = NULL; certDBEntrySMime *entry; SECItem dbkey; SECItem dbentry; @@ -2087,7 +2087,7 @@ static SECStatus WriteDBSMimeEntry(NSSLOWCERTCertDBHandle *handle, certDBEntrySMime *entry) { SECItem dbitem, dbkey; - PRArenaPool *tmparena = NULL; + PLArenaPool *tmparena = NULL; SECStatus rv; tmparena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); @@ -2126,7 +2126,7 @@ WriteDBSMimeEntry(NSSLOWCERTCertDBHandle *handle, certDBEntrySMime *entry) * Encode a database subject record */ static SECStatus -EncodeDBSubjectEntry(certDBEntrySubject *entry, PRArenaPool *arena, +EncodeDBSubjectEntry(certDBEntrySubject *entry, PLArenaPool *arena, SECItem *dbitem) { unsigned char *buf; @@ -2235,7 +2235,7 @@ EncodeDBSubjectEntry(certDBEntrySubject *entry, PRArenaPool *arena, * Encode a database key for a subject record */ static SECStatus -EncodeDBSubjectKey(SECItem *derSubject, PRArenaPool *arena, +EncodeDBSubjectKey(SECItem *derSubject, PLArenaPool *arena, SECItem *dbkey) { dbkey->len = derSubject->len + SEC_DB_KEY_HEADER_LEN; @@ -2259,7 +2259,7 @@ static SECStatus DecodeDBSubjectEntry(certDBEntrySubject *entry, SECItem *dbentry, const SECItem *derSubject) { - PRArenaPool *arena = entry->common.arena; + PLArenaPool *arena = entry->common.arena; unsigned char *tmpbuf; unsigned char *end; void *mark = PORT_ArenaMark(arena); @@ -2426,7 +2426,7 @@ NewDBSubjectEntry(SECItem *derSubject, SECItem *certKey, SECItem *keyID, char *nickname, char *emailAddr, unsigned int flags) { - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; certDBEntrySubject *entry; SECStatus rv; unsigned int nnlen; @@ -2529,7 +2529,7 @@ static SECStatus DeleteDBSubjectEntry(NSSLOWCERTCertDBHandle *handle, SECItem *derSubject) { SECItem dbkey; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; SECStatus rv; arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); @@ -2564,8 +2564,8 @@ DeleteDBSubjectEntry(NSSLOWCERTCertDBHandle *handle, SECItem *derSubject) static certDBEntrySubject * ReadDBSubjectEntry(NSSLOWCERTCertDBHandle *handle, SECItem *derSubject) { - PRArenaPool *arena = NULL; - PRArenaPool *tmparena = NULL; + PLArenaPool *arena = NULL; + PLArenaPool *tmparena = NULL; certDBEntrySubject *entry; SECItem dbkey; SECItem dbentry; @@ -2629,7 +2629,7 @@ static SECStatus WriteDBSubjectEntry(NSSLOWCERTCertDBHandle *handle, certDBEntrySubject *entry) { SECItem dbitem, dbkey; - PRArenaPool *tmparena = NULL; + PLArenaPool *tmparena = NULL; SECStatus rv; tmparena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); @@ -2795,7 +2795,7 @@ AddNicknameToSubject(NSSLOWCERTCertDBHandle *dbhandle, static certDBEntryVersion * NewDBVersionEntry(unsigned int flags) { - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; certDBEntryVersion *entry; arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); @@ -2830,8 +2830,8 @@ NewDBVersionEntry(unsigned int flags) static certDBEntryVersion * ReadDBVersionEntry(NSSLOWCERTCertDBHandle *handle) { - PRArenaPool *arena = NULL; - PRArenaPool *tmparena = NULL; + PLArenaPool *arena = NULL; + PLArenaPool *tmparena = NULL; certDBEntryVersion *entry; SECItem dbkey; SECItem dbentry; @@ -2894,7 +2894,7 @@ static SECStatus WriteDBVersionEntry(NSSLOWCERTCertDBHandle *handle, certDBEntryVersion *entry) { SECItem dbitem, dbkey; - PRArenaPool *tmparena = NULL; + PLArenaPool *tmparena = NULL; SECStatus rv; tmparena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); @@ -3833,7 +3833,7 @@ UpdateV4DB(NSSLOWCERTCertDBHandle *handle, DB *updatedb) DBT key, data; certDBEntryCert *entry, *entry2; int ret; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; NSSLOWCERTCertificate *cert; ret = (* updatedb->seq)(updatedb, &key, &data, R_FIRST); @@ -3890,7 +3890,7 @@ nsslowcert_CertDBKeyConflict(SECItem *derCert, NSSLOWCERTCertDBHandle *handle) DBT namekey; int ret; SECItem keyitem; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; SECItem derKey; arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); @@ -4350,7 +4350,7 @@ certcallback(SECItem *dbdata, SECItem *dbkey, certDBEntryType type, void *data) certDBEntryCert *entry; SECItem entryitem; NSSLOWCERTCertificate *cert; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); if ( arena == NULL ) { @@ -4904,7 +4904,7 @@ nsslowcert_FindTrustByIssuerAndSN(NSSLOWCERTCertDBHandle *handle, NSSLOWCERTCertificate * nsslowcert_FindCertByDERCert(NSSLOWCERTCertDBHandle *handle, SECItem *derCert) { - PRArenaPool *arena; + PLArenaPool *arena; SECItem certKey; SECStatus rv; NSSLOWCERTCertificate *cert = NULL; @@ -5072,7 +5072,7 @@ nsslowcert_FindCrlByKey(NSSLOWCERTCertDBHandle *handle, SECItem keyitem; DBT key; SECStatus rv; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; certDBEntryRevocation *entry = NULL; certDBEntryType crlType = isKRL ? certDBEntryTypeKeyRevocation : certDBEntryTypeRevocation; diff --git a/lib/softoken/legacydb/pcertt.h b/lib/softoken/legacydb/pcertt.h index d6c98011f8..b4c9128573 100644 --- a/lib/softoken/legacydb/pcertt.h +++ b/lib/softoken/legacydb/pcertt.h @@ -34,7 +34,7 @@ typedef struct NSSLOWCERTValidityStr NSSLOWCERTValidity; ** An X.509 validity object */ struct NSSLOWCERTValidityStr { - PRArenaPool *arena; + PLArenaPool *arena; SECItem notBefore; SECItem notAfter; }; @@ -61,7 +61,7 @@ struct NSSLOWCERTSignedDataStr { ** An X.509 subject-public-key-info object */ struct NSSLOWCERTSubjectPublicKeyInfoStr { - PRArenaPool *arena; + PLArenaPool *arena; SECAlgorithmID algorithm; SECItem subjectPublicKey; }; @@ -190,7 +190,7 @@ typedef struct { certDBEntryType type; unsigned int version; unsigned int flags; - PRArenaPool *arena; + PLArenaPool *arena; } certDBEntryCommon; /* diff --git a/lib/softoken/lgglue.c b/lib/softoken/lgglue.c index 55933ddde4..c7b82bd1d2 100644 --- a/lib/softoken/lgglue.c +++ b/lib/softoken/lgglue.c @@ -166,7 +166,7 @@ sftkdb_LoadLibrary(const char *libname) * various keys and attributes. */ static SECStatus -sftkdb_encrypt_stub(PRArenaPool *arena, SDB *sdb, SECItem *plainText, +sftkdb_encrypt_stub(PLArenaPool *arena, SDB *sdb, SECItem *plainText, SECItem **cipherText) { SFTKDBHandle *handle = sdb->app_private; diff --git a/lib/softoken/lgglue.h b/lib/softoken/lgglue.h index 68d3b93208..b87f7567e9 100644 --- a/lib/softoken/lgglue.h +++ b/lib/softoken/lgglue.h @@ -10,7 +10,7 @@ * function prototypes for the callbacks into softoken from the legacyDB */ -typedef SECStatus (*LGEncryptFunc)(PRArenaPool *arena, SDB *sdb, +typedef SECStatus (*LGEncryptFunc)(PLArenaPool *arena, SDB *sdb, SECItem *plainText, SECItem **cipherText); typedef SECStatus (*LGDecryptFunc)(SDB *sdb, SECItem *cipherText, SECItem **plainText); diff --git a/lib/softoken/lowpbe.c b/lib/softoken/lowpbe.c index ebb23c29eb..d976d57621 100644 --- a/lib/softoken/lowpbe.c +++ b/lib/softoken/lowpbe.c @@ -426,7 +426,7 @@ nsspkcs5_PKCS12PBE(const SECHashObject *hashObject, NSSPKCS5PBEParameter *pbe_param, SECItem *pwitem, PBEBitGenID bitGenPurpose, unsigned int bytesNeeded) { - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; unsigned int SLen,PLen; unsigned int hashLength = hashObject->length; unsigned char *S, *P; @@ -741,7 +741,7 @@ nsspkcs5_FillInParam(SECOidTag algorithm, NSSPKCS5PBEParameter *pbe_param) NSSPKCS5PBEParameter * nsspkcs5_NewParam(SECOidTag alg, SECItem *salt, int iterator) { - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; NSSPKCS5PBEParameter *pbe_param = NULL; SECStatus rv = SECFailure; @@ -1277,7 +1277,7 @@ nsspkcs5_CipherData(NSSPKCS5PBEParameter *pbe_param, SECItem *pwitem, * SECOID_DestroyAlgorithmID */ SECAlgorithmID * -nsspkcs5_CreateAlgorithmID(PRArenaPool *arena, SECOidTag algorithm, +nsspkcs5_CreateAlgorithmID(PLArenaPool *arena, SECOidTag algorithm, NSSPKCS5PBEParameter *pbe_param) { SECAlgorithmID *algid, *ret_algid = NULL; diff --git a/lib/softoken/lowpbe.h b/lib/softoken/lowpbe.h index 655ec5a6c9..00c1007f55 100644 --- a/lib/softoken/lowpbe.h +++ b/lib/softoken/lowpbe.h @@ -30,7 +30,7 @@ typedef enum { typedef struct NSSPKCS5PBEParameterStr NSSPKCS5PBEParameter; struct NSSPKCS5PBEParameterStr { - PRArenaPool *poolp; + PLArenaPool *poolp; SECItem salt; /* octet string */ SECItem iteration; /* integer */ SECItem keyLength; /* integer */ @@ -60,7 +60,7 @@ SEC_BEGIN_PROTOS * Otherwise, a pointer to the algorithm id is returned. */ extern SECAlgorithmID * -nsspkcs5_CreateAlgorithmID(PRArenaPool *arena, SECOidTag algorithm, +nsspkcs5_CreateAlgorithmID(PLArenaPool *arena, SECOidTag algorithm, NSSPKCS5PBEParameter *pbe); /* diff --git a/lib/softoken/padbuf.c b/lib/softoken/padbuf.c index 549fdeab76..1f030b84d8 100644 --- a/lib/softoken/padbuf.c +++ b/lib/softoken/padbuf.c @@ -14,7 +14,7 @@ * we assume (and use) XP memory (re)allocation. */ unsigned char * -CBC_PadBuffer(PRArenaPool *arena, unsigned char *inbuf, unsigned int inlen, +CBC_PadBuffer(PLArenaPool *arena, unsigned char *inbuf, unsigned int inlen, unsigned int *outlen, int blockSize) { unsigned char *outbuf; diff --git a/lib/softoken/pkcs11c.c b/lib/softoken/pkcs11c.c index c13bd9cf08..89b5bd85e8 100644 --- a/lib/softoken/pkcs11c.c +++ b/lib/softoken/pkcs11c.c @@ -53,8 +53,8 @@ #include "pkcs11f.h" typedef struct { - uint8 client_version[2]; - uint8 random[46]; + PRUint8 client_version[2]; + PRUint8 random[46]; } SSL3RSAPreMasterSecret; static void sftk_Null(void *data, PRBool freeit) @@ -3287,7 +3287,7 @@ nsc_SetupHMACKeyGen(CK_MECHANISM_PTR pMechanism, NSSPKCS5PBEParameter **pbe) SECItem salt; CK_PBE_PARAMS *pbe_params = NULL; NSSPKCS5PBEParameter *params; - PRArenaPool *arena = NULL; + PLArenaPool *arena = NULL; SECStatus rv; *pbe = NULL; @@ -5337,11 +5337,11 @@ sftk_MapKeySize(CK_KEY_TYPE keyType) */ static CK_RV sftk_compute_ANSI_X9_63_kdf(CK_BYTE **key, CK_ULONG key_len, SECItem *SharedSecret, CK_BYTE_PTR SharedInfo, CK_ULONG SharedInfoLen, - SECStatus Hash(unsigned char *, const unsigned char *, uint32), + SECStatus Hash(unsigned char *, const unsigned char *, PRUint32), CK_ULONG HashLen) { unsigned char *buffer = NULL, *output_buffer = NULL; - uint32 buffer_len, max_counter, i; + PRUint32 buffer_len, max_counter, i; SECStatus rv; /* Check that key_len isn't too long. The maximum key length could be diff --git a/lib/softoken/sftkdb.c b/lib/softoken/sftkdb.c index 5495871ad3..149191018e 100644 --- a/lib/softoken/sftkdb.c +++ b/lib/softoken/sftkdb.c @@ -569,7 +569,7 @@ sftk_signTemplate(PLArenaPool *arena, SFTKDBHandle *handle, } static CK_RV -sftkdb_CreateObject(PRArenaPool *arena, SFTKDBHandle *handle, +sftkdb_CreateObject(PLArenaPool *arena, SFTKDBHandle *handle, SDB *db, CK_OBJECT_HANDLE *objectID, CK_ATTRIBUTE *template, CK_ULONG count) { @@ -1016,7 +1016,7 @@ sftkdb_checkConflicts(SDB *db, CK_OBJECT_CLASS objectType, * */ static CK_RV -sftkdb_resolveConflicts(PRArenaPool *arena, CK_OBJECT_CLASS objectType, +sftkdb_resolveConflicts(PLArenaPool *arena, CK_OBJECT_CLASS objectType, CK_ATTRIBUTE *ptemplate, CK_ULONG *plen) { CK_ATTRIBUTE *attr; @@ -1088,7 +1088,7 @@ sftkdb_resolveConflicts(PRArenaPool *arena, CK_OBJECT_CLASS objectType, * set an attribute and sign it if necessary */ static CK_RV -sftkdb_setAttributeValue(PRArenaPool *arena, SFTKDBHandle *handle, +sftkdb_setAttributeValue(PLArenaPool *arena, SFTKDBHandle *handle, SDB *db, CK_OBJECT_HANDLE objectID, const CK_ATTRIBUTE *template, CK_ULONG count) { @@ -1735,7 +1735,7 @@ sftkdb_getULongFromTemplate(CK_ATTRIBUTE_TYPE type, * CKA_ID the it has returned in the passed. */ static CK_RV -sftkdb_incrementCKAID(PRArenaPool *arena, CK_ATTRIBUTE *ptemplate) +sftkdb_incrementCKAID(PLArenaPool *arena, CK_ATTRIBUTE *ptemplate) { unsigned char *buf = ptemplate->pValue; CK_ULONG len = ptemplate->ulValueLen; @@ -1829,7 +1829,7 @@ typedef enum { * any SFTKDB_MODIFY_OBJECT returns. */ sftkdbUpdateStatus -sftkdb_reconcileTrustEntry(PRArenaPool *arena, CK_ATTRIBUTE *target, +sftkdb_reconcileTrustEntry(PLArenaPool *arena, CK_ATTRIBUTE *target, CK_ATTRIBUTE *source) { CK_ULONG targetTrust = sftkdb_getULongFromTemplate(target->type, @@ -1916,7 +1916,7 @@ const CK_ATTRIBUTE_TYPE sftkdb_trustList[] = * trust object (overwriting the existing one). */ static sftkdbUpdateStatus -sftkdb_reconcileTrust(PRArenaPool *arena, SDB *db, CK_OBJECT_HANDLE id, +sftkdb_reconcileTrust(PLArenaPool *arena, SDB *db, CK_OBJECT_HANDLE id, CK_ATTRIBUTE *ptemplate, CK_ULONG *plen) { CK_ATTRIBUTE trustTemplate[SFTK_TRUST_TEMPLATE_COUNT]; @@ -2002,7 +2002,7 @@ sftkdb_reconcileTrust(PRArenaPool *arena, SDB *db, CK_OBJECT_HANDLE id, } static sftkdbUpdateStatus -sftkdb_handleIDAndName(PRArenaPool *arena, SDB *db, CK_OBJECT_HANDLE id, +sftkdb_handleIDAndName(PLArenaPool *arena, SDB *db, CK_OBJECT_HANDLE id, CK_ATTRIBUTE *ptemplate, CK_ULONG *plen) { sftkdbUpdateStatus update = SFTKDB_DO_NOTHING; @@ -2081,7 +2081,7 @@ sftkdb_handleIDAndName(PRArenaPool *arena, SDB *db, CK_OBJECT_HANDLE id, * as SFTK_DONT_UPDATE and SFTK_UPDATE respectively. */ static PRBool -sftkdb_updateObjectTemplate(PRArenaPool *arena, SDB *db, +sftkdb_updateObjectTemplate(PLArenaPool *arena, SDB *db, CK_OBJECT_CLASS objectType, CK_ATTRIBUTE *ptemplate, CK_ULONG *plen, CK_OBJECT_HANDLE *targetID) diff --git a/lib/softoken/softoken.h b/lib/softoken/softoken.h index ccf9a2dd9b..4abd2c0db4 100644 --- a/lib/softoken/softoken.h +++ b/lib/softoken/softoken.h @@ -137,11 +137,11 @@ SECStatus RSA_DecryptRaw(NSSLOWKEYPrivateKey *key, unsigned char *output, /* ** pepare an ECParam structure from DEREncoded params */ -extern SECStatus EC_FillParams(PRArenaPool *arena, +extern SECStatus EC_FillParams(PLArenaPool *arena, const SECItem *encodedParams, ECParams *params); extern SECStatus EC_DecodeParams(const SECItem *encodedParams, ECParams **ecparams); -extern SECStatus EC_CopyParams(PRArenaPool *arena, ECParams *dstParams, +extern SECStatus EC_CopyParams(PLArenaPool *arena, ECParams *dstParams, const ECParams *srcParams); #endif @@ -159,7 +159,7 @@ extern SECStatus EC_CopyParams(PRArenaPool *arena, ECParams *dstParams, ** NOTE: If arena is non-NULL, we re-allocate from there, otherwise ** we assume (and use) PR memory (re)allocation. */ -extern unsigned char * CBC_PadBuffer(PRArenaPool *arena, unsigned char *inbuf, +extern unsigned char * CBC_PadBuffer(PLArenaPool *arena, unsigned char *inbuf, unsigned int inlen, unsigned int *outlen, int blockSize); diff --git a/lib/ssl/ssl3con.c b/lib/ssl/ssl3con.c index fad5f39ef2..e13737fc05 100644 --- a/lib/ssl/ssl3con.c +++ b/lib/ssl/ssl3con.c @@ -153,7 +153,7 @@ static ssl3CipherSuiteCfg cipherSuites[ssl_V3_SUITES_IMPLEMENTED] = { * precedence (desirability). It only includes compression methods we * implement. */ -static const /*SSLCompressionMethod*/ uint8 compressions [] = { +static const /*SSLCompressionMethod*/ PRUint8 compressions [] = { #ifdef NSS_ENABLE_ZLIB ssl_compression_deflate, #endif @@ -180,7 +180,7 @@ compressionEnabled(sslSocket *ss, SSLCompressionMethod compression) } } -static const /*SSL3ClientCertificateType */ uint8 certificate_types [] = { +static const /*SSL3ClientCertificateType */ PRUint8 certificate_types [] = { ct_RSA_sign, ct_DSS_sign, #ifdef NSS_ENABLE_ECC @@ -2825,7 +2825,7 @@ ssl3_HandleNoCertificate(sslSocket *ss) SECStatus SSL3_SendAlert(sslSocket *ss, SSL3AlertLevel level, SSL3AlertDescription desc) { - uint8 bytes[2]; + PRUint8 bytes[2]; SECStatus rv; SSL_TRC(3, ("%d: SSL3[%d]: send alert record, level=%d desc=%d", @@ -3045,7 +3045,7 @@ ssl3_HandleAlert(sslSocket *ss, sslBuffer *buf) static SECStatus ssl3_SendChangeCipherSpecs(sslSocket *ss) { - uint8 change = change_cipher_spec_choice; + PRUint8 change = change_cipher_spec_choice; ssl3CipherSpec * pwSpec; SECStatus rv; PRInt32 sent; @@ -3635,8 +3635,8 @@ SECStatus ssl3_AppendHandshakeNumber(sslSocket *ss, PRInt32 num, PRInt32 lenSize) { SECStatus rv; - uint8 b[4]; - uint8 * p = b; + PRUint8 b[4]; + PRUint8 * p = b; switch (lenSize) { case 4: @@ -3777,7 +3777,7 @@ PRInt32 ssl3_ConsumeHandshakeNumber(sslSocket *ss, PRInt32 bytes, SSL3Opaque **b, PRUint32 *length) { - uint8 *buf = *b; + PRUint8 *buf = *b; int i; PRInt32 num = 0; @@ -5770,7 +5770,7 @@ ssl3_BigIntGreaterThanOne(const SECItem* mpint) { static SECStatus ssl3_HandleServerKeyExchange(sslSocket *ss, SSL3Opaque *b, PRUint32 length) { - PRArenaPool * arena = NULL; + PLArenaPool * arena = NULL; SECKEYPublicKey *peerKey = NULL; PRBool isTLS; SECStatus rv; @@ -6008,7 +6008,7 @@ typedef struct dnameNode { static SECStatus ssl3_HandleCertificateRequest(sslSocket *ss, SSL3Opaque *b, PRUint32 length) { - PRArenaPool * arena = NULL; + PLArenaPool * arena = NULL; dnameNode * node; PRInt32 remaining; PRBool isTLS = PR_FALSE; @@ -7742,7 +7742,7 @@ ssl3_SendCertificateRequest(sslSocket *ss) { SECItem * name; CERTDistNames *ca_list; - const uint8 * certTypes; + const PRUint8 *certTypes; SECItem * names = NULL; SECStatus rv; int length; @@ -8486,7 +8486,7 @@ ssl3_SendCertificateStatus(sslSocket *ss) static void ssl3_CleanupPeerCerts(sslSocket *ss) { - PRArenaPool * arena = ss->ssl3.peerCertArena; + PLArenaPool * arena = ss->ssl3.peerCertArena; ssl3CertNode *certs = (ssl3CertNode *)ss->ssl3.peerCertChain; for (; certs; certs = certs->next) { @@ -9705,7 +9705,7 @@ ssl3_HandleHandshake(sslSocket *ss, sslBuffer *origBuf) } while (buf->len > 0) { if (ss->ssl3.hs.header_bytes < 4) { - uint8 t; + PRUint8 t; t = *(buf->buf++); buf->len--; if (ss->ssl3.hs.header_bytes++ == 0) diff --git a/lib/ssl/ssl3ecc.c b/lib/ssl/ssl3ecc.c index e527fd066c..fd08c18456 100644 --- a/lib/ssl/ssl3ecc.c +++ b/lib/ssl/ssl3ecc.c @@ -158,7 +158,7 @@ typedef struct ECDHEKeyPairStr { static ECDHEKeyPair gECDHEKeyPairs[ec_pastLastName]; SECStatus -ssl3_ECName2Params(PRArenaPool * arena, ECName curve, SECKEYECParams * params) +ssl3_ECName2Params(PLArenaPool * arena, ECName curve, SECKEYECParams * params) { SECOidData *oidData = NULL; @@ -570,7 +570,7 @@ ssl3_CreateECDHEphemeralKeys(sslSocket *ss, ECName ec_curve) SECStatus ssl3_HandleECDHServerKeyExchange(sslSocket *ss, SSL3Opaque *b, PRUint32 length) { - PRArenaPool * arena = NULL; + PLArenaPool * arena = NULL; SECKEYPublicKey *peerKey = NULL; PRBool isTLS; SECStatus rv; diff --git a/lib/ssl/ssl3ext.c b/lib/ssl/ssl3ext.c index b7cd52c012..754e5d8be1 100644 --- a/lib/ssl/ssl3ext.c +++ b/lib/ssl/ssl3ext.c @@ -96,18 +96,18 @@ static SECStatus ssl3_AppendNumberToItem(SECItem *item, PRUint32 num, PRInt32 lenSize) { SECStatus rv; - uint8 b[4]; - uint8 * p = b; + PRUint8 b[4]; + PRUint8 * p = b; switch (lenSize) { case 4: - *p++ = (uint8) (num >> 24); + *p++ = (PRUint8) (num >> 24); case 3: - *p++ = (uint8) (num >> 16); + *p++ = (PRUint8) (num >> 16); case 2: - *p++ = (uint8) (num >> 8); + *p++ = (PRUint8) (num >> 8); case 1: - *p = (uint8) num; + *p = (PRUint8) num; } rv = ssl3_AppendToItem(item, &b[0], lenSize); return rv; @@ -775,7 +775,7 @@ ssl3_SendNewSessionTicket(sslSocket *ss) PRUint32 padding_length; PRUint32 message_length; PRUint32 cert_length; - uint8 length_buf[4]; + PRUint8 length_buf[4]; PRUint32 now; PK11SymKey *aes_key_pkcs11; PK11SymKey *mac_key_pkcs11; diff --git a/lib/ssl/ssl3prot.h b/lib/ssl/ssl3prot.h index 09a5cc4282..5187869276 100644 --- a/lib/ssl/ssl3prot.h +++ b/lib/ssl/ssl3prot.h @@ -9,12 +9,12 @@ #ifndef __ssl3proto_h_ #define __ssl3proto_h_ -typedef uint8 SSL3Opaque; +typedef PRUint8 SSL3Opaque; -typedef uint16 SSL3ProtocolVersion; +typedef PRUint16 SSL3ProtocolVersion; /* version numbers are defined in sslproto.h */ -typedef uint16 ssl3CipherSuite; +typedef PRUint16 ssl3CipherSuite; /* The cipher suites are defined in sslproto.h */ #define MAX_CERT_TYPES 10 @@ -42,14 +42,14 @@ typedef enum { typedef struct { SSL3ContentType type; SSL3ProtocolVersion version; - uint16 length; + PRUint16 length; SECItem fragment; } SSL3Plaintext; typedef struct { SSL3ContentType type; SSL3ProtocolVersion version; - uint16 length; + PRUint16 length; SECItem fragment; } SSL3Compressed; @@ -61,8 +61,8 @@ typedef struct { typedef struct { SECItem content; SSL3Opaque MAC[MAX_MAC_LENGTH]; - uint8 padding[MAX_PADDING_LENGTH]; - uint8 padding_length; + PRUint8 padding[MAX_PADDING_LENGTH]; + PRUint8 padding_length; } SSL3GenericBlockCipher; typedef enum { change_cipher_spec_choice = 1 } SSL3ChangeCipherSpecChoice; @@ -133,7 +133,7 @@ typedef enum { } SSL3HandshakeType; typedef struct { - uint8 empty; + PRUint8 empty; } SSL3HelloRequest; typedef struct { @@ -142,7 +142,7 @@ typedef struct { typedef struct { SSL3Opaque id[32]; - uint8 length; + PRUint8 length; } SSL3SessionID; typedef struct { @@ -150,7 +150,7 @@ typedef struct { SSL3Random random; SSL3SessionID session_id; SECItem cipher_suites; - uint8 cm_count; + PRUint8 cm_count; SSLCompressionMethod compression_methods[MAX_COMPRESSION_METHODS]; } SSL3ClientHello; @@ -211,8 +211,8 @@ typedef struct { } SSL3ServerParams; typedef struct { - uint8 md5[16]; - uint8 sha[20]; + PRUint8 md5[16]; + PRUint8 sha[20]; } SSL3Hashes; typedef struct { @@ -286,9 +286,9 @@ typedef struct { /* NewSessionTicket handshake message. */ typedef struct { - uint32 received_timestamp; - uint32 ticket_lifetime_hint; - SECItem ticket; + PRUint32 received_timestamp; + PRUint32 ticket_lifetime_hint; + SECItem ticket; } NewSessionTicket; typedef enum { diff --git a/lib/ssl/sslimpl.h b/lib/ssl/sslimpl.h index 2e0fbdec85..9f3f522c34 100644 --- a/lib/ssl/sslimpl.h +++ b/lib/ssl/sslimpl.h @@ -608,7 +608,7 @@ struct sslSessionIDStr { } ssl2; struct { /* values that are copied into the server's on-disk SID cache. */ - uint8 sessionIDLength; + PRUint8 sessionIDLength; SSL3Opaque sessionID[SSL3_SESSIONID_BYTES]; ssl3CipherSuite cipherSuite; @@ -865,7 +865,7 @@ struct ssl3StateStr { /* This says what cipher suites we can do, and should * be either SSL_ALLOWED or SSL_RESTRICTED */ - PRArenaPool * peerCertArena; + PLArenaPool * peerCertArena; /* These are used to keep track of the peer CA */ void * peerCertChain; /* chain while we are trying to validate it. */ @@ -919,26 +919,26 @@ typedef struct SSLWrappedSymWrappingKeyStr { } SSLWrappedSymWrappingKey; typedef struct SessionTicketStr { - uint16 ticket_version; + PRUint16 ticket_version; SSL3ProtocolVersion ssl_version; ssl3CipherSuite cipher_suite; SSLCompressionMethod compression_method; SSLSignType authAlgorithm; - uint32 authKeyBits; + PRUint32 authKeyBits; SSLKEAType keaType; - uint32 keaKeyBits; + PRUint32 keaKeyBits; /* * exchKeyType and msWrapMech contain meaningful values only if * ms_is_wrapped is true. */ - uint8 ms_is_wrapped; + PRUint8 ms_is_wrapped; SSLKEAType exchKeyType; /* XXX(wtc): same as keaType above? */ CK_MECHANISM_TYPE msWrapMech; - uint16 ms_length; + PRUint16 ms_length; SSL3Opaque master_secret[48]; ClientIdentity client_identity; SECItem peer_cert; - uint32 timestamp; + PRUint32 timestamp; SECItem srvName; /* negotiated server name */ } SessionTicket; @@ -1535,7 +1535,7 @@ typedef enum { ec_noName = 0, ec_pastLastName } ECName; -extern SECStatus ssl3_ECName2Params(PRArenaPool *arena, ECName curve, +extern SECStatus ssl3_ECName2Params(PLArenaPool *arena, ECName curve, SECKEYECParams *params); ECName ssl3_GetCurveWithECKeyStrength(PRUint32 curvemsk, int requiredECCbits); diff --git a/lib/ssl/sslinfo.c b/lib/ssl/sslinfo.c index 74172251ea..505e1db306 100644 --- a/lib/ssl/sslinfo.c +++ b/lib/ssl/sslinfo.c @@ -349,7 +349,7 @@ SSL_ExportKeyingMaterial(PRFileDesc *fd, /* construct PRF arguments */ valLen = SSL3_RANDOM_LENGTH * 2; if (hasContext) { - valLen += 2 /* uint16 length */ + contextLen; + valLen += 2 /* PRUint16 length */ + contextLen; } val = PORT_Alloc(valLen); if (!val) { diff --git a/lib/ssl/sslsnce.c b/lib/ssl/sslsnce.c index a35b076616..b0446adc17 100644 --- a/lib/ssl/sslsnce.c +++ b/lib/ssl/sslsnce.c @@ -34,7 +34,7 @@ * sidCacheEntry sidCacheData[ numSIDCacheEntries]; * certCacheEntry certCacheData[numCertCacheEntries]; * SSLWrappedSymWrappingKey keyCacheData[kt_kea_size][SSL_NUM_WRAP_MECHS]; - * uint8 keyNameSuffix[SESS_TICKET_KEY_VAR_NAME_LEN] + * PRUint8 keyNameSuffix[SESS_TICKET_KEY_VAR_NAME_LEN] * encKeyCacheEntry ticketEncKey; // Wrapped in non-bypass mode * encKeyCacheEntry ticketMacKey; // Wrapped in non-bypass mode * PRBool ticketKeysValid; @@ -215,7 +215,7 @@ struct cacheDescStr { sidCacheEntry * sidCacheData; certCacheEntry * certCacheData; SSLWrappedSymWrappingKey * keyCacheData; - uint8 * ticketKeyNameSuffix; + PRUint8 * ticketKeyNameSuffix; encKeyCacheEntry * ticketEncKey; encKeyCacheEntry * ticketMacKey; PRUint32 * ticketKeysValid; @@ -500,7 +500,7 @@ ConvertFromSID(sidCacheEntry *to, sslSessionID *from) /* This is an SSL v3 session */ to->u.ssl3.cipherSuite = from->u.ssl3.cipherSuite; - to->u.ssl3.compression = (uint16)from->u.ssl3.compression; + to->u.ssl3.compression = (PRUint16)from->u.ssl3.compression; to->u.ssl3.keys = from->u.ssl3.keys; to->u.ssl3.masterWrapMech = from->u.ssl3.masterWrapMech; to->u.ssl3.exchKeyType = from->u.ssl3.exchKeyType; @@ -531,7 +531,7 @@ ConvertToSID(sidCacheEntry * from, CERTCertDBHandle * dbHandle) { sslSessionID *to; - uint16 version = from->version; + PRUint16 version = from->version; to = PORT_ZNew(sslSessionID); if (!to) { @@ -848,7 +848,7 @@ ServerSessionIDCache(sslSessionID *sid) { sidCacheEntry sce; PRUint32 now = 0; - uint16 version = sid->version; + PRUint16 version = sid->version; cacheDesc * cache = &globalCache; if ((version >= SSL_LIBRARY_VERSION_3_0) && @@ -1127,7 +1127,7 @@ InitCache(cacheDesc *cache, int maxCacheEntries, int maxCertCacheEntries, cache->keyCacheSize = (char *)ptr - (char *)cache->keyCacheData; - cache->ticketKeyNameSuffix = (uint8 *)ptr; + cache->ticketKeyNameSuffix = (PRUint8 *)ptr; ptr = (ptrdiff_t)(cache->ticketKeyNameSuffix + SESS_TICKET_KEY_VAR_NAME_LEN); ptr = SID_ROUNDUP(ptr, SID_ALIGNMENT); @@ -1858,8 +1858,8 @@ GenerateTicketKeys(void *pwArg, unsigned char *keyName, PK11SymKey **aesKey, PK11SymKey *aesKeyTmp = NULL; PK11SymKey *macKeyTmp = NULL; cacheDesc *cache = &globalCache; - uint8 ticketKeyNameSuffixLocal[SESS_TICKET_KEY_VAR_NAME_LEN]; - uint8 *ticketKeyNameSuffix; + PRUint8 ticketKeyNameSuffixLocal[SESS_TICKET_KEY_VAR_NAME_LEN]; + PRUint8 *ticketKeyNameSuffix; if (!cache->cacheMem) { /* cache is not initalized. Use stack buffer */ @@ -2026,9 +2026,9 @@ ssl_GetSessionTicketKeys(unsigned char *keyName, unsigned char *encKey, PRBool rv = PR_FALSE; PRUint32 now = 0; cacheDesc *cache = &globalCache; - uint8 ticketMacKey[SHA256_LENGTH], ticketEncKey[AES_256_KEY_LENGTH]; - uint8 ticketKeyNameSuffixLocal[SESS_TICKET_KEY_VAR_NAME_LEN]; - uint8 *ticketMacKeyPtr, *ticketEncKeyPtr, *ticketKeyNameSuffix; + PRUint8 ticketMacKey[SHA256_LENGTH], ticketEncKey[AES_256_KEY_LENGTH]; + PRUint8 ticketKeyNameSuffixLocal[SESS_TICKET_KEY_VAR_NAME_LEN]; + PRUint8 *ticketMacKeyPtr, *ticketEncKeyPtr, *ticketKeyNameSuffix; PRBool cacheIsEnabled = PR_TRUE; if (!cache->cacheMem) { /* cache is uninitialized */ diff --git a/lib/util/derenc.c b/lib/util/derenc.c index 459878b3f4..90a9d2dfc3 100644 --- a/lib/util/derenc.c +++ b/lib/util/derenc.c @@ -443,7 +443,7 @@ der_encode(unsigned char *buf, DERTemplate *dtemplate, void *src) SECStatus -DER_Encode(PRArenaPool *arena, SECItem *dest, DERTemplate *dtemplate, void *src) +DER_Encode(PLArenaPool *arena, SECItem *dest, DERTemplate *dtemplate, void *src) { unsigned int contents_len, header_len; diff --git a/lib/util/dersubr.c b/lib/util/dersubr.c index 5913556c69..0f4c6d95c4 100644 --- a/lib/util/dersubr.c +++ b/lib/util/dersubr.c @@ -76,7 +76,7 @@ DER_StoreHeader(unsigned char *buf, unsigned int code, PRUint32 len) * of a PRInt32. */ SECStatus -DER_SetInteger(PRArenaPool *arena, SECItem *it, PRInt32 i) +DER_SetInteger(PLArenaPool *arena, SECItem *it, PRInt32 i) { unsigned char bb[4]; unsigned len; @@ -127,7 +127,7 @@ DER_SetInteger(PRArenaPool *arena, SECItem *it, PRInt32 i) * of a PRUint32. */ SECStatus -DER_SetUInteger(PRArenaPool *arena, SECItem *it, PRUint32 ui) +DER_SetUInteger(PLArenaPool *arena, SECItem *it, PRUint32 ui) { unsigned char bb[5]; int len; diff --git a/lib/util/dertime.c b/lib/util/dertime.c index 53e97ab550..3a2782771a 100644 --- a/lib/util/dertime.c +++ b/lib/util/dertime.c @@ -26,7 +26,7 @@ static const PRTime January1st10000 = LL_INIT(0x0384440c, 0xcc736000); /* gmttime must contains UTC time in micro-seconds unit */ SECStatus -DER_TimeToUTCTimeArena(PRArenaPool* arenaOpt, SECItem *dst, int64 gmttime) +DER_TimeToUTCTimeArena(PLArenaPool* arenaOpt, SECItem *dst, PRTime gmttime) { PRExplodedTime printableTime; unsigned char *d; @@ -47,7 +47,7 @@ DER_TimeToUTCTimeArena(PRArenaPool* arenaOpt, SECItem *dst, int64 gmttime) return SECFailure; } - /* Convert an int64 time to a printable format. */ + /* Convert a PRTime to a printable format. */ PR_ExplodeTime(gmttime, PR_GMTParameters, &printableTime); /* The month in UTC time is base one */ @@ -74,7 +74,7 @@ DER_TimeToUTCTimeArena(PRArenaPool* arenaOpt, SECItem *dst, int64 gmttime) } SECStatus -DER_TimeToUTCTime(SECItem *dst, int64 gmttime) +DER_TimeToUTCTime(SECItem *dst, PRTime gmttime) { return DER_TimeToUTCTimeArena(NULL, dst, gmttime); } @@ -95,13 +95,13 @@ der_TimeStringToTime(PRTime *dst, const char *string, int generalized, ** It suffices to ensure that the input "string" is at least 17 bytes long. */ SECStatus -DER_AsciiToTime(int64 *dst, const char *string) +DER_AsciiToTime(PRTime *dst, const char *string) { return der_TimeStringToTime(dst, string, UTC_STRING, NULL); } SECStatus -DER_UTCTimeToTime(int64 *dst, const SECItem *time) +DER_UTCTimeToTime(PRTime *dst, const SECItem *time) { /* Minimum valid UTCTime is yymmddhhmmZ which is 11 bytes. ** Maximum valid UTCTime is yymmddhhmmss+0000 which is 17 bytes. @@ -143,7 +143,7 @@ DER_UTCTimeToTime(int64 *dst, const SECItem *time) certificate extension, which does not have this restriction. */ SECStatus -DER_TimeToGeneralizedTimeArena(PRArenaPool* arenaOpt, SECItem *dst, int64 gmttime) +DER_TimeToGeneralizedTimeArena(PLArenaPool* arenaOpt, SECItem *dst, PRTime gmttime) { PRExplodedTime printableTime; unsigned char *d; @@ -163,7 +163,7 @@ DER_TimeToGeneralizedTimeArena(PRArenaPool* arenaOpt, SECItem *dst, int64 gmttim return SECFailure; } - /* Convert an int64 time to a printable format. */ + /* Convert a PRTime to a printable format. */ PR_ExplodeTime(gmttime, PR_GMTParameters, &printableTime); /* The month in Generalized time is base one */ @@ -188,14 +188,14 @@ DER_TimeToGeneralizedTimeArena(PRArenaPool* arenaOpt, SECItem *dst, int64 gmttim } SECStatus -DER_TimeToGeneralizedTime(SECItem *dst, int64 gmttime) +DER_TimeToGeneralizedTime(SECItem *dst, PRTime gmttime) { return DER_TimeToGeneralizedTimeArena(NULL, dst, gmttime); } SECStatus -DER_GeneralizedTimeToTime(int64 *dst, const SECItem *time) +DER_GeneralizedTimeToTime(PRTime *dst, const SECItem *time) { /* Minimum valid GeneralizedTime is ccyymmddhhmmZ which is 13 bytes. ** Maximum valid GeneralizedTime is ccyymmddhhmmss+0000 which is 19 bytes. @@ -234,7 +234,7 @@ der_TimeStringToTime(PRTime *dst, const char *string, int generalized, { PRExplodedTime genTime; long hourOff = 0, minOff = 0; - uint16 century; + PRUint16 century; char signum; if (string == NULL || dst == NULL) { diff --git a/lib/util/nssb64d.c b/lib/util/nssb64d.c index cb354975ab..375fd50819 100644 --- a/lib/util/nssb64d.c +++ b/lib/util/nssb64d.c @@ -712,7 +712,7 @@ NSSBase64Decoder_Destroy (NSSBase64Decoder *data, PRBool abort_p) * Return value is NULL on error, the Item (allocated or provided) otherwise. */ SECItem * -NSSBase64_DecodeBuffer (PRArenaPool *arenaOpt, SECItem *outItemOpt, +NSSBase64_DecodeBuffer (PLArenaPool *arenaOpt, SECItem *outItemOpt, const char *inStr, unsigned int inLen) { SECItem *out_item = NULL; diff --git a/lib/util/nssb64e.c b/lib/util/nssb64e.c index 63a82f6583..da0702c084 100644 --- a/lib/util/nssb64e.c +++ b/lib/util/nssb64e.c @@ -627,7 +627,7 @@ NSSBase64Encoder_Destroy (NSSBase64Encoder *data, PRBool abort_p) * otherwise. */ char * -NSSBase64_EncodeItem (PRArenaPool *arenaOpt, char *outStrOpt, +NSSBase64_EncodeItem (PLArenaPool *arenaOpt, char *outStrOpt, unsigned int maxOutLen, SECItem *inItem) { char *out_string = outStrOpt; diff --git a/lib/util/quickder.c b/lib/util/quickder.c index 2374ba29ce..6f518ddfd1 100644 --- a/lib/util/quickder.c +++ b/lib/util/quickder.c @@ -333,11 +333,11 @@ static SECStatus CheckSequenceTemplate(const SEC_ASN1Template* sequenceTemplate) static SECStatus DecodeItem(void* dest, const SEC_ASN1Template* templateEntry, - SECItem* src, PRArenaPool* arena, PRBool checkTag); + SECItem* src, PLArenaPool* arena, PRBool checkTag); static SECStatus DecodeSequence(void* dest, const SEC_ASN1Template* templateEntry, - SECItem* src, PRArenaPool* arena) + SECItem* src, PLArenaPool* arena) { SECStatus rv = SECSuccess; SECItem source; @@ -389,7 +389,7 @@ static SECStatus DecodeSequence(void* dest, static SECStatus DecodeInline(void* dest, const SEC_ASN1Template* templateEntry, - SECItem* src, PRArenaPool* arena, PRBool checkTag) + SECItem* src, PLArenaPool* arena, PRBool checkTag) { const SEC_ASN1Template* inlineTemplate = SEC_ASN1GetSubtemplate (templateEntry, dest, PR_FALSE); @@ -399,7 +399,7 @@ static SECStatus DecodeInline(void* dest, static SECStatus DecodePointer(void* dest, const SEC_ASN1Template* templateEntry, - SECItem* src, PRArenaPool* arena, PRBool checkTag) + SECItem* src, PLArenaPool* arena, PRBool checkTag) { const SEC_ASN1Template* ptrTemplate = SEC_ASN1GetSubtemplate (templateEntry, dest, PR_FALSE); @@ -418,7 +418,7 @@ static SECStatus DecodePointer(void* dest, static SECStatus DecodeImplicit(void* dest, const SEC_ASN1Template* templateEntry, - SECItem* src, PRArenaPool* arena) + SECItem* src, PLArenaPool* arena) { if (templateEntry->kind & SEC_ASN1_POINTER) { @@ -434,7 +434,7 @@ static SECStatus DecodeImplicit(void* dest, static SECStatus DecodeChoice(void* dest, const SEC_ASN1Template* templateEntry, - SECItem* src, PRArenaPool* arena) + SECItem* src, PLArenaPool* arena) { SECStatus rv = SECSuccess; SECItem choice; @@ -483,7 +483,7 @@ static SECStatus DecodeChoice(void* dest, static SECStatus DecodeGroup(void* dest, const SEC_ASN1Template* templateEntry, - SECItem* src, PRArenaPool* arena) + SECItem* src, PLArenaPool* arena) { SECStatus rv = SECSuccess; SECItem source; @@ -571,7 +571,7 @@ static SECStatus DecodeGroup(void* dest, static SECStatus DecodeExplicit(void* dest, const SEC_ASN1Template* templateEntry, - SECItem* src, PRArenaPool* arena) + SECItem* src, PLArenaPool* arena) { SECStatus rv = SECSuccess; SECItem subItem; @@ -598,7 +598,7 @@ static SECStatus DecodeExplicit(void* dest, static SECStatus DecodeItem(void* dest, const SEC_ASN1Template* templateEntry, - SECItem* src, PRArenaPool* arena, PRBool checkTag) + SECItem* src, PLArenaPool* arena, PRBool checkTag) { SECStatus rv = SECSuccess; SECItem temp; @@ -868,7 +868,7 @@ static SECStatus DecodeItem(void* dest, /* the function below is the public one */ -SECStatus SEC_QuickDERDecodeItem(PRArenaPool* arena, void* dest, +SECStatus SEC_QuickDERDecodeItem(PLArenaPool* arena, void* dest, const SEC_ASN1Template* templateEntry, const SECItem* src) { diff --git a/lib/util/secalgid.c b/lib/util/secalgid.c index d7a1259d76..05888abc29 100644 --- a/lib/util/secalgid.c +++ b/lib/util/secalgid.c @@ -18,7 +18,7 @@ SECOID_GetAlgorithmTag(SECAlgorithmID *id) } SECStatus -SECOID_SetAlgorithmID(PRArenaPool *arena, SECAlgorithmID *id, SECOidTag which, +SECOID_SetAlgorithmID(PLArenaPool *arena, SECAlgorithmID *id, SECOidTag which, SECItem *params) { SECOidData *oiddata; @@ -97,7 +97,7 @@ SECOID_SetAlgorithmID(PRArenaPool *arena, SECAlgorithmID *id, SECOidTag which, } SECStatus -SECOID_CopyAlgorithmID(PRArenaPool *arena, SECAlgorithmID *to, SECAlgorithmID *from) +SECOID_CopyAlgorithmID(PLArenaPool *arena, SECAlgorithmID *to, SECAlgorithmID *from) { SECStatus rv; diff --git a/lib/util/secasn1d.c b/lib/util/secasn1d.c index 81518830af..d404b72dfe 100644 --- a/lib/util/secasn1d.c +++ b/lib/util/secasn1d.c @@ -272,8 +272,8 @@ typedef struct sec_asn1d_state_struct { * SEC_ASN1DecoderFinish(). */ struct sec_DecoderContext_struct { - PRArenaPool *our_pool; /* for our internal allocs */ - PRArenaPool *their_pool; /* for destination structure allocs */ + PLArenaPool *our_pool; /* for our internal allocs */ + PLArenaPool *their_pool; /* for destination structure allocs */ #ifdef SEC_ASN1D_FREE_ON_ERROR /* * XXX see comment below (by same * ifdef) that explains why this @@ -304,7 +304,7 @@ struct sec_DecoderContext_struct { * XXX this is a fairly generic function that may belong elsewhere */ static void * -sec_asn1d_alloc (PRArenaPool *poolp, unsigned long len) +sec_asn1d_alloc (PLArenaPool *poolp, unsigned long len) { void *thing; @@ -328,7 +328,7 @@ sec_asn1d_alloc (PRArenaPool *poolp, unsigned long len) * XXX this is a fairly generic function that may belong elsewhere */ static void * -sec_asn1d_zalloc (PRArenaPool *poolp, unsigned long len) +sec_asn1d_zalloc (PLArenaPool *poolp, unsigned long len) { void *thing; @@ -956,7 +956,7 @@ static void sec_asn1d_prepare_for_contents (sec_asn1d_state *state) { SECItem *item; - PRArenaPool *poolp; + PLArenaPool *poolp; unsigned long alloc_len; #ifdef DEBUG_ASN1D_STATES @@ -2819,10 +2819,10 @@ SEC_ASN1DecoderFinish (SEC_ASN1DecoderContext *cx) SEC_ASN1DecoderContext * -SEC_ASN1DecoderStart (PRArenaPool *their_pool, void *dest, +SEC_ASN1DecoderStart (PLArenaPool *their_pool, void *dest, const SEC_ASN1Template *theTemplate) { - PRArenaPool *our_pool; + PLArenaPool *our_pool; SEC_ASN1DecoderContext *cx; our_pool = PORT_NewArena (SEC_ASN1_DEFAULT_ARENA_SIZE); @@ -2911,7 +2911,7 @@ SEC_ASN1DecoderAbort(SEC_ASN1DecoderContext *cx, int error) SECStatus -SEC_ASN1Decode (PRArenaPool *poolp, void *dest, +SEC_ASN1Decode (PLArenaPool *poolp, void *dest, const SEC_ASN1Template *theTemplate, const char *buf, long len) { @@ -2933,7 +2933,7 @@ SEC_ASN1Decode (PRArenaPool *poolp, void *dest, SECStatus -SEC_ASN1DecodeItem (PRArenaPool *poolp, void *dest, +SEC_ASN1DecodeItem (PLArenaPool *poolp, void *dest, const SEC_ASN1Template *theTemplate, const SECItem *src) { diff --git a/lib/util/secasn1e.c b/lib/util/secasn1e.c index a8e39b74fe..1f85dfc1d3 100644 --- a/lib/util/secasn1e.c +++ b/lib/util/secasn1e.c @@ -71,7 +71,7 @@ typedef struct sec_asn1e_state_struct { * it is passed to SEC_ASN1EncoderFinish(). */ struct sec_EncoderContext_struct { - PRArenaPool *our_pool; /* for our internal allocs */ + PLArenaPool *our_pool; /* for our internal allocs */ sec_asn1e_state *current; sec_asn1e_parse_status status; @@ -1308,7 +1308,7 @@ SEC_ASN1EncoderContext * SEC_ASN1EncoderStart (const void *src, const SEC_ASN1Template *theTemplate, SEC_ASN1WriteProc output_proc, void *output_arg) { - PRArenaPool *our_pool; + PLArenaPool *our_pool; SEC_ASN1EncoderContext *cx; our_pool = PORT_NewArena (SEC_ASN1_DEFAULT_ARENA_SIZE); @@ -1477,7 +1477,7 @@ sec_asn1e_encode_item_store (void *arg, const char *buf, unsigned long len, * XXX This seems like a reasonable general-purpose function (for SECITEM_)? */ static SECItem * -sec_asn1e_allocate_item (PRArenaPool *poolp, SECItem *dest, unsigned long len) +sec_asn1e_allocate_item (PLArenaPool *poolp, SECItem *dest, unsigned long len) { if (poolp != NULL) { void *release; @@ -1520,7 +1520,7 @@ sec_asn1e_allocate_item (PRArenaPool *poolp, SECItem *dest, unsigned long len) SECItem * -SEC_ASN1EncodeItem (PRArenaPool *poolp, SECItem *dest, const void *src, +SEC_ASN1EncodeItem (PLArenaPool *poolp, SECItem *dest, const void *src, const SEC_ASN1Template *theTemplate) { unsigned long encoding_length; @@ -1552,7 +1552,7 @@ SEC_ASN1EncodeItem (PRArenaPool *poolp, SECItem *dest, const void *src, static SECItem * -sec_asn1e_integer(PRArenaPool *poolp, SECItem *dest, unsigned long value, +sec_asn1e_integer(PLArenaPool *poolp, SECItem *dest, unsigned long value, PRBool is_unsigned) { unsigned long copy; @@ -1599,14 +1599,14 @@ sec_asn1e_integer(PRArenaPool *poolp, SECItem *dest, unsigned long value, SECItem * -SEC_ASN1EncodeInteger(PRArenaPool *poolp, SECItem *dest, long value) +SEC_ASN1EncodeInteger(PLArenaPool *poolp, SECItem *dest, long value) { return sec_asn1e_integer (poolp, dest, (unsigned long) value, PR_FALSE); } SECItem * -SEC_ASN1EncodeUnsignedInteger(PRArenaPool *poolp, +SEC_ASN1EncodeUnsignedInteger(PLArenaPool *poolp, SECItem *dest, unsigned long value) { return sec_asn1e_integer (poolp, dest, value, PR_TRUE); diff --git a/lib/util/secder.h b/lib/util/secder.h index addc20b883..0da1b34a5b 100644 --- a/lib/util/secder.h +++ b/lib/util/secder.h @@ -127,7 +127,7 @@ extern char *DER_GeneralizedDayToAscii(SECItem *gentime); extern char *DER_TimeChoiceDayToAscii(SECItem *timechoice); /* -** Convert a PRTime time to a DER encoded Generalized time +** Convert a PRTime to a DER encoded Generalized time ** gmttime must be on or after January 1, year 1 and ** before January 1, 10000. */ diff --git a/lib/util/secdig.c b/lib/util/secdig.c index fca7713ec1..b2f9232e84 100644 --- a/lib/util/secdig.c +++ b/lib/util/secdig.c @@ -23,7 +23,7 @@ */ SECItem * -SGN_EncodeDigestInfo(PRArenaPool *poolp, SECItem *dest, SGNDigestInfo *diginfo) +SGN_EncodeDigestInfo(PLArenaPool *poolp, SECItem *dest, SGNDigestInfo *diginfo) { return SEC_ASN1EncodeItem (poolp, dest, diginfo, sgn_DigestInfoTemplate); } @@ -33,7 +33,7 @@ SGN_CreateDigestInfo(SECOidTag algorithm, unsigned char *sig, unsigned len) { SGNDigestInfo *di; SECStatus rv; - PRArenaPool *arena; + PLArenaPool *arena; SECItem *null_param; SECItem dummy_value; @@ -101,7 +101,7 @@ SGN_CreateDigestInfo(SECOidTag algorithm, unsigned char *sig, unsigned len) SGNDigestInfo * SGN_DecodeDigestInfo(SECItem *didata) { - PRArenaPool *arena; + PLArenaPool *arena; SGNDigestInfo *di; SECStatus rv = SECFailure; SECItem diCopy = {siBuffer, NULL, 0}; @@ -141,7 +141,7 @@ SGN_DestroyDigestInfo(SGNDigestInfo *di) } SECStatus -SGN_CopyDigestInfo(PRArenaPool *poolp, SGNDigestInfo *a, SGNDigestInfo *b) +SGN_CopyDigestInfo(PLArenaPool *poolp, SGNDigestInfo *a, SGNDigestInfo *b) { SECStatus rv; void *mark; diff --git a/lib/util/secitem.c b/lib/util/secitem.c index e5bbc311ac..5aa8a949dd 100644 --- a/lib/util/secitem.c +++ b/lib/util/secitem.c @@ -12,7 +12,7 @@ #include "secport.h" SECItem * -SECITEM_AllocItem(PRArenaPool *arena, SECItem *item, unsigned int len) +SECITEM_AllocItem(PLArenaPool *arena, SECItem *item, unsigned int len) { SECItem *result = NULL; void *mark = NULL; @@ -76,7 +76,7 @@ SECITEM_AllocItem(PRArenaPool *arena, SECItem *item, unsigned int len) } SECStatus -SECITEM_ReallocItem(PRArenaPool *arena, SECItem *item, unsigned int oldlen, +SECITEM_ReallocItem(PLArenaPool *arena, SECItem *item, unsigned int oldlen, unsigned int newlen) { PORT_Assert(item != NULL); @@ -164,7 +164,7 @@ SECITEM_DupItem(const SECItem *from) } SECItem * -SECITEM_ArenaDupItem(PRArenaPool *arena, const SECItem *from) +SECITEM_ArenaDupItem(PLArenaPool *arena, const SECItem *from) { SECItem *to; @@ -201,7 +201,7 @@ SECITEM_ArenaDupItem(PRArenaPool *arena, const SECItem *from) } SECStatus -SECITEM_CopyItem(PRArenaPool *arena, SECItem *to, const SECItem *from) +SECITEM_CopyItem(PLArenaPool *arena, SECItem *to, const SECItem *from) { to->type = from->type; if (from->data && from->len) { diff --git a/lib/util/sectime.c b/lib/util/sectime.c index a0045f4c79..0ce700c586 100644 --- a/lib/util/sectime.c +++ b/lib/util/sectime.c @@ -53,7 +53,7 @@ DER_TimeChoiceDayToAscii(SECItem *timechoice) } char * -CERT_UTCTime2FormattedAscii (int64 utcTime, char *format) +CERT_UTCTime2FormattedAscii(PRTime utcTime, char *format) { PRExplodedTime printableTime; char *timeString; @@ -73,7 +73,7 @@ CERT_UTCTime2FormattedAscii (int64 utcTime, char *format) return (timeString); } -char *CERT_GenTime2FormattedAscii (int64 genTime, char *format) +char *CERT_GenTime2FormattedAscii(PRTime genTime, char *format) { PRExplodedTime printableTime; char *timeString; @@ -101,7 +101,7 @@ char *CERT_GenTime2FormattedAscii (int64 genTime, char *format) static char * DecodeUTCTime2FormattedAscii (SECItem *utcTimeDER, char *format) { - int64 utcTime; + PRTime utcTime; int rv; rv = DER_UTCTimeToTime(&utcTime, utcTimeDER); @@ -149,7 +149,7 @@ 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 */ -SECStatus DER_EncodeTimeChoice(PRArenaPool* arena, SECItem* output, PRTime input) +SECStatus DER_EncodeTimeChoice(PLArenaPool* arena, SECItem* output, PRTime input) { SECStatus rv; diff --git a/lib/util/utilpars.c b/lib/util/utilpars.c index 4bb2d3ff9e..cbf777ff1a 100644 --- a/lib/util/utilpars.c +++ b/lib/util/utilpars.c @@ -428,7 +428,7 @@ NSSUTIL_DoubleEscape(const char *string, char quote1, char quote2) static char *nssutil_nullString = ""; static char * -nssutil_formatValue(PRArenaPool *arena, char *value, char quote) +nssutil_formatValue(PLArenaPool *arena, char *value, char quote) { char *vp,*vp2,*retval; int size = 0, escapes = 0; @@ -620,7 +620,7 @@ nssutil_argDecodeSingleSlotInfo(char *name, char *params, /* parse all the slot specific parameters. */ struct NSSUTILPreSlotInfoStr * -NSSUTIL_ArgParseSlotInfo(PRArenaPool *arena, char *slotParams, int *retCount) +NSSUTIL_ArgParseSlotInfo(PLArenaPool *arena, char *slotParams, int *retCount) { char *slotIndex; struct NSSUTILPreSlotInfoStr *slotInfo = NULL; diff --git a/lib/util/utilpars.h b/lib/util/utilpars.h index 414dae36bc..e01ba14c94 100644 --- a/lib/util/utilpars.h +++ b/lib/util/utilpars.h @@ -32,7 +32,7 @@ int NSSUTIL_DoubleEscapeSize(const char *string, char quote1, char quote2); char *NSSUTIL_DoubleEscape(const char *string, char quote1, char quote2); unsigned long NSSUTIL_ArgParseSlotFlags(char *label,char *params); -struct NSSUTILPreSlotInfoStr *NSSUTIL_ArgParseSlotInfo(PRArenaPool *arena, +struct NSSUTILPreSlotInfoStr *NSSUTIL_ArgParseSlotInfo(PLArenaPool *arena, char *slotParams, int *retCount); char * NSSUTIL_MkSlotString(unsigned long slotID, unsigned long defaultFlags, unsigned long timeout, unsigned char askpw_in,