From 0b92a0211a28168ed36399b625da2cf7d49595db Mon Sep 17 00:00:00 2001 From: "ian.mcgreer%sun.com" Date: Thu, 5 Sep 2002 22:49:53 +0000 Subject: [PATCH] * change errors to macros instead of const int's * remove pointer-tracking remnants git-svn-id: svn://10.0.0.236/branches/STAN_WORK_BRANCH@128921 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/security/nss/lib/asn1/asn1.c | 401 +---- mozilla/security/nss/lib/asn1/asn1.h | 46 +- mozilla/security/nss/lib/asn1/nssasn1.h | 44 +- mozilla/security/nss/lib/base/arena.c | 185 +- mozilla/security/nss/lib/base/base.h | 293 +--- mozilla/security/nss/lib/base/errorval.c | 94 -- mozilla/security/nss/lib/base/hash.c | 9 +- mozilla/security/nss/lib/base/hashops.c | 18 +- mozilla/security/nss/lib/base/item.c | 60 +- mozilla/security/nss/lib/base/manifest.mn | 11 +- mozilla/security/nss/lib/base/nssbase.h | 12 +- mozilla/security/nss/lib/base/tracker.c | 543 ------ mozilla/security/nss/lib/base/utf8.c | 109 +- mozilla/security/nss/lib/dev/dev.h | 7 +- mozilla/security/nss/lib/pki/asymmkey.c | 3 +- mozilla/security/nss/lib/pki/certificate.c | 3 +- mozilla/security/nss/lib/pki/cryptocontext.c | 3 +- mozilla/security/nss/lib/pki/nsspki.h | 4 +- mozilla/security/nss/lib/pki/symmkey.c | 3 +- mozilla/security/nss/lib/pki/trustdomain.c | 3 +- mozilla/security/nss/lib/pki1/atav.c | 4 +- mozilla/security/nss/lib/pki1/nsspki1.h | 31 +- mozilla/security/nss/lib/pki1/oid.c | 216 +-- mozilla/security/nss/lib/pki1/pki1.h | 48 +- mozilla/security/nss/lib/pkix/include/pkix.h | 1578 +----------------- 25 files changed, 32 insertions(+), 3696 deletions(-) delete mode 100644 mozilla/security/nss/lib/base/errorval.c delete mode 100644 mozilla/security/nss/lib/base/tracker.c diff --git a/mozilla/security/nss/lib/asn1/asn1.c b/mozilla/security/nss/lib/asn1/asn1.c index dda5c6e8bbe..f9abcb25ecf 100644 --- a/mozilla/security/nss/lib/asn1/asn1.c +++ b/mozilla/security/nss/lib/asn1/asn1.c @@ -32,7 +32,7 @@ */ #ifdef DEBUG -static const char CVS_ID[] = "@(#) $RCSfile: asn1.c,v $ $Revision: 1.2.44.1 $ $Date: 2002-08-26 15:50:00 $ $Name: not supported by cvs2svn $"; +static const char CVS_ID[] = "@(#) $RCSfile: asn1.c,v $ $Revision: 1.2.44.2 $ $Date: 2002-09-05 22:49:22 $ $Name: not supported by cvs2svn $"; #endif /* DEBUG */ /* @@ -49,180 +49,6 @@ static const char CVS_ID[] = "@(#) $RCSfile: asn1.c,v $ $Revision: 1.2.44.1 $ $D #include "plarena.h" #include "secasn1.h" -/* - * The pointer-tracking stuff - */ - -#ifdef DEBUG -extern const NSSError NSS_ERROR_INTERNAL_ERROR; - -static nssPointerTracker decoder_pointer_tracker; - -static PRStatus -decoder_add_pointer -( - const nssASN1Decoder *decoder -) -{ - PRStatus rv; - - rv = nssPointerTracker_initialize(&decoder_pointer_tracker); - if( PR_SUCCESS != rv ) { - return rv; - } - - rv = nssPointerTracker_add(&decoder_pointer_tracker, decoder); - if( PR_SUCCESS != rv ) { - NSSError e = NSS_GetError(); - if( NSS_ERROR_NO_MEMORY != e ) { - nss_SetError(NSS_ERROR_INTERNAL_ERROR); - } - - return rv; - } - - return PR_SUCCESS; -} - -static PRStatus -decoder_remove_pointer -( - const nssASN1Decoder *decoder -) -{ - PRStatus rv; - - rv = nssPointerTracker_remove(&decoder_pointer_tracker, decoder); - if( PR_SUCCESS != rv ) { - nss_SetError(NSS_ERROR_INTERNAL_ERROR); - } - - return rv; -} - -/* - * nssASN1Decoder_verify - * - * This routine is only available in debug builds. - * - * If the specified pointer is a valid pointer to an nssASN1Decoder - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_ASN1DECODER - * - * Return value: - * PR_FAILURE upon error - * PR_SUCCESS upon success - */ - -NSS_IMPLEMENT PRStatus -nssASN1Decoder_verify -( - nssASN1Decoder *decoder -) -{ - PRStatus rv; - - rv = nssPointerTracker_initialize(&decoder_pointer_tracker); - if( PR_SUCCESS != rv ) { - return PR_FAILURE; - } - - rv = nssPointerTracker_verify(&decoder_pointer_tracker, decoder); - if( PR_SUCCESS != rv ) { - nss_SetError(NSS_ERROR_INVALID_ASN1DECODER); - return PR_FAILURE; - } - - return PR_SUCCESS; -} - -static nssPointerTracker encoder_pointer_tracker; - -static PRStatus -encoder_add_pointer -( - const nssASN1Encoder *encoder -) -{ - PRStatus rv; - - rv = nssPointerTracker_initialize(&encoder_pointer_tracker); - if( PR_SUCCESS != rv ) { - return rv; - } - - rv = nssPointerTracker_add(&encoder_pointer_tracker, encoder); - if( PR_SUCCESS != rv ) { - NSSError e = NSS_GetError(); - if( NSS_ERROR_NO_MEMORY != e ) { - nss_SetError(NSS_ERROR_INTERNAL_ERROR); - } - - return rv; - } - - return PR_SUCCESS; -} - -static PRStatus -encoder_remove_pointer -( - const nssASN1Encoder *encoder -) -{ - PRStatus rv; - - rv = nssPointerTracker_remove(&encoder_pointer_tracker, encoder); - if( PR_SUCCESS != rv ) { - nss_SetError(NSS_ERROR_INTERNAL_ERROR); - } - - return rv; -} - -/* - * nssASN1Encoder_verify - * - * This routine is only available in debug builds. - * - * If the specified pointer is a valid pointer to an nssASN1Encoder - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_ASN1ENCODER - * - * Return value: - * PR_FAILURE upon error - * PR_SUCCESS upon success - */ - -NSS_IMPLEMENT PRStatus -nssASN1Encoder_verify -( - nssASN1Encoder *encoder -) -{ - PRStatus rv; - - rv = nssPointerTracker_initialize(&encoder_pointer_tracker); - if( PR_SUCCESS != rv ) { - return PR_FAILURE; - } - - rv = nssPointerTracker_verify(&encoder_pointer_tracker, encoder); - if( PR_SUCCESS != rv ) { - nss_SetError(NSS_ERROR_INVALID_ASN1ENCODER); - return PR_FAILURE; - } - - return PR_SUCCESS; -} -#endif /* DEBUG */ - /* * nssASN1Decoder_Create * @@ -255,24 +81,6 @@ nssASN1Decoder_Create { SEC_ASN1DecoderContext *rv; -#ifdef DEBUG - if( (NSSArena *)NULL != arenaOpt ) { - if( PR_SUCCESS != nssArena_verifyPointer(arenaOpt) ) { - return (nssASN1Decoder *)NULL; - } - } - - /* - * May destination be NULL? I'd think so, since one might - * have only a filter proc. But if not, check the pointer here. - */ - - if( (nssASN1Template *)NULL == template ) { - nss_SetError(NSS_ERROR_INVALID_POINTER); - return (nssASN1Decoder *)NULL; - } -#endif /* DEBUG */ - rv = SEC_ASN1DecoderStart(arenaOpt, destination, template); if( (SEC_ASN1DecoderContext *)NULL == rv ) { #if 0 @@ -281,13 +89,6 @@ nssASN1Decoder_Create return (nssASN1Decoder *)NULL; } -#ifdef DEBUG - if( PR_SUCCESS != decoder_add_pointer(rv) ) { - (void)SEC_ASN1DecoderFinish(rv); - return (nssASN1Decoder *)NULL; - } -#endif /* DEBUG */ - return (nssASN1Decoder *)rv; } @@ -319,17 +120,6 @@ nssASN1Decoder_Update { SECStatus rv; -#ifdef DEBUG - if( PR_SUCCESS != nssASN1Decoder_verify(decoder) ) { - return PR_FAILURE; - } - - if( (void *)NULL == data ) { - nss_SetError(NSS_ERROR_INVALID_POINTER); - return PR_FAILURE; - } -#endif /* DEBUG */ - rv = SEC_ASN1DecoderUpdate((SEC_ASN1DecoderContext *)decoder, (const char *)data, (unsigned long)amount); @@ -367,12 +157,6 @@ nssASN1Decoder_Finish PRStatus rv = PR_SUCCESS; SECStatus srv; -#ifdef DEBUG - if( PR_SUCCESS != nssASN1Decoder_verify(decoder) ) { - return PR_FAILURE; - } -#endif /* DEBUG */ - srv = SEC_ASN1DecoderFinish((SEC_ASN1DecoderContext *)decoder); if( SECSuccess != srv ) { @@ -382,15 +166,6 @@ nssASN1Decoder_Finish rv = PR_FAILURE; } -#ifdef DEBUG - { - PRStatus rv2 = decoder_remove_pointer(decoder); - if( PR_SUCCESS == rv ) { - rv = rv2; - } - } -#endif /* DEBUG */ - return rv; } @@ -424,11 +199,6 @@ nssASN1Decoder_SetFilter PRBool noStore ) { -#ifdef DEBUG - if( PR_SUCCESS != nssASN1Decoder_verify(decoder) ) { - return PR_FAILURE; - } -#endif /* DEBUG */ if( (nssASN1DecoderFilterFunction *)NULL == callback ) { SEC_ASN1DecoderClearFilterProc((SEC_ASN1DecoderContext *)decoder); @@ -465,7 +235,6 @@ nssASN1Decoder_SetFilter * PR_SUCCESS upon success */ -extern const NSSError NSS_ERROR_INTERNAL_ERROR; NSS_IMPLEMENT PRStatus nssASN1Decoder_GetFilter @@ -476,12 +245,6 @@ nssASN1Decoder_GetFilter PRBool *pNoStoreOpt ) { -#ifdef DEBUG - if( PR_SUCCESS != nssASN1Decoder_verify(decoder) ) { - return PR_FAILURE; - } -#endif /* DEBUG */ - if( (nssASN1DecoderFilterFunction **)NULL != pCallbackOpt ) { *pCallbackOpt = (nssASN1DecoderFilterFunction *)NULL; } @@ -525,12 +288,6 @@ nssASN1Decoder_SetNotify void *argument ) { -#ifdef DEBUG - if( PR_SUCCESS != nssASN1Decoder_verify(decoder) ) { - return PR_FAILURE; - } -#endif /* DEBUG */ - if( (nssASN1NotifyFunction *)NULL == callback ) { SEC_ASN1DecoderClearNotifyProc((SEC_ASN1DecoderContext *)decoder); } else { @@ -571,12 +328,6 @@ nssASN1Decoder_GetNotify void **pArgumentOpt ) { -#ifdef DEBUG - if( PR_SUCCESS != nssASN1Decoder_verify(decoder) ) { - return PR_FAILURE; - } -#endif /* DEBUG */ - if( (nssASN1NotifyFunction **)NULL != pCallbackOpt ) { *pCallbackOpt = (nssASN1NotifyFunction *)NULL; } @@ -699,23 +450,6 @@ nssASN1Encoder_Create { SEC_ASN1EncoderContext *rv; -#ifdef DEBUG - if( (void *)NULL == source ) { - nss_SetError(NSS_ERROR_INVALID_POINTER); - return (nssASN1Encoder *)NULL; - } - - if( (nssASN1Template *)NULL == template ) { - nss_SetError(NSS_ERROR_INVALID_POINTER); - return (nssASN1Encoder *)NULL; - } - - if( (nssASN1EncoderWriteFunction *)NULL == sink ) { - nss_SetError(NSS_ERROR_INVALID_POINTER); - return (nssASN1Encoder *)NULL; - } -#endif /* DEBUG */ - #ifdef nodef switch( encoding ) { case NSSASN1BER: @@ -745,13 +479,6 @@ nssASN1Encoder_Create sec_ASN1EncoderSetDER(rv); } -#ifdef DEBUG - if( PR_SUCCESS != encoder_add_pointer(rv) ) { - (void)SEC_ASN1EncoderFinish(rv); - return (nssASN1Encoder *)NULL; - } -#endif /* DEBUG */ - return (nssASN1Encoder *)rv; #endif /* nodef */ return NULL; @@ -779,16 +506,6 @@ nssASN1Encoder_Update { SECStatus rv; -#ifdef DEBUG - if( PR_SUCCESS != nssASN1Encoder_verify(encoder) ) { - return PR_FAILURE; - } - - /* - * Can data legitimately be NULL? If not, verify.. - */ -#endif /* DEBUG */ - rv = SEC_ASN1EncoderUpdate((SEC_ASN1EncoderContext *)encoder, (const char *)data, (unsigned long)length); @@ -823,24 +540,9 @@ nssASN1Encoder_Finish { PRStatus rv; -#ifdef DEBUG - if( PR_SUCCESS != nssASN1Encoder_verify(encoder) ) { - return PR_FAILURE; - } -#endif /* DEBUG */ - SEC_ASN1EncoderFinish((SEC_ASN1EncoderContext *)encoder); rv = PR_SUCCESS; /* no error return defined for that call */ -#ifdef DEBUG - { - PRStatus rv2 = encoder_remove_pointer(encoder); - if( PR_SUCCESS == rv ) { - rv = rv2; - } - } -#endif /* DEBUG */ - return rv; } @@ -870,12 +572,6 @@ nssASN1Encoder_SetNotify void *argument ) { -#ifdef DEBUG - if( PR_SUCCESS != nssASN1Encoder_verify(encoder) ) { - return PR_FAILURE; - } -#endif /* DEBUG */ - if( (nssASN1NotifyFunction *)NULL == callback ) { SEC_ASN1EncoderClearNotifyProc((SEC_ASN1EncoderContext *)encoder); } else { @@ -916,12 +612,6 @@ nssASN1Encoder_GetNotify void **pArgumentOpt ) { -#ifdef DEBUG - if( PR_SUCCESS != nssASN1Encoder_verify(encoder) ) { - return PR_FAILURE; - } -#endif /* DEBUG */ - if( (nssASN1NotifyFunction **)NULL != pCallbackOpt ) { *pCallbackOpt = (nssASN1NotifyFunction *)NULL; } @@ -956,12 +646,6 @@ nssASN1Encoder_SetStreaming { SEC_ASN1EncoderContext *cx = (SEC_ASN1EncoderContext *)encoder; -#ifdef DEBUG - if( PR_SUCCESS != nssASN1Encoder_verify(encoder) ) { - return PR_FAILURE; - } -#endif /* DEBUG */ - if( streaming ) { SEC_ASN1EncoderSetStreaming(cx); } else { @@ -993,12 +677,6 @@ nssASN1Encoder_GetStreaming PRBool *pStreaming ) { -#ifdef DEBUG - if( PR_SUCCESS != nssASN1Encoder_verify(encoder) ) { - return PR_FAILURE; - } -#endif /* DEBUG */ - if( (PRBool *)NULL != pStreaming ) { *pStreaming = PR_FALSE; } @@ -1029,12 +707,6 @@ nssASN1Encoder_SetTakeFromBuffer { SEC_ASN1EncoderContext *cx = (SEC_ASN1EncoderContext *)encoder; -#ifdef DEBUG - if( PR_SUCCESS != nssASN1Encoder_verify(encoder) ) { - return PR_FAILURE; - } -#endif /* DEBUG */ - if( takeFromBuffer ) { SEC_ASN1EncoderSetTakeFromBuf(cx); } else { @@ -1066,12 +738,6 @@ nssASN1Encoder_GetTakeFromBuffer PRBool *pTakeFromBuffer ) { -#ifdef DEBUG - if( PR_SUCCESS != nssASN1Encoder_verify(encoder) ) { - return PR_FAILURE; - } -#endif /* DEBUG */ - if( (PRBool *)NULL != pTakeFromBuffer ) { *pTakeFromBuffer = PR_FALSE; } @@ -1207,24 +873,6 @@ nssASN1_EncodeItem PRUint32 len = 0; PRStatus status; -#ifdef DEBUG - if( (NSSArena *)NULL != arenaOpt ) { - if( PR_SUCCESS != nssArena_verifyPointer(arenaOpt) ) { - return (NSSDER *)NULL; - } - } - - if( (void *)NULL == source ) { - nss_SetError(NSS_ERROR_INVALID_POINTER); - return (NSSDER *)NULL; - } - - if( (nssASN1Template *)NULL == template ) { - nss_SetError(NSS_ERROR_INVALID_POINTER); - return (NSSDER *)NULL; - } -#endif /* DEBUG */ - status = nssASN1_Encode(source, template, encoding, (nssASN1EncoderWriteFunction *)nssasn1_encode_item_count, &len); @@ -1300,14 +948,6 @@ nssASN1_GetDERFromPRUint32 NSSDER *rv; NSSItem *item; -#ifdef DEBUG - if( (NSSArena *)NULL != arenaOpt ) { - if( PR_SUCCESS != nssArena_verifyPointer(arenaOpt) ) { - return (NSSDER *)NULL; - } - } -#endif /* DEBUG */ - if( (NSSDER *)NULL == rvOpt ) { rv = nss_ZNEW(arenaOpt, NSSDER); if( (NSSDER *)NULL == rv ) { @@ -1364,14 +1004,6 @@ nssASN1_GetDERFromPRInt32 NSSDER *rv; NSSItem *item; -#ifdef DEBUG - if( (NSSArena *)NULL != arenaOpt ) { - if( PR_SUCCESS != nssArena_verifyPointer(arenaOpt) ) { - return (NSSDER *)NULL; - } - } -#endif /* DEBUG */ - if( (NSSDER *)NULL == rvOpt ) { rv = nss_ZNEW(arenaOpt, NSSDER); if( (NSSDER *)NULL == rv ) { @@ -1489,24 +1121,6 @@ nssUTF8_CreateFromBER PRStatus st; const nssASN1Template *templ; -#ifdef NSSDEBUG - if( (NSSArena *)NULL != arenaOpt ) { - if( PR_SUCCESS != nssArena_verifyPointer(arenaOpt) ) { - return (NSSUTF8 *)NULL; - } - } - - if( (NSSBER *)NULL == berData ) { - nss_SetError(NSS_ERROR_INVALID_POINTER); - return (NSSUTF8 *)NULL; - } - - if( (void *)NULL == berData->data ) { - nss_SetError(NSS_ERROR_INVALID_POINTER); - return (NSSUTF8 *)NULL; - } -#endif /* NSSDEBUG */ - a = NSSArena_Create(); if( (NSSArena *)NULL == a ) { return (NSSUTF8 *)NULL; @@ -1639,19 +1253,6 @@ nssUTF8_GetDEREncoding const nssASN1Template *templ; NSSArena *a; -#ifdef NSSDEBUG - if( (NSSArena *)NULL != arenaOpt ) { - if( PR_SUCCESS != nssArena_verifyPointer(arenaOpt) ) { - return (NSSDER *)NULL; - } - } - - if( (const NSSUTF8 *)NULL == string ) { - nss_SetError(NSS_ERROR_INVALID_POINTER); - return (NSSDER *)NULL; - } -#endif /* NSSDEBUG */ - str.data = (void *)string; str.size = nssUTF8_Size(string, (PRStatus *)NULL); if( 0 == str.size ) { diff --git a/mozilla/security/nss/lib/asn1/asn1.h b/mozilla/security/nss/lib/asn1/asn1.h index 029d0d7cb4d..0b672e60868 100644 --- a/mozilla/security/nss/lib/asn1/asn1.h +++ b/mozilla/security/nss/lib/asn1/asn1.h @@ -35,7 +35,7 @@ #define ASN1_H #ifdef DEBUG -static const char ASN1_CVS_ID[] = "@(#) $RCSfile: asn1.h,v $ $Revision: 1.1.192.1 $ $Date: 2002-08-26 15:50:02 $ $Name: not supported by cvs2svn $"; +static const char ASN1_CVS_ID[] = "@(#) $RCSfile: asn1.h,v $ $Revision: 1.1.192.2 $ $Date: 2002-09-05 22:49:24 $ $Name: not supported by cvs2svn $"; #endif /* DEBUG */ /* @@ -111,9 +111,6 @@ nssASN1Decoder_Create const nssASN1Template template[] ); -extern const NSSError NSS_ERROR_NO_MEMORY; -extern const NSSError NSS_ERROR_INVALID_ARENA; -extern const NSSError NSS_ERROR_INVALID_POINTER; /* * nssASN1Decoder_Update @@ -141,9 +138,6 @@ nssASN1Decoder_Update PRUint32 amount ); -extern const NSSError NSS_ERROR_NO_MEMORY; -extern const NSSError NSS_ERROR_INVALID_ASN1DECODER; -extern const NSSError NSS_ERROR_INVALID_BER; /* * nssASN1Decoder_Finish @@ -166,7 +160,6 @@ nssASN1Decoder_Finish nssASN1Decoder *decoder ); -extern const NSSError NSS_ERROR_INVALID_ASN1DECODER; /* * nssASN1Decoder_SetFilter @@ -198,7 +191,6 @@ nssASN1Decoder_SetFilter PRBool noStore ); -extern const NSSError NSS_ERROR_INVALID_ASN1DECODER; /* * nssASN1Decoder_GetFilter @@ -231,7 +223,6 @@ nssASN1Decoder_GetFilter PRBool *pNoStoreOpt ); -extern const NSSError NSS_ERROR_INVALID_ASN1DECODER; /* * nssASN1Decoder_SetNotify @@ -259,7 +250,6 @@ nssASN1Decoder_SetNotify void *argument ); -extern const NSSError NSS_ERROR_INVALID_ASN1DECODER; /* * nssASN1Decoder_GetNotify @@ -288,7 +278,6 @@ nssASN1Decoder_GetNotify void **pArgumentOpt ); -extern const NSSError NSS_ERROR_INVALID_ASN1DECODER; /* * nssASN1Decoder_verify @@ -314,7 +303,6 @@ nssASN1Decoder_verify nssASN1Decoder *decoder ); -extern const NSSError NSS_ERROR_INVALID_ASN1DECODER; #endif /* DEBUG */ /* @@ -346,10 +334,6 @@ nssASN1_Decode PRUint32 amount ); -extern const NSSError NSS_ERROR_NO_MEMORY; -extern const NSSError NSS_ERROR_INVALID_ARENA; -extern const NSSError NSS_ERROR_INVALID_POINTER; -extern const NSSError NSS_ERROR_INVALID_BER; /* * nssASN1_DecodeBER @@ -380,10 +364,6 @@ nssASN1_DecodeBER const NSSBER *data ); -extern const NSSError NSS_ERROR_NO_MEMORY; -extern const NSSError NSS_ERROR_INVALID_ARENA; -extern const NSSError NSS_ERROR_INVALID_POINTER; -extern const NSSError NSS_ERROR_INVALID_BER; /* * nssASN1Encoder @@ -439,10 +419,6 @@ nssASN1Encoder_Create void *argument ); -extern const NSSError NSS_ERROR_NO_MEMORY; -extern const NSSError NSS_ERROR_INVALID_ARENA; -extern const NSSError NSS_ERROR_INVALID_POINTER; -extern const NSSError NSS_ERROR_ENCODING_NOT_SUPPORTED; /* * nssASN1Encoder_Update @@ -464,8 +440,6 @@ nssASN1Encoder_Update PRUint32 length ); -extern const NSSError NSS_ERROR_INVALID_ASN1ENCODER; -extern const NSSError NSS_ERROR_INVALID_POINTER; /* * nssASN1Encoder_Finish @@ -486,7 +460,6 @@ nssASN1Encoder_Finish nssASN1Encoder *encoder ); -extern const NSSError NSS_ERROR_INVALID_ASN1ENCODER; /* * nssASN1Encoder_SetNotify @@ -514,7 +487,6 @@ nssASN1Encoder_SetNotify void *argument ); -extern const NSSError NSS_ERROR_INVALID_ASN1ENCODER; /* * nssASN1Encoder_GetNotify @@ -543,7 +515,6 @@ nssASN1Encoder_GetNotify void **pArgumentOpt ); -extern const NSSError NSS_ERROR_INVALID_ASN1ENCODER; /* * nssASN1Encoder_SetStreaming @@ -564,7 +535,6 @@ nssASN1Encoder_SetStreaming PRBool streaming ); -extern const NSSError NSS_ERROR_INVALID_ASN1ENCODER; /* * nssASN1Encoder_GetStreaming @@ -586,8 +556,6 @@ nssASN1Encoder_GetStreaming PRBool *pStreaming ); -extern const NSSError NSS_ERROR_INVALID_ASN1ENCODER; -extern const NSSError NSS_ERROR_INVALID_POINTER; /* * nssASN1Encoder_SetTakeFromBuffer @@ -608,7 +576,6 @@ nssASN1Encoder_SetTakeFromBuffer PRBool takeFromBuffer ); -extern const NSSError NSS_ERROR_INVALID_ASN1ENCODER; /* * nssASN1Encoder_GetTakeFromBuffer @@ -630,8 +597,6 @@ nssASN1Encoder_GetTakeFromBuffer PRBool *pTakeFromBuffer ); -extern const NSSError NSS_ERROR_INVALID_ASN1ENCODER; -extern const NSSError NSS_ERROR_INVALID_POINTER; /* * nssASN1Encoder_verify @@ -657,7 +622,6 @@ nssASN1Encoder_verify nssASN1Encoder *encoder ); -extern const NSSError NSS_ERROR_INVALID_ASN1ENCODER; #endif /* DEBUG */ /* @@ -686,10 +650,6 @@ nssASN1_Encode void *argument ); -extern const NSSError NSS_ERROR_NO_MEMORY; -extern const NSSError NSS_ERROR_INVALID_ARENA; -extern const NSSError NSS_ERROR_INVALID_POINTER; -extern const NSSError NSS_ERROR_ENCODING_NOT_SUPPORTED; /* * nssASN1_EncodeItem @@ -720,10 +680,6 @@ nssASN1_EncodeItem NSSASN1EncodingType encoding ); -extern const NSSError NSS_ERROR_NO_MEMORY; -extern const NSSError NSS_ERROR_INVALID_ARENA; -extern const NSSError NSS_ERROR_INVALID_POINTER; -extern const NSSError NSS_ERROR_ENCODING_NOT_SUPPORTED; /* * Other basic types' encoding and decoding helper functions: diff --git a/mozilla/security/nss/lib/asn1/nssasn1.h b/mozilla/security/nss/lib/asn1/nssasn1.h index d4a49897e20..17244c459cc 100644 --- a/mozilla/security/nss/lib/asn1/nssasn1.h +++ b/mozilla/security/nss/lib/asn1/nssasn1.h @@ -35,7 +35,7 @@ #define NSSASN1_H #ifdef DEBUG -static const char NSSASN1_CVS_ID[] = "@(#) $RCSfile: nssasn1.h,v $ $Revision: 1.1.2.1 $ $Date: 2002-08-26 18:43:57 $ $Name: not supported by cvs2svn $"; +static const char NSSASN1_CVS_ID[] = "@(#) $RCSfile: nssasn1.h,v $ $Revision: 1.1.2.2 $ $Date: 2002-09-05 22:49:24 $ $Name: not supported by cvs2svn $"; #endif /* DEBUG */ /* @@ -102,9 +102,6 @@ NSSASN1Decoder_Create const NSSASN1Template template[] ); -extern const NSSError NSS_ERROR_NO_MEMORY; -extern const NSSError NSS_ERROR_INVALID_ARENA; -extern const NSSError NSS_ERROR_INVALID_POINTER; /* * NSSASN1Decoder_Update @@ -132,9 +129,6 @@ NSSASN1Decoder_Update PRUint32 amount ); -extern const NSSError NSS_ERROR_NO_MEMORY; -extern const NSSError NSS_ERROR_INVALID_ASN1DECODER; -extern const NSSError NSS_ERROR_INVALID_BER; /* * NSSASN1Decoder_Finish @@ -157,7 +151,6 @@ NSSASN1Decoder_Finish NSSASN1Decoder *decoder ); -extern const NSSError NSS_ERROR_INVALID_ASN1DECODER; /* * NSSASN1Decoder_SetFilter @@ -189,7 +182,6 @@ NSSASN1Decoder_SetFilter PRBool noStore ); -extern const NSSError NSS_ERROR_INVALID_ASN1DECODER; /* * NSSASN1Decoder_GetFilter @@ -222,7 +214,6 @@ NSSASN1Decoder_GetFilter PRBool *pNoStoreOpt ); -extern const NSSError NSS_ERROR_INVALID_ASN1DECODER; /* * NSSASN1Decoder_SetNotify @@ -250,7 +241,6 @@ NSSASN1Decoder_SetNotify void *argument ); -extern const NSSError NSS_ERROR_INVALID_ASN1DECODER; /* * NSSASN1Decoder_GetNotify @@ -279,7 +269,6 @@ NSSASN1Decoder_GetNotify void **pArgumentOpt ); -extern const NSSError NSS_ERROR_INVALID_ASN1DECODER; /* * NSSASN1_Decode @@ -310,10 +299,6 @@ NSSASN1_Decode PRUint32 amount ); -extern const NSSError NSS_ERROR_NO_MEMORY; -extern const NSSError NSS_ERROR_INVALID_ARENA; -extern const NSSError NSS_ERROR_INVALID_POINTER; -extern const NSSError NSS_ERROR_INVALID_BER; /* * NSSASN1_DecodeBER @@ -344,10 +329,6 @@ NSSASN1_DecodeBER const NSSBER *data ); -extern const NSSError NSS_ERROR_NO_MEMORY; -extern const NSSError NSS_ERROR_INVALID_ARENA; -extern const NSSError NSS_ERROR_INVALID_POINTER; -extern const NSSError NSS_ERROR_INVALID_BER; /* * NSSASN1Encoder @@ -403,10 +384,6 @@ NSSASN1Encoder_Create void *argument ); -extern const NSSError NSS_ERROR_NO_MEMORY; -extern const NSSError NSS_ERROR_INVALID_ARENA; -extern const NSSError NSS_ERROR_INVALID_POINTER; -extern const NSSError NSS_ERROR_ENCODING_NOT_SUPPORTED; /* * NSSASN1Encoder_Update @@ -428,8 +405,6 @@ NSSASN1Encoder_Update PRUint32 length ); -extern const NSSError NSS_ERROR_INVALID_ASN1ENCODER; -extern const NSSError NSS_ERROR_INVALID_POINTER; /* * NSSASN1Encoder_Finish @@ -450,7 +425,6 @@ NSSASN1Encoder_Finish NSSASN1Encoder *encoder ); -extern const NSSError NSS_ERROR_INVALID_ASN1ENCODER; /* * NSSASN1Encoder_SetNotify @@ -478,7 +452,6 @@ NSSASN1Encoder_SetNotify void *argument ); -extern const NSSError NSS_ERROR_INVALID_ASN1ENCODER; /* * NSSASN1Encoder_GetNotify @@ -507,7 +480,6 @@ NSSASN1Encoder_GetNotify void **pArgumentOpt ); -extern const NSSError NSS_ERROR_INVALID_ASN1ENCODER; /* * NSSASN1Encoder_SetStreaming @@ -528,7 +500,6 @@ NSSASN1Encoder_SetStreaming PRBool streaming ); -extern const NSSError NSS_ERROR_INVALID_ASN1ENCODER; /* * NSSASN1Encoder_GetStreaming @@ -550,8 +521,6 @@ NSSASN1Encoder_GetStreaming PRBool *pStreaming ); -extern const NSSError NSS_ERROR_INVALID_ASN1ENCODER; -extern const NSSError NSS_ERROR_INVALID_POINTER; /* * NSSASN1Encoder_SetTakeFromBuffer @@ -572,7 +541,6 @@ NSSASN1Encoder_SetTakeFromBuffer PRBool takeFromBuffer ); -extern const NSSError NSS_ERROR_INVALID_ASN1ENCODER; /* * NSSASN1Encoder_GetTakeFromBuffer @@ -594,8 +562,6 @@ NSSASN1Encoder_GetTakeFromBuffer PRBool *pTakeFromBuffer ); -extern const NSSError NSS_ERROR_INVALID_ASN1ENCODER; -extern const NSSError NSS_ERROR_INVALID_POINTER; /* * NSSASN1_Encode @@ -623,10 +589,6 @@ NSSASN1_Encode void *argument ); -extern const NSSError NSS_ERROR_NO_MEMORY; -extern const NSSError NSS_ERROR_INVALID_ARENA; -extern const NSSError NSS_ERROR_INVALID_POINTER; -extern const NSSError NSS_ERROR_ENCODING_NOT_SUPPORTED; /* * NSSASN1_EncodeItem @@ -657,10 +619,6 @@ NSSASN1_EncodeItem NSSASN1EncodingType encoding ); -extern const NSSError NSS_ERROR_NO_MEMORY; -extern const NSSError NSS_ERROR_INVALID_ARENA; -extern const NSSError NSS_ERROR_INVALID_POINTER; -extern const NSSError NSS_ERROR_ENCODING_NOT_SUPPORTED; #if 0 /* diff --git a/mozilla/security/nss/lib/base/arena.c b/mozilla/security/nss/lib/base/arena.c index c936931b40c..52f765c6a28 100644 --- a/mozilla/security/nss/lib/base/arena.c +++ b/mozilla/security/nss/lib/base/arena.c @@ -32,7 +32,7 @@ */ #ifdef DEBUG -static const char CVS_ID[] = "@(#) $RCSfile: arena.c,v $ $Revision: 1.5 $ $Date: 2002-04-04 16:14:26 $ $Name: not supported by cvs2svn $"; +static const char CVS_ID[] = "@(#) $RCSfile: arena.c,v $ $Revision: 1.5.18.1 $ $Date: 2002-09-05 22:49:27 $ $Name: not supported by cvs2svn $"; #endif /* DEBUG */ /* @@ -76,11 +76,6 @@ static const char CVS_ID[] = "@(#) $RCSfile: arena.c,v $ $Revision: 1.5 $ $Date: * nss_ZFreeIf * nss_ZRealloc * - * In debug builds, the following calls are available: - * - * nssArena_verifyPointer - * nssArena_registerDestructor - * nssArena_deregisterDestructor */ struct NSSArenaStr { @@ -117,106 +112,6 @@ struct nssArenaMarkStr { #define MARK_MAGIC 0x4d41524b /* "MARK" how original */ -/* - * But first, the pointer-tracking code - */ -#ifdef DEBUG -extern const NSSError NSS_ERROR_INTERNAL_ERROR; - -static nssPointerTracker arena_pointer_tracker; - -static PRStatus -arena_add_pointer -( - const NSSArena *arena -) -{ - PRStatus rv; - - rv = nssPointerTracker_initialize(&arena_pointer_tracker); - if( PR_SUCCESS != rv ) { - return rv; - } - - rv = nssPointerTracker_add(&arena_pointer_tracker, arena); - if( PR_SUCCESS != rv ) { - NSSError e = NSS_GetError(); - if( NSS_ERROR_NO_MEMORY != e ) { - nss_SetError(NSS_ERROR_INTERNAL_ERROR); - } - - return rv; - } - - return PR_SUCCESS; -} - -static PRStatus -arena_remove_pointer -( - const NSSArena *arena -) -{ - PRStatus rv; - - rv = nssPointerTracker_remove(&arena_pointer_tracker, arena); - if( PR_SUCCESS != rv ) { - nss_SetError(NSS_ERROR_INTERNAL_ERROR); - } - - return rv; -} - -/* - * nssArena_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSArena object, - * this routine will return PR_SUCCESS. Otherwise, it will put an - * error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_ARENA - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_IMPLEMENT PRStatus -nssArena_verifyPointer -( - const NSSArena *arena -) -{ - PRStatus rv; - - rv = nssPointerTracker_initialize(&arena_pointer_tracker); - if( PR_SUCCESS != rv ) { - /* - * This is a little disingenious. We have to initialize the - * tracker, because someone could "legitimately" try to verify - * an arena pointer before one is ever created. And this step - * might fail, due to lack of memory. But the only way that - * this step can fail is if it's doing the call_once stuff, - * (later calls just no-op). And if it didn't no-op, there - * aren't any valid arenas.. so the argument certainly isn't one. - */ - nss_SetError(NSS_ERROR_INVALID_ARENA); - return PR_FAILURE; - } - - rv = nssPointerTracker_verify(&arena_pointer_tracker, arena); - if( PR_SUCCESS != rv ) { - nss_SetError(NSS_ERROR_INVALID_ARENA); - return PR_FAILURE; - } - - return PR_SUCCESS; -} -#endif /* DEBUG */ - #ifdef ARENA_DESTRUCTOR_LIST struct arena_destructor_node { @@ -262,17 +157,6 @@ nssArena_registerDestructor { struct arena_destructor_node *it; -#ifdef NSSDEBUG - if( PR_SUCCESS != nssArena_verifyPointer(arena) ) { - return PR_FAILURE; - } -#endif /* NSSDEBUG */ - - it = nss_ZNEW(arena, struct arena_destructor_node); - if( (struct arena_destructor_node *)NULL == it ) { - return PR_FAILURE; - } - it->prev = arena->last_destructor; arena->last_destructor->next = it; arena->last_destructor = it; @@ -297,12 +181,6 @@ nssArena_deregisterDestructor { struct arena_destructor_node *it; -#ifdef NSSDEBUG - if( PR_SUCCESS != nssArena_verifyPointer(arena) ) { - return PR_FAILURE; - } -#endif /* NSSDEBUG */ - for( it = arena->first_destructor; it; it = it->next ) { if( (it->destructor == destructor) && (it->arg == arg) ) { break; @@ -438,19 +316,6 @@ nssArena_Create PL_InitArenaPool(&rv->pool, "NSS", 2048, sizeof(double)); -#ifdef DEBUG - { - PRStatus st; - st = arena_add_pointer(rv); - if( PR_SUCCESS != st ) { - PL_FinishArenaPool(&rv->pool); - PR_DestroyLock(rv->lock); - (void)nss_ZFreeIf(rv); - return (NSSArena *)NULL; - } - } -#endif /* DEBUG */ - return rv; } @@ -478,12 +343,6 @@ NSSArena_Destroy { nss_ClearErrorStack(); -#ifdef DEBUG - if( PR_SUCCESS != nssArena_verifyPointer(arena) ) { - return PR_FAILURE; - } -#endif /* DEBUG */ - return nssArena_Destroy(arena); } @@ -511,24 +370,12 @@ nssArena_Destroy { PRLock *lock; -#ifdef NSSDEBUG - if( PR_SUCCESS != nssArena_verifyPointer(arena) ) { - return PR_FAILURE; - } -#endif /* NSSDEBUG */ - PR_Lock(arena->lock); if( (PRLock *)NULL == arena->lock ) { /* Just got destroyed */ nss_SetError(NSS_ERROR_INVALID_ARENA); return PR_FAILURE; } - -#ifdef DEBUG - if( PR_SUCCESS != arena_remove_pointer(arena) ) { - return PR_FAILURE; - } -#endif /* DEBUG */ #ifdef ARENA_DESTRUCTOR_LIST /* Note that the arena is locked at this time */ @@ -576,12 +423,6 @@ nssArena_Mark nssArenaMark *rv; void *p; -#ifdef NSSDEBUG - if( PR_SUCCESS != nssArena_verifyPointer(arena) ) { - return (nssArenaMark *)NULL; - } -#endif /* NSSDEBUG */ - PR_Lock(arena->lock); if( (PRLock *)NULL == arena->lock ) { /* Just got destroyed */ @@ -654,12 +495,6 @@ nss_arena_unmark_release { void *inner_mark; -#ifdef NSSDEBUG - if( PR_SUCCESS != nssArena_verifyPointer(arena) ) { - return PR_FAILURE; - } -#endif /* NSSDEBUG */ - if( MARK_MAGIC != arenaMark->magic ) { nss_SetError(NSS_ERROR_INVALID_ARENA_MARK); return PR_FAILURE; @@ -899,11 +734,6 @@ nss_ZAlloc } else { void *rv; /* Arena allocation */ -#ifdef NSSDEBUG - if( PR_SUCCESS != nssArena_verifyPointer(arenaOpt) ) { - return (void *)NULL; - } -#endif /* NSSDEBUG */ PR_Lock(arenaOpt->lock); if( (PRLock *)NULL == arenaOpt->lock ) { @@ -972,16 +802,11 @@ nss_ZFreeIf return PR_SUCCESS; } else { /* Arena */ -#ifdef NSSDEBUG - if( PR_SUCCESS != nssArena_verifyPointer(h->arena) ) { - return PR_FAILURE; - } -#endif /* NSSDEBUG */ PR_Lock(h->arena->lock); if( (PRLock *)NULL == h->arena->lock ) { /* Just got destroyed.. so this pointer is invalid */ - nss_SetError(NSS_ERROR_INVALID_POINTER); + nss_SetError(NSS_ERROR_INVALID_ARENA); return PR_FAILURE; } @@ -1075,12 +900,6 @@ nss_ZRealloc } else { void *p; /* Arena */ -#ifdef NSSDEBUG - if( PR_SUCCESS != nssArena_verifyPointer(h->arena) ) { - return (void *)NULL; - } -#endif /* NSSDEBUG */ - PR_Lock(h->arena->lock); if( (PRLock *)NULL == h->arena->lock ) { /* Just got destroyed.. so this pointer is invalid */ diff --git a/mozilla/security/nss/lib/base/base.h b/mozilla/security/nss/lib/base/base.h index bc0193ef54a..3359567d58d 100644 --- a/mozilla/security/nss/lib/base/base.h +++ b/mozilla/security/nss/lib/base/base.h @@ -35,7 +35,7 @@ #define BASE_H #ifdef DEBUG -static const char BASE_CVS_ID[] = "@(#) $RCSfile: base.h,v $ $Revision: 1.15.18.1 $ $Date: 2002-08-26 15:52:23 $ $Name: not supported by cvs2svn $"; +static const char BASE_CVS_ID[] = "@(#) $RCSfile: base.h,v $ $Revision: 1.15.18.2 $ $Date: 2002-09-05 22:49:29 $ $Name: not supported by cvs2svn $"; #endif /* DEBUG */ /* @@ -80,12 +80,6 @@ PR_BEGIN_EXTERN_C * nss_ZNEW * nss_ZNEWARRAY * - * In debug builds, the following calls are available: - * - * nssArena_verifyPointer - * nssArena_registerDestructor - * nssArena_deregisterDestructor - * * The following preprocessor macro is also always available: * * nssArena_VERIFYPOINTER @@ -125,8 +119,6 @@ nssArena_Create void ); -extern const NSSError NSS_ERROR_NO_MEMORY; - /* * nssArena_Destroy * @@ -149,8 +141,6 @@ nssArena_Destroy NSSArena *arena ); -extern const NSSError NSS_ERROR_INVALID_ARENA; - /* * nssArena_Mark * @@ -178,10 +168,6 @@ nssArena_Mark NSSArena *arena ); -extern const NSSError NSS_ERROR_INVALID_ARENA; -extern const NSSError NSS_ERROR_NO_MEMORY; -extern const NSSError NSS_ERROR_ARENA_MARKED_BY_ANOTHER_THREAD; - /* * nssArena_Release * @@ -208,9 +194,6 @@ nssArena_Release nssArenaMark *arenaMark ); -extern const NSSError NSS_ERROR_INVALID_ARENA; -extern const NSSError NSS_ERROR_INVALID_ARENA_MARK; - /* * nssArena_Unmark * @@ -240,10 +223,6 @@ nssArena_Unmark nssArenaMark *arenaMark ); -extern const NSSError NSS_ERROR_INVALID_ARENA; -extern const NSSError NSS_ERROR_INVALID_ARENA_MARK; -extern const NSSError NSS_ERROR_ARENA_MARKED_BY_ANOTHER_THREAD; - #ifdef ARENA_DESTRUCTOR_LIST /* @@ -280,9 +259,6 @@ nssArena_registerDestructor void *arg ); -extern const NSSError NSS_ERROR_INVALID_ARENA; -extern const NSSError NSS_ERROR_NO_MEMORY; - /* * nssArena_deregisterDestructor * @@ -310,10 +286,6 @@ nssArena_deregisterDestructor void *arg ); -extern const NSSError NSS_ERROR_INVALID_ITEM; -extern const NSSError NSS_ERROR_INVALID_ARENA; -extern const NSSError NSS_ERROR_NOT_FOUND; - #endif /* ARENA_DESTRUCTOR_LIST */ /* @@ -346,10 +318,6 @@ nss_ZAlloc PRUint32 size ); -extern const NSSError NSS_ERROR_INVALID_ARENA; -extern const NSSError NSS_ERROR_NO_MEMORY; -extern const NSSError NSS_ERROR_ARENA_MARKED_BY_ANOTHER_THREAD; - /* * nss_ZFreeIf * @@ -374,8 +342,6 @@ nss_ZFreeIf void *pointer ); -extern const NSSError NSS_ERROR_INVALID_POINTER; - /* * nss_ZRealloc * @@ -403,10 +369,6 @@ nss_ZRealloc PRUint32 newSize ); -extern const NSSError NSS_ERROR_INVALID_POINTER; -extern const NSSError NSS_ERROR_NO_MEMORY; -extern const NSSError NSS_ERROR_ARENA_MARKED_BY_ANOTHER_THREAD; - /* * nss_ZNEW * @@ -472,53 +434,6 @@ extern const NSSError NSS_ERROR_ARENA_MARKED_BY_ANOTHER_THREAD; */ #define nss_ZREALLOCARRAY(p, type, quantity) ((type *)nss_ZRealloc((p), sizeof(type) * (quantity))) -/* - * nssArena_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSArena object, - * this routine will return PR_SUCCESS. Otherwise, it will put an - * error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_ARENA - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -#ifdef DEBUG -NSS_EXTERN PRStatus -nssArena_verifyPointer -( - const NSSArena *arena -); - -extern const NSSError NSS_ERROR_INVALID_ARENA; -#endif /* DEBUG */ - -/* - * nssArena_VERIFYPOINTER - * - * This macro is always available. In debug builds it will call - * nssArena_verifyPointer; in non-debug builds, it will merely - * check that the pointer is not null. Note that in non-debug - * builds it cannot place an error on the error stack. - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -#ifdef DEBUG -#define nssArena_VERIFYPOINTER(p) nssArena_verifyPointer(p) -#else /* DEBUG */ -/* The following line exceeds 72 characters, but emacs screws up if I split it. */ -#define nssArena_VERIFYPOINTER(p) (((NSSArena *)NULL == (p))?PR_FAILURE:PR_SUCCESS) -#endif /* DEBUG */ - /* * nssArenaHashAllocOps * @@ -716,9 +631,6 @@ nssUTF8_Size PRStatus *statusOpt ); -extern const NSSError NSS_ERROR_INVALID_POINTER; -extern const NSSError NSS_ERROR_VALUE_TOO_LARGE; - /* * nssUTF8_Length * @@ -743,10 +655,6 @@ nssUTF8_Length PRStatus *statusOpt ); -extern const NSSError NSS_ERROR_INVALID_POINTER; -extern const NSSError NSS_ERROR_VALUE_TOO_LARGE; -extern const NSSError NSS_ERROR_INVALID_STRING; - /* * nssUTF8_Create * @@ -779,10 +687,6 @@ nssUTF8_Create PRUint32 size /* in bytes, not characters */ ); -extern const NSSError NSS_ERROR_INVALID_POINTER; -extern const NSSError NSS_ERROR_NO_MEMORY; -extern const NSSError NSS_ERROR_UNSUPPORTED_TYPE; - NSS_EXTERN NSSItem * nssUTF8_GetEncoding ( @@ -803,9 +707,6 @@ nssUTF8_GetEncoding * Blah, blah, blah. */ -extern const NSSError NSS_ERROR_INVALID_POINTER; -extern const NSSError NSS_ERROR_INVALID_ARGUMENT; - NSS_EXTERN PRStatus nssUTF8_CopyIntoFixedBuffer ( @@ -892,10 +793,6 @@ nssHash_Destroy * */ -#if 0 -extern const NSSError NSS_ERROR_HASH_COLLISION; -#endif - NSS_EXTERN PRStatus nssHash_Add ( @@ -959,188 +856,6 @@ nssHash_Iterate void *closure ); - -/* - * nssPointerTracker - * - * This type and these methods are only present in debug builds. - * - * The nonpublic methods relating to this type are: - * - * nssPointerTracker_initialize - * nssPointerTracker_finalize - * nssPointerTracker_add - * nssPointerTracker_remove - * nssPointerTracker_verify - */ - -/* - * nssPointerTracker_initialize - * - * This method is only present in debug builds. - * - * This routine initializes an nssPointerTracker object. Note that - * the object must have been declared *static* to guarantee that it - * is in a zeroed state initially. This routine is idempotent, and - * may even be safely called by multiple threads simultaneously with - * the same argument. This routine returns a PRStatus value; if - * successful, it will return PR_SUCCESS. On failure it will set an - * error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_NO_MEMORY - * - * Return value: - * PR_SUCCESS - * PR_FAILURE - */ - -#ifdef DEBUG -NSS_EXTERN PRStatus -nssPointerTracker_initialize -( - nssPointerTracker *tracker -); - -extern const NSSError NSS_ERROR_NO_MEMORY; -#endif /* DEBUG */ - -/* - * nssPointerTracker_finalize - * - * This method is only present in debug builds. - * - * This routine returns the nssPointerTracker object to the pre- - * initialized state, releasing all resources used by the object. - * It will *NOT* destroy the objects being tracked by the pointer - * (should any remain), and therefore cannot be used to "sweep up" - * remaining objects. This routine returns a PRStatus value; if - * successful, it will return PR_SUCCES. On failure it will set an - * error on the error stack and return PR_FAILURE. If any objects - * remain in the tracker when it is finalized, that will be treated - * as an error. - * - * The error may be one of the following values: - * NSS_ERROR_TRACKER_NOT_EMPTY - * - * Return value: - * PR_SUCCESS - * PR_FAILURE - */ - -#ifdef DEBUG -NSS_EXTERN PRStatus -nssPointerTracker_finalize -( - nssPointerTracker *tracker -); - -extern const NSSError NSS_ERROR_TRACKER_NOT_EMPTY; -#endif /* DEBUG */ - -/* - * nssPointerTracker_add - * - * This method is only present in debug builds. - * - * This routine adds the specified pointer to the nssPointerTracker - * object. It should be called in constructor objects to register - * new valid objects. The nssPointerTracker is threadsafe, but this - * call is not idempotent. This routine returns a PRStatus value; - * if successful it will return PR_SUCCESS. On failure it will set - * an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_NO_MEMORY - * NSS_ERROR_TRACKER_NOT_INITIALIZED - * NSS_ERROR_DUPLICATE_POINTER - * - * Return value: - * PR_SUCCESS - * PR_FAILURE - */ - -#ifdef DEBUG -NSS_EXTERN PRStatus -nssPointerTracker_add -( - nssPointerTracker *tracker, - const void *pointer -); - -extern const NSSError NSS_ERROR_NO_MEMORY; -extern const NSSError NSS_ERROR_TRACKER_NOT_INITIALIZED; -extern const NSSError NSS_ERROR_DUPLICATE_POINTER; -#endif /* DEBUG */ - -/* - * nssPointerTracker_remove - * - * This method is only present in debug builds. - * - * This routine removes the specified pointer from the - * nssPointerTracker object. It does not call any destructor for the - * object; rather, this should be called from the object's destructor. - * The nssPointerTracker is threadsafe, but this call is not - * idempotent. This routine returns a PRStatus value; if successful - * it will return PR_SUCCESS. On failure it will set an error on the - * error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_TRACKER_NOT_INITIALIZED - * NSS_ERROR_POINTER_NOT_REGISTERED - * - * Return value: - * PR_SUCCESS - * PR_FAILURE - */ - -#ifdef DEBUG -NSS_EXTERN PRStatus -nssPointerTracker_remove -( - nssPointerTracker *tracker, - const void *pointer -); - -extern const NSSError NSS_ERROR_TRACKER_NOT_INITIALIZED; -extern const NSSError NSS_ERROR_POINTER_NOT_REGISTERED; -#endif /* DEBUG */ - -/* - * nssPointerTracker_verify - * - * This method is only present in debug builds. - * - * This routine verifies that the specified pointer has been registered - * with the nssPointerTracker object. The nssPointerTracker object is - * threadsafe, and this call may be safely called from multiple threads - * simultaneously with the same arguments. This routine returns a - * PRStatus value; if the pointer is registered this will return - * PR_SUCCESS. Otherwise it will set an error on the error stack and - * return PR_FAILURE. Although the error is suitable for leaving on - * the stack, callers may wish to augment the information available by - * placing a more type-specific error on the stack. - * - * The error may be one of the following values: - * NSS_ERROR_POINTER_NOT_REGISTERED - * - * Return value: - * PR_SUCCESS - * PR_FAILRUE - */ - -#ifdef DEBUG -NSS_EXTERN PRStatus -nssPointerTracker_verify -( - nssPointerTracker *tracker, - const void *pointer -); - -extern const NSSError NSS_ERROR_POINTER_NOT_REGISTERED; -#endif /* DEBUG */ - /* * libc * @@ -1168,8 +883,6 @@ nsslibc_memcpy PRUint32 n ); -extern const NSSError NSS_ERROR_INVALID_POINTER; - /* * nsslibc_memset * @@ -1189,8 +902,6 @@ nsslibc_memset PRUint32 n ); -extern const NSSError NSS_ERROR_INVALID_POINTER; - /* * nsslibc_memequal * @@ -1212,8 +923,6 @@ nsslibc_memequal PRStatus *statusOpt ); -extern const NSSError NSS_ERROR_INVALID_POINTER; - #define nsslibc_offsetof(str, memb) ((PRPtrdiff)(&(((str *)0)->memb))) /* diff --git a/mozilla/security/nss/lib/base/errorval.c b/mozilla/security/nss/lib/base/errorval.c deleted file mode 100644 index 4849b0699e0..00000000000 --- a/mozilla/security/nss/lib/base/errorval.c +++ /dev/null @@ -1,94 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is the Netscape security libraries. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1994-2000 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the - * terms of the GNU General Public License Version 2 or later (the - * "GPL"), in which case the provisions of the GPL are applicable - * instead of those above. If you wish to allow use of your - * version of this file only under the terms of the GPL and not to - * allow others to use your version of this file under the MPL, - * indicate your decision by deleting the provisions above and - * replace them with the notice and other provisions required by - * the GPL. If you do not delete the provisions above, a recipient - * may use your version of this file under either the MPL or the - * GPL. - */ - -#ifdef DEBUG -static const char CVS_ID[] = "@(#) $RCSfile: errorval.c,v $ $Revision: 1.6.44.1 $ $Date: 2002-08-26 15:52:25 $ $Name: not supported by cvs2svn $"; -#endif /* DEBUG */ - -/* - * errorval.c - * - * This file contains the actual error constants used in NSS. - */ - -#ifndef NSSBASET_H -#include "nssbaset.h" -#endif /* NSSBASET_H */ - -const NSSError NSS_ERROR_NO_ERROR = 0; -const NSSError NSS_ERROR_INTERNAL_ERROR = 1; -const NSSError NSS_ERROR_NO_MEMORY = 2; -const NSSError NSS_ERROR_INVALID_POINTER = 3; -const NSSError NSS_ERROR_INVALID_ARENA = 4; -const NSSError NSS_ERROR_INVALID_ARENA_MARK = 5; -const NSSError NSS_ERROR_DUPLICATE_POINTER = 6; -const NSSError NSS_ERROR_POINTER_NOT_REGISTERED = 7; -const NSSError NSS_ERROR_TRACKER_NOT_EMPTY = 8; -const NSSError NSS_ERROR_TRACKER_NOT_INITIALIZED = 9; -const NSSError NSS_ERROR_ARENA_MARKED_BY_ANOTHER_THREAD = 10; -const NSSError NSS_ERROR_VALUE_TOO_LARGE = 11; -const NSSError NSS_ERROR_UNSUPPORTED_TYPE = 12; -const NSSError NSS_ERROR_BUFFER_TOO_SHORT = 13; -const NSSError NSS_ERROR_INVALID_ATOB_CONTEXT = 14; -const NSSError NSS_ERROR_INVALID_BASE64 = 15; -const NSSError NSS_ERROR_INVALID_BTOA_CONTEXT = 16; -const NSSError NSS_ERROR_INVALID_ITEM = 17; -const NSSError NSS_ERROR_INVALID_STRING = 18; -const NSSError NSS_ERROR_INVALID_ASN1ENCODER = 19; -const NSSError NSS_ERROR_INVALID_ASN1DECODER = 20; - -const NSSError NSS_ERROR_INVALID_BER = 21; -const NSSError NSS_ERROR_INVALID_ATAV = 22; -const NSSError NSS_ERROR_INVALID_ARGUMENT = 23; -const NSSError NSS_ERROR_INVALID_UTF8 = 24; -const NSSError NSS_ERROR_INVALID_NSSOID = 25; -const NSSError NSS_ERROR_UNKNOWN_ATTRIBUTE = 26; - -const NSSError NSS_ERROR_NOT_FOUND = 27; - -const NSSError NSS_ERROR_INVALID_PASSWORD = 28; -const NSSError NSS_ERROR_USER_CANCELED = 29; - -const NSSError NSS_ERROR_MAXIMUM_FOUND = 30; -const NSSError NSS_ERROR_INVALID_SIGNATURE = 31; -const NSSError NSS_ERROR_INVALID_DATA = 32; - -/* token errors */ -const NSSError NSS_ERROR_TOKEN_FAILURE = 100; - -/* certificate errors */ -const NSSError NSS_ERROR_CERTIFICATE_ISSUER_NOT_FOUND = 500; - -/* crypto context errors */ -const NSSError NSS_ERROR_INVALID_CRYPTO_CONTEXT = 800; - diff --git a/mozilla/security/nss/lib/base/hash.c b/mozilla/security/nss/lib/base/hash.c index 85e469c99cc..e911b0f33b5 100644 --- a/mozilla/security/nss/lib/base/hash.c +++ b/mozilla/security/nss/lib/base/hash.c @@ -32,7 +32,7 @@ */ #ifdef DEBUG -static const char CVS_ID[] = "@(#) $RCSfile: hash.c,v $ $Revision: 1.6.44.1 $ $Date: 2002-08-26 15:52:26 $ $Name: not supported by cvs2svn $"; +static const char CVS_ID[] = "@(#) $RCSfile: hash.c,v $ $Revision: 1.6.44.2 $ $Date: 2002-09-05 22:49:29 $ $Name: not supported by cvs2svn $"; #endif /* DEBUG */ /* @@ -127,13 +127,6 @@ nssHash_Create NSSArena *arena; PRBool i_alloced; -#ifdef NSSDEBUG - if( arenaOpt && PR_SUCCESS != nssArena_verifyPointer(arenaOpt) ) { - nss_SetError(NSS_ERROR_INVALID_POINTER); - return (nssHash *)NULL; - } -#endif /* NSSDEBUG */ - if (arenaOpt) { arena = arenaOpt; i_alloced = PR_FALSE; diff --git a/mozilla/security/nss/lib/base/hashops.c b/mozilla/security/nss/lib/base/hashops.c index f94d632a551..4c9127d053e 100644 --- a/mozilla/security/nss/lib/base/hashops.c +++ b/mozilla/security/nss/lib/base/hashops.c @@ -32,7 +32,7 @@ */ #ifdef DEBUG -static const char CVS_ID[] = "@(#) $RCSfile: hashops.c,v $ $Revision: 1.4 $ $Date: 2002-02-13 02:26:43 $ $Name: not supported by cvs2svn $"; +static const char CVS_ID[] = "@(#) $RCSfile: hashops.c,v $ $Revision: 1.4.42.1 $ $Date: 2002-09-05 22:49:30 $ $Name: not supported by cvs2svn $"; #endif /* DEBUG */ /* @@ -54,14 +54,6 @@ nss_arena_hash_alloc_table { NSSArena *arena = (NSSArena *)NULL; -#ifdef NSSDEBUG - if( (void *)NULL != arena ) { - if( PR_SUCCESS != nssArena_verifyPointer(arena) ) { - return (void *)NULL; - } - } -#endif /* NSSDEBUG */ - return nss_ZAlloc(arena, size); } @@ -84,14 +76,6 @@ nss_arena_hash_alloc_entry { NSSArena *arena = NULL; -#ifdef NSSDEBUG - if( (void *)NULL != arena ) { - if( PR_SUCCESS != nssArena_verifyPointer(arena) ) { - return (void *)NULL; - } - } -#endif /* NSSDEBUG */ - return nss_ZNEW(arena, PLHashEntry); } diff --git a/mozilla/security/nss/lib/base/item.c b/mozilla/security/nss/lib/base/item.c index 8f0e8c74908..15fdb8411b0 100644 --- a/mozilla/security/nss/lib/base/item.c +++ b/mozilla/security/nss/lib/base/item.c @@ -32,7 +32,7 @@ */ #ifdef DEBUG -static const char CVS_ID[] = "@(#) $RCSfile: item.c,v $ $Revision: 1.2.44.1 $ $Date: 2002-08-26 15:52:26 $ $Name: not supported by cvs2svn $"; +static const char CVS_ID[] = "@(#) $RCSfile: item.c,v $ $Revision: 1.2.44.2 $ $Date: 2002-09-05 22:49:30 $ $Name: not supported by cvs2svn $"; #endif /* DEBUG */ /* @@ -72,21 +72,6 @@ nssItem_Create { NSSItem *rv = (NSSItem *)NULL; -#ifdef DEBUG - if( (NSSArena *)NULL != arenaOpt ) { - if( PR_SUCCESS != nssArena_verifyPointer(arenaOpt) ) { - return (NSSItem *)NULL; - } - } - - if( (const void *)NULL == data ) { - if( length > 0 ) { - nss_SetError(NSS_ERROR_INVALID_POINTER); - return (NSSItem *)NULL; - } - } -#endif /* DEBUG */ - if( (NSSItem *)NULL == rvOpt ) { rv = (NSSItem *)nss_ZNEW(arenaOpt, NSSItem); if( (NSSItem *)NULL == rv ) { @@ -172,52 +157,9 @@ nssItem_Duplicate NSSItem *rvOpt ) { -#ifdef DEBUG - if( (NSSArena *)NULL != arenaOpt ) { - if( PR_SUCCESS != nssArena_verifyPointer(arenaOpt) ) { - return (NSSItem *)NULL; - } - } - - if( (NSSItem *)NULL == obj ) { - nss_SetError(NSS_ERROR_INVALID_ITEM); - return (NSSItem *)NULL; - } -#endif /* DEBUG */ - return nssItem_Create(arenaOpt, rvOpt, obj->size, obj->data); } -#ifdef DEBUG -/* - * nssItem_verifyPointer - * - * -- fgmr comments -- - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_ITEM - * - * Return value: - * PR_SUCCESS upon success - * PR_FAILURE upon failure - */ - -NSS_IMPLEMENT PRStatus -nssItem_verifyPointer -( - const NSSItem *item -) -{ - if( ((const NSSItem *)NULL == item) || - (((void *)NULL == item->data) && (item->size > 0)) ) { - nss_SetError(NSS_ERROR_INVALID_ITEM); - return PR_FAILURE; - } - - return PR_SUCCESS; -} -#endif /* DEBUG */ - /* * nssItem_Equal * diff --git a/mozilla/security/nss/lib/base/manifest.mn b/mozilla/security/nss/lib/base/manifest.mn index 79832704183..4ac344ce248 100644 --- a/mozilla/security/nss/lib/base/manifest.mn +++ b/mozilla/security/nss/lib/base/manifest.mn @@ -30,7 +30,7 @@ # may use your version of this file under either the MPL or the # GPL. # -MANIFEST_CVS_ID = "@(#) $RCSfile: manifest.mn,v $ $Revision: 1.5.44.2 $ $Date: 2002-08-26 18:36:30 $ $Name: not supported by cvs2svn $" +MANIFEST_CVS_ID = "@(#) $RCSfile: manifest.mn,v $ $Revision: 1.5.44.3 $ $Date: 2002-09-05 22:49:31 $ $Name: not supported by cvs2svn $" CORE_DEPTH = ../../.. @@ -39,9 +39,10 @@ PRIVATE_EXPORTS = \ base.h \ $(NULL) -EXPORTS = \ - nssbaset.h \ - nssbase.h \ +EXPORTS = \ + nssbaset.h \ + nssbase.h \ + nsserrors.h \ $(NULL) MODULE = security @@ -49,10 +50,8 @@ MODULE = security CSRCS = \ arena.c \ error.c \ - errorval.c \ hashops.c \ libc.c \ - tracker.c \ item.c \ utf8.c \ hash.c \ diff --git a/mozilla/security/nss/lib/base/nssbase.h b/mozilla/security/nss/lib/base/nssbase.h index ecf7f30c3c8..065dc600b33 100644 --- a/mozilla/security/nss/lib/base/nssbase.h +++ b/mozilla/security/nss/lib/base/nssbase.h @@ -35,7 +35,7 @@ #define NSSBASE_H #ifdef DEBUG -static const char NSSBASE_CVS_ID[] = "@(#) $RCSfile: nssbase.h,v $ $Revision: 1.1.192.1 $ $Date: 2002-08-26 15:52:27 $ $Name: not supported by cvs2svn $"; +static const char NSSBASE_CVS_ID[] = "@(#) $RCSfile: nssbase.h,v $ $Revision: 1.1.192.2 $ $Date: 2002-09-05 22:49:31 $ $Name: not supported by cvs2svn $"; #endif /* DEBUG */ /* @@ -49,6 +49,10 @@ static const char NSSBASE_CVS_ID[] = "@(#) $RCSfile: nssbase.h,v $ $Revision: 1. #include "nssbaset.h" #endif /* NSSBASET_H */ +#ifndef NSSERRORS_H +#include "nsserrors.h" +#endif /* NSSERRORS_H */ + PR_BEGIN_EXTERN_C /* @@ -80,8 +84,6 @@ NSSArena_Create void ); -extern const NSSError NSS_ERROR_NO_MEMORY; - /* * NSSArena_Destroy * @@ -104,8 +106,6 @@ NSSArena_Destroy NSSArena *arena ); -extern const NSSError NSS_ERROR_INVALID_ARENA; - /* * The error stack * @@ -136,8 +136,6 @@ NSS_GetError void ); -extern const NSSError NSS_ERROR_NO_ERROR; - /* * NSS_GetErrorStack * diff --git a/mozilla/security/nss/lib/base/tracker.c b/mozilla/security/nss/lib/base/tracker.c deleted file mode 100644 index 04974395fb2..00000000000 --- a/mozilla/security/nss/lib/base/tracker.c +++ /dev/null @@ -1,543 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is the Netscape security libraries. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1994-2000 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the - * terms of the GNU General Public License Version 2 or later (the - * "GPL"), in which case the provisions of the GPL are applicable - * instead of those above. If you wish to allow use of your - * version of this file only under the terms of the GPL and not to - * allow others to use your version of this file under the MPL, - * indicate your decision by deleting the provisions above and - * replace them with the notice and other provisions required by - * the GPL. If you do not delete the provisions above, a recipient - * may use your version of this file under either the MPL or the - * GPL. - */ - -#ifdef DEBUG -static const char CVS_ID[] = "@(#) $RCSfile: tracker.c,v $ $Revision: 1.4 $ $Date: 2001-12-06 21:25:32 $ $Name: not supported by cvs2svn $"; -#endif /* DEBUG */ - -/* - * tracker.c - * - * This file contains the code used by the pointer-tracking calls used - * in the debug builds to catch bad pointers. The entire contents are - * only available in debug builds (both internal and external builds). - */ - -#ifndef BASE_H -#include "base.h" -#endif /* BASE_H */ - -#ifdef DEBUG - -/* - * call_once - * - * Unfortunately, NSPR's PR_CallOnce function doesn't accept a closure - * variable. So I have a static version here which does. This code - * is based on NSPR's, and uses the NSPR function to initialize the - * required lock. - */ - -/* - * The is the "once block" that's passed to the "real" PR_CallOnce - * function, to call the local initializer myOnceFunction once. - */ -static PRCallOnceType myCallOnce; - -/* - * This structure is used by the call_once function to make sure that - * any "other" threads calling the call_once don't return too quickly, - * before the initializer has finished. - */ -static struct { - PZLock *ml; - PZCondVar *cv; -} mod_init; - -/* - * This is the initializer for the above mod_init structure. - */ -static PRStatus -myOnceFunction -( - void -) -{ - mod_init.ml = PZ_NewLock(nssILockOther); - if( (PZLock *)NULL == mod_init.ml ) { - return PR_FAILURE; - } - - mod_init.cv = PZ_NewCondVar(mod_init.ml); - if( (PZCondVar *)NULL == mod_init.cv ) { - PZ_DestroyLock(mod_init.ml); - mod_init.ml = (PZLock *)NULL; - return PR_FAILURE; - } - - return PR_SUCCESS; -} - -/* - * The nss call_once callback takes a closure argument. - */ -typedef PRStatus (PR_CALLBACK *nssCallOnceFN)(void *arg); - -/* - * NSS's call_once function. - */ -static PRStatus -call_once -( - PRCallOnceType *once, - nssCallOnceFN func, - void *arg -) -{ - PRStatus rv; - - if( !myCallOnce.initialized ) { - rv = PR_CallOnce(&myCallOnce, myOnceFunction); - if( PR_SUCCESS != rv ) { - return rv; - } - } - - if( !once->initialized ) { - if( 0 == PR_AtomicSet(&once->inProgress, 1) ) { - once->status = (*func)(arg); - PZ_Lock(mod_init.ml); - once->initialized = 1; - PZ_NotifyAllCondVar(mod_init.cv); - PZ_Unlock(mod_init.ml); - } else { - PZ_Lock(mod_init.ml); - while( !once->initialized ) { - PZ_WaitCondVar(mod_init.cv, PR_INTERVAL_NO_TIMEOUT); - } - PZ_Unlock(mod_init.ml); - } - } - - return once->status; -} - -/* - * Now we actually get to my own "call once" payload function. - * But wait, to create the hash, I need a hash function! - */ - -/* - * identity_hash - * - * This static callback is a PLHashFunction as defined in plhash.h - * It merely returns the value of the object pointer as its hash. - * There are no possible errors. - */ - -static PLHashNumber PR_CALLBACK -identity_hash -( - const void *key -) -{ - return (PLHashNumber)key; -} - -/* - * trackerOnceFunc - * - * This function is called once, using the nssCallOnce function above. - * It creates a new pointer tracker object; initialising its hash - * table and protective lock. - */ - -static PRStatus -trackerOnceFunc -( - void *arg -) -{ - nssPointerTracker *tracker = (nssPointerTracker *)arg; - - tracker->lock = PZ_NewLock(nssILockOther); - if( (PZLock *)NULL == tracker->lock ) { - return PR_FAILURE; - } - - tracker->table = PL_NewHashTable(0, - identity_hash, - PL_CompareValues, - PL_CompareValues, - (PLHashAllocOps *)NULL, - (void *)NULL); - if( (PLHashTable *)NULL == tracker->table ) { - PZ_DestroyLock(tracker->lock); - tracker->lock = (PZLock *)NULL; - return PR_FAILURE; - } - - return PR_SUCCESS; -} - -/* - * nssPointerTracker_initialize - * - * This method is only present in debug builds. - * - * This routine initializes an nssPointerTracker object. Note that - * the object must have been declared *static* to guarantee that it - * is in a zeroed state initially. This routine is idempotent, and - * may even be safely called by multiple threads simultaneously with - * the same argument. This routine returns a PRStatus value; if - * successful, it will return PR_SUCCESS. On failure it will set an - * error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_NO_MEMORY - * - * Return value: - * PR_SUCCESS - * PR_FAILURE - */ - -NSS_IMPLEMENT PRStatus -nssPointerTracker_initialize -( - nssPointerTracker *tracker -) -{ - PRStatus rv = call_once(&tracker->once, trackerOnceFunc, tracker); - if( PR_SUCCESS != rv ) { - nss_SetError(NSS_ERROR_NO_MEMORY); - } - - return rv; -} - -#ifdef DONT_DESTROY_EMPTY_TABLES -/* See same #ifdef below */ -/* - * count_entries - * - * This static routine is a PLHashEnumerator, as defined in plhash.h. - * It merely causes the enumeration function to count the number of - * entries. - */ - -static PRIntn PR_CALLBACK -count_entries -( - PLHashEntry *he, - PRIntn index, - void *arg -) -{ - return HT_ENUMERATE_NEXT; -} -#endif /* DONT_DESTROY_EMPTY_TABLES */ - -/* - * zero_once - * - * This is a guaranteed zeroed once block. It's used to help clear - * the tracker. - */ - -static const PRCallOnceType zero_once; - -/* - * nssPointerTracker_finalize - * - * This method is only present in debug builds. - * - * This routine returns the nssPointerTracker object to the pre- - * initialized state, releasing all resources used by the object. - * It will *NOT* destroy the objects being tracked by the pointer - * (should any remain), and therefore cannot be used to "sweep up" - * remaining objects. This routine returns a PRStatus value; if - * successful, it will return PR_SUCCES. On failure it will set an - * error on the error stack and return PR_FAILURE. If any objects - * remain in the tracker when it is finalized, that will be treated - * as an error. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_POINTER - * NSS_ERROR_TRACKER_NOT_INITIALIZED - * NSS_ERROR_TRACKER_NOT_EMPTY - * - * Return value: - * PR_SUCCESS - * PR_FAILURE - */ - -NSS_IMPLEMENT PRStatus -nssPointerTracker_finalize -( - nssPointerTracker *tracker -) -{ - PZLock *lock; - - if( (nssPointerTracker *)NULL == tracker ) { - nss_SetError(NSS_ERROR_INVALID_POINTER); - return PR_FAILURE; - } - - if( (PZLock *)NULL == tracker->lock ) { - nss_SetError(NSS_ERROR_TRACKER_NOT_INITIALIZED); - return PR_FAILURE; - } - - lock = tracker->lock; - PZ_Lock(lock); - - if( (PLHashTable *)NULL == tracker->table ) { - PZ_Unlock(lock); - nss_SetError(NSS_ERROR_TRACKER_NOT_INITIALIZED); - return PR_FAILURE; - } - -#ifdef DONT_DESTROY_EMPTY_TABLES - /* - * I changed my mind; I think we don't want this after all. - * Comments? - */ - count = PL_HashTableEnumerateEntries(tracker->table, - count_entries, - (void *)NULL); - - if( 0 != count ) { - PZ_Unlock(lock); - nss_SetError(NSS_ERROR_TRACKER_NOT_EMPTY); - return PR_FAILURE; - } -#endif /* DONT_DESTROY_EMPTY_TABLES */ - - PL_HashTableDestroy(tracker->table); - /* memset(tracker, 0, sizeof(nssPointerTracker)); */ - tracker->once = zero_once; - tracker->lock = (PZLock *)NULL; - tracker->table = (PLHashTable *)NULL; - - PZ_Unlock(lock); - PZ_DestroyLock(lock); - - return PR_SUCCESS; -} - -/* - * nssPointerTracker_add - * - * This method is only present in debug builds. - * - * This routine adds the specified pointer to the nssPointerTracker - * object. It should be called in constructor objects to register - * new valid objects. The nssPointerTracker is threadsafe, but this - * call is not idempotent. This routine returns a PRStatus value; - * if successful it will return PR_SUCCESS. On failure it will set - * an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_POINTER - * NSS_ERROR_NO_MEMORY - * NSS_ERROR_TRACKER_NOT_INITIALIZED - * NSS_ERROR_DUPLICATE_POINTER - * - * Return value: - * PR_SUCCESS - * PR_FAILURE - */ - -NSS_IMPLEMENT PRStatus -nssPointerTracker_add -( - nssPointerTracker *tracker, - const void *pointer -) -{ - void *check; - PLHashEntry *entry; - - if( (nssPointerTracker *)NULL == tracker ) { - nss_SetError(NSS_ERROR_INVALID_POINTER); - return PR_FAILURE; - } - - if( (PZLock *)NULL == tracker->lock ) { - nss_SetError(NSS_ERROR_TRACKER_NOT_INITIALIZED); - return PR_FAILURE; - } - - PZ_Lock(tracker->lock); - - if( (PLHashTable *)NULL == tracker->table ) { - PZ_Unlock(tracker->lock); - nss_SetError(NSS_ERROR_TRACKER_NOT_INITIALIZED); - return PR_FAILURE; - } - - check = PL_HashTableLookup(tracker->table, pointer); - if( (void *)NULL != check ) { - PZ_Unlock(tracker->lock); - nss_SetError(NSS_ERROR_DUPLICATE_POINTER); - return PR_FAILURE; - } - - entry = PL_HashTableAdd(tracker->table, pointer, (void *)pointer); - - PZ_Unlock(tracker->lock); - - if( (PLHashEntry *)NULL == entry ) { - nss_SetError(NSS_ERROR_NO_MEMORY); - return PR_FAILURE; - } - - return PR_SUCCESS; -} - -/* - * nssPointerTracker_remove - * - * This method is only present in debug builds. - * - * This routine removes the specified pointer from the - * nssPointerTracker object. It does not call any destructor for the - * object; rather, this should be called from the object's destructor. - * The nssPointerTracker is threadsafe, but this call is not - * idempotent. This routine returns a PRStatus value; if successful - * it will return PR_SUCCESS. On failure it will set an error on the - * error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_POINTER - * NSS_ERROR_TRACKER_NOT_INITIALIZED - * NSS_ERROR_POINTER_NOT_REGISTERED - * - * Return value: - * PR_SUCCESS - * PR_FAILURE - */ - -NSS_IMPLEMENT PRStatus -nssPointerTracker_remove -( - nssPointerTracker *tracker, - const void *pointer -) -{ - PRBool registered; - - if( (nssPointerTracker *)NULL == tracker ) { - nss_SetError(NSS_ERROR_INVALID_POINTER); - return PR_FAILURE; - } - - if( (PZLock *)NULL == tracker->lock ) { - nss_SetError(NSS_ERROR_TRACKER_NOT_INITIALIZED); - return PR_FAILURE; - } - - PZ_Lock(tracker->lock); - - if( (PLHashTable *)NULL == tracker->table ) { - PZ_Unlock(tracker->lock); - nss_SetError(NSS_ERROR_TRACKER_NOT_INITIALIZED); - return PR_FAILURE; - } - - registered = PL_HashTableRemove(tracker->table, pointer); - PZ_Unlock(tracker->lock); - - if( !registered ) { - nss_SetError(NSS_ERROR_POINTER_NOT_REGISTERED); - return PR_FAILURE; - } - - return PR_SUCCESS; -} - -/* - * nssPointerTracker_verify - * - * This method is only present in debug builds. - * - * This routine verifies that the specified pointer has been registered - * with the nssPointerTracker object. The nssPointerTracker object is - * threadsafe, and this call may be safely called from multiple threads - * simultaneously with the same arguments. This routine returns a - * PRStatus value; if the pointer is registered this will return - * PR_SUCCESS. Otherwise it will set an error on the error stack and - * return PR_FAILURE. Although the error is suitable for leaving on - * the stack, callers may wish to augment the information available by - * placing a more type-specific error on the stack. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_POINTER - * NSS_ERROR_TRACKER_NOT_INITIALIZED - * NSS_ERROR_POINTER_NOT_REGISTERED - * - * Return value: - * PR_SUCCESS - * PR_FAILRUE - */ - -NSS_IMPLEMENT PRStatus -nssPointerTracker_verify -( - nssPointerTracker *tracker, - const void *pointer -) -{ - void *check; - - if( (nssPointerTracker *)NULL == tracker ) { - nss_SetError(NSS_ERROR_INVALID_POINTER); - return PR_FAILURE; - } - - if( (PZLock *)NULL == tracker->lock ) { - nss_SetError(NSS_ERROR_TRACKER_NOT_INITIALIZED); - return PR_FAILURE; - } - - PZ_Lock(tracker->lock); - - if( (PLHashTable *)NULL == tracker->table ) { - PZ_Unlock(tracker->lock); - nss_SetError(NSS_ERROR_TRACKER_NOT_INITIALIZED); - return PR_FAILURE; - } - - check = PL_HashTableLookup(tracker->table, pointer); - PZ_Unlock(tracker->lock); - - if( (void *)NULL == check ) { - nss_SetError(NSS_ERROR_POINTER_NOT_REGISTERED); - return PR_FAILURE; - } - - return PR_SUCCESS; -} - -#endif /* DEBUG */ diff --git a/mozilla/security/nss/lib/base/utf8.c b/mozilla/security/nss/lib/base/utf8.c index c2f9e1e62aa..7695e4e0495 100644 --- a/mozilla/security/nss/lib/base/utf8.c +++ b/mozilla/security/nss/lib/base/utf8.c @@ -32,7 +32,7 @@ */ #ifdef DEBUG -static const char CVS_ID[] = "@(#) $RCSfile: utf8.c,v $ $Revision: 1.5.44.1 $ $Date: 2002-08-26 15:52:27 $ $Name: not supported by cvs2svn $"; +static const char CVS_ID[] = "@(#) $RCSfile: utf8.c,v $ $Revision: 1.5.44.2 $ $Date: 2002-09-05 22:49:31 $ $Name: not supported by cvs2svn $"; #endif /* DEBUG */ /* @@ -78,17 +78,6 @@ nssUTF8_CaseIgnoreMatch PRStatus *statusOpt ) { -#ifdef NSSDEBUG - if( ((const NSSUTF8 *)NULL == a) || - ((const NSSUTF8 *)NULL == b) ) { - nss_SetError(NSS_ERROR_INVALID_POINTER); - if( (PRStatus *)NULL != statusOpt ) { - *statusOpt = PR_FAILURE; - } - return PR_FALSE; - } -#endif /* NSSDEBUG */ - if( (PRStatus *)NULL != statusOpt ) { *statusOpt = PR_SUCCESS; } @@ -138,17 +127,6 @@ nssUTF8_PrintableMatch PRUint8 *c; PRUint8 *d; -#ifdef NSSDEBUG - if( ((const NSSUTF8 *)NULL == a) || - ((const NSSUTF8 *)NULL == b) ) { - nss_SetError(NSS_ERROR_INVALID_POINTER); - if( (PRStatus *)NULL != statusOpt ) { - *statusOpt = PR_FAILURE; - } - return PR_FALSE; - } -#endif /* NSSDEBUG */ - if( (PRStatus *)NULL != statusOpt ) { *statusOpt = PR_SUCCESS; } @@ -243,19 +221,6 @@ nssUTF8_Duplicate NSSUTF8 *rv; PRUint32 len; -#ifdef NSSDEBUG - if( (const NSSUTF8 *)NULL == s ) { - nss_SetError(NSS_ERROR_INVALID_POINTER); - return (NSSUTF8 *)NULL; - } - - if( (NSSArena *)NULL != arenaOpt ) { - if( PR_SUCCESS != nssArena_verifyPointer(arenaOpt) ) { - return (NSSUTF8 *)NULL; - } - } -#endif /* NSSDEBUG */ - len = PL_strlen((const char *)s); #ifdef PEDANTIC if( '\0' != ((const char *)s)[ len ] ) { @@ -310,16 +275,6 @@ nssUTF8_Size { PRUint32 sv; -#ifdef NSSDEBUG - if( (const NSSUTF8 *)NULL == s ) { - nss_SetError(NSS_ERROR_INVALID_POINTER); - if( (PRStatus *)NULL != statusOpt ) { - *statusOpt = PR_FAILURE; - } - return 0; - } -#endif /* NSSDEBUG */ - sv = PL_strlen((const char *)s) + 1; #ifdef PEDANTIC if( '\0' != ((const char *)s)[ sv-1 ] ) { @@ -366,13 +321,6 @@ nssUTF8_Length PRUint32 l = 0; const PRUint8 *c = (const PRUint8 *)s; -#ifdef NSSDEBUG - if( (const NSSUTF8 *)NULL == s ) { - nss_SetError(NSS_ERROR_INVALID_POINTER); - goto loser; - } -#endif /* NSSDEBUG */ - /* * From RFC 2044: * @@ -465,7 +413,6 @@ nssUTF8_Length * A non-null pointer to a new UTF8 string otherwise */ -extern const NSSError NSS_ERROR_INTERNAL_ERROR; /* XXX fgmr */ NSS_IMPLEMENT NSSUTF8 * nssUTF8_Create @@ -478,19 +425,6 @@ nssUTF8_Create { NSSUTF8 *rv = NULL; -#ifdef NSSDEBUG - if( (NSSArena *)NULL != arenaOpt ) { - if( PR_SUCCESS != nssArena_verifyPointer(arenaOpt) ) { - return (NSSUTF8 *)NULL; - } - } - - if( (const void *)NULL == inputString ) { - nss_SetError(NSS_ERROR_INVALID_POINTER); - return (NSSUTF8 *)NULL; - } -#endif /* NSSDEBUG */ - switch( type ) { case nssStringType_DirectoryString: /* This is a composite type requiring BER */ @@ -581,19 +515,6 @@ nssUTF8_GetEncoding NSSItem *rv = (NSSItem *)NULL; PRStatus status = PR_SUCCESS; -#ifdef NSSDEBUG - if( (NSSArena *)NULL != arenaOpt ) { - if( PR_SUCCESS != nssArena_verifyPointer(arenaOpt) ) { - return (NSSItem *)NULL; - } - } - - if( (NSSUTF8 *)NULL == string ) { - nss_SetError(NSS_ERROR_INVALID_POINTER); - return (NSSItem *)NULL; - } -#endif /* NSSDEBUG */ - switch( type ) { case nssStringType_DirectoryString: nss_SetError(NSS_ERROR_INTERNAL_ERROR); /* unimplemented */ @@ -671,23 +592,6 @@ nssUTF8_CopyIntoFixedBuffer { PRUint32 stringSize = 0; -#ifdef NSSDEBUG - if( (char *)NULL == buffer ) { - nss_SetError(NSS_ERROR_INVALID_POINTER); - return PR_FALSE; - } - - if( 0 == bufferSize ) { - nss_SetError(NSS_ERROR_INVALID_ARGUMENT); - return PR_FALSE; - } - - if( (pad & 0x80) != 0x00 ) { - nss_SetError(NSS_ERROR_INVALID_ARGUMENT); - return PR_FALSE; - } -#endif /* NSSDEBUG */ - if( (NSSUTF8 *)NULL == string ) { string = (NSSUTF8 *) ""; } @@ -740,17 +644,6 @@ nssUTF8_Equal { PRUint32 la, lb; -#ifdef NSSDEBUG - if( ((const NSSUTF8 *)NULL == a) || - ((const NSSUTF8 *)NULL == b) ) { - nss_SetError(NSS_ERROR_INVALID_POINTER); - if( (PRStatus *)NULL != statusOpt ) { - *statusOpt = PR_FAILURE; - } - return PR_FALSE; - } -#endif /* NSSDEBUG */ - la = nssUTF8_Size(a, statusOpt); if( 0 == la ) { return PR_FALSE; diff --git a/mozilla/security/nss/lib/dev/dev.h b/mozilla/security/nss/lib/dev/dev.h index 09e1cc1b8e6..154e0102d0c 100644 --- a/mozilla/security/nss/lib/dev/dev.h +++ b/mozilla/security/nss/lib/dev/dev.h @@ -41,7 +41,7 @@ */ #ifdef DEBUG -static const char DEV_CVS_ID[] = "@(#) $RCSfile: dev.h,v $ $Revision: 1.29.2.1 $ $Date: 2002-08-26 15:57:54 $ $Name: not supported by cvs2svn $"; +static const char DEV_CVS_ID[] = "@(#) $RCSfile: dev.h,v $ $Revision: 1.29.2.2 $ $Date: 2002-09-05 22:49:34 $ $Name: not supported by cvs2svn $"; #endif /* DEBUG */ #ifndef NSSCKT_H @@ -326,8 +326,6 @@ nssSlot_Login NSSSlot *slot, NSSCallback *pwcb ); -extern const NSSError NSS_ERROR_INVALID_PASSWORD; -extern const NSSError NSS_ERROR_USER_CANCELED; NSS_EXTERN PRStatus nssSlot_Logout @@ -867,9 +865,6 @@ nssToken_SignRecover NSSArena *arenaOpt ); -extern const NSSError NSS_ERROR_INVALID_SIGNATURE; -extern const NSSError NSS_ERROR_INVALID_DATA; -extern const NSSError NSS_ERROR_TOKEN_FAILURE; NSS_EXTERN PRStatus nssToken_Verify diff --git a/mozilla/security/nss/lib/pki/asymmkey.c b/mozilla/security/nss/lib/pki/asymmkey.c index 6bc2ca75be6..cdf1ecb71c7 100644 --- a/mozilla/security/nss/lib/pki/asymmkey.c +++ b/mozilla/security/nss/lib/pki/asymmkey.c @@ -32,7 +32,7 @@ */ #ifdef DEBUG -static const char CVS_ID[] = "@(#) $RCSfile: asymmkey.c,v $ $Revision: 1.3.44.2 $ $Date: 2002-08-27 23:07:06 $ $Name: not supported by cvs2svn $"; +static const char CVS_ID[] = "@(#) $RCSfile: asymmkey.c,v $ $Revision: 1.3.44.3 $ $Date: 2002-09-05 22:49:38 $ $Name: not supported by cvs2svn $"; #endif /* DEBUG */ #ifndef BASE_H @@ -47,7 +47,6 @@ static const char CVS_ID[] = "@(#) $RCSfile: asymmkey.c,v $ $Revision: 1.3.44.2 #include "pkim.h" #endif /* PKIM_H */ -extern const NSSError NSS_ERROR_NOT_FOUND; #ifdef nodef typedef union diff --git a/mozilla/security/nss/lib/pki/certificate.c b/mozilla/security/nss/lib/pki/certificate.c index 90669f7000d..2ac5effdf82 100644 --- a/mozilla/security/nss/lib/pki/certificate.c +++ b/mozilla/security/nss/lib/pki/certificate.c @@ -32,7 +32,7 @@ */ #ifdef DEBUG -static const char CVS_ID[] = "@(#) $RCSfile: certificate.c,v $ $Revision: 1.38.2.3 $ $Date: 2002-08-27 23:07:07 $ $Name: not supported by cvs2svn $"; +static const char CVS_ID[] = "@(#) $RCSfile: certificate.c,v $ $Revision: 1.38.2.4 $ $Date: 2002-09-05 22:49:38 $ $Name: not supported by cvs2svn $"; #endif /* DEBUG */ #ifndef BASE_H @@ -75,7 +75,6 @@ struct NSSCertificateStr nssCertDecoding decoding; }; -extern const NSSError NSS_ERROR_NOT_FOUND; NSS_EXTERN NSSCertificateMethods * nss_GetMethodsForType diff --git a/mozilla/security/nss/lib/pki/cryptocontext.c b/mozilla/security/nss/lib/pki/cryptocontext.c index 16d56b50d4b..09183321620 100644 --- a/mozilla/security/nss/lib/pki/cryptocontext.c +++ b/mozilla/security/nss/lib/pki/cryptocontext.c @@ -32,7 +32,7 @@ */ #ifdef DEBUG -static const char CVS_ID[] = "@(#) $RCSfile: cryptocontext.c,v $ $Revision: 1.10.18.2 $ $Date: 2002-08-27 23:07:08 $ $Name: not supported by cvs2svn $"; +static const char CVS_ID[] = "@(#) $RCSfile: cryptocontext.c,v $ $Revision: 1.10.18.3 $ $Date: 2002-09-05 22:49:39 $ $Name: not supported by cvs2svn $"; #endif /* DEBUG */ #ifndef DEV_H @@ -68,7 +68,6 @@ struct NSSCryptoContextStr NSSCertificate *cert; }; -extern const NSSError NSS_ERROR_NOT_FOUND; NSS_IMPLEMENT NSSCryptoContext * nssCryptoContext_Create diff --git a/mozilla/security/nss/lib/pki/nsspki.h b/mozilla/security/nss/lib/pki/nsspki.h index 0909b2fc646..a3b823119de 100644 --- a/mozilla/security/nss/lib/pki/nsspki.h +++ b/mozilla/security/nss/lib/pki/nsspki.h @@ -35,7 +35,7 @@ #define NSSPKI_H #ifdef DEBUG -static const char NSSPKI_CVS_ID[] = "@(#) $RCSfile: nsspki.h,v $ $Revision: 1.7.44.3 $ $Date: 2002-08-28 15:42:21 $ $Name: not supported by cvs2svn $"; +static const char NSSPKI_CVS_ID[] = "@(#) $RCSfile: nsspki.h,v $ $Revision: 1.7.44.4 $ $Date: 2002-09-05 22:49:41 $ $Name: not supported by cvs2svn $"; #endif /* DEBUG */ /* @@ -235,7 +235,6 @@ NSSCertificate_Encode * */ -extern const NSSError NSS_ERROR_CERTIFICATE_ISSUER_NOT_FOUND; NSS_EXTERN NSSCertificate ** NSSCertificate_BuildChain @@ -2704,7 +2703,6 @@ NSSCryptoContext_FindSymmetricKeyByAlgorithmAndKeyID * of this crypto context. */ -extern const NSSError NSS_ERROR_INVALID_CRYPTO_CONTEXT; NSS_EXTERN NSSItem * NSSCryptoContext_Encrypt diff --git a/mozilla/security/nss/lib/pki/symmkey.c b/mozilla/security/nss/lib/pki/symmkey.c index 7489f2133ce..7d09aac2465 100644 --- a/mozilla/security/nss/lib/pki/symmkey.c +++ b/mozilla/security/nss/lib/pki/symmkey.c @@ -32,7 +32,7 @@ */ #ifdef DEBUG -static const char CVS_ID[] = "@(#) $RCSfile: symmkey.c,v $ $Revision: 1.3.44.1 $ $Date: 2002-08-26 16:02:18 $ $Name: not supported by cvs2svn $"; +static const char CVS_ID[] = "@(#) $RCSfile: symmkey.c,v $ $Revision: 1.3.44.2 $ $Date: 2002-09-05 22:49:42 $ $Name: not supported by cvs2svn $"; #endif /* DEBUG */ #ifndef DEV_H @@ -43,7 +43,6 @@ static const char CVS_ID[] = "@(#) $RCSfile: symmkey.c,v $ $Revision: 1.3.44.1 $ #include "pkim.h" #endif /* PKIM_H */ -extern const NSSError NSS_ERROR_NOT_FOUND; struct NSSSymmetricKeyStr { diff --git a/mozilla/security/nss/lib/pki/trustdomain.c b/mozilla/security/nss/lib/pki/trustdomain.c index 1cca7b38d4c..5e916b432cb 100644 --- a/mozilla/security/nss/lib/pki/trustdomain.c +++ b/mozilla/security/nss/lib/pki/trustdomain.c @@ -32,7 +32,7 @@ */ #ifdef DEBUG -static const char CVS_ID[] = "@(#) $RCSfile: trustdomain.c,v $ $Revision: 1.42.16.3 $ $Date: 2002-08-27 23:07:12 $ $Name: not supported by cvs2svn $"; +static const char CVS_ID[] = "@(#) $RCSfile: trustdomain.c,v $ $Revision: 1.42.16.4 $ $Date: 2002-09-05 22:49:43 $ $Name: not supported by cvs2svn $"; #endif /* DEBUG */ #ifndef DEV_H @@ -63,7 +63,6 @@ struct NSSTrustDomainStr { #endif /* CERT_CACHE */ }; -extern const NSSError NSS_ERROR_NOT_FOUND; NSS_IMPLEMENT NSSTrustDomain * NSSTrustDomain_Create diff --git a/mozilla/security/nss/lib/pki1/atav.c b/mozilla/security/nss/lib/pki1/atav.c index c922340ada5..12692e0f7de 100644 --- a/mozilla/security/nss/lib/pki1/atav.c +++ b/mozilla/security/nss/lib/pki1/atav.c @@ -32,7 +32,7 @@ */ #ifdef DEBUG -static const char CVS_ID[] = "@(#) $RCSfile: atav.c,v $ $Revision: 1.6 $ $Date: 2002-02-19 02:06:25 $ $Name: not supported by cvs2svn $"; +static const char CVS_ID[] = "@(#) $RCSfile: atav.c,v $ $Revision: 1.6.40.1 $ $Date: 2002-09-05 22:49:47 $ $Name: not supported by cvs2svn $"; #endif /* DEBUG */ /* @@ -570,7 +570,6 @@ NSSATAV_Duplicate */ #ifdef DEBUG -extern const NSSError NSS_ERROR_INTERNAL_ERROR; static nssPointerTracker atav_pointer_tracker; @@ -1008,7 +1007,6 @@ nss_atav_fromhex * A pointer to an NSSATAV upon success */ -extern const NSSError NSS_ERROR_INTERNAL_ERROR; NSS_IMPLEMENT NSSATAV * nssATAV_CreateFromUTF8 diff --git a/mozilla/security/nss/lib/pki1/nsspki1.h b/mozilla/security/nss/lib/pki1/nsspki1.h index 9e552053f60..cf9b473b611 100644 --- a/mozilla/security/nss/lib/pki1/nsspki1.h +++ b/mozilla/security/nss/lib/pki1/nsspki1.h @@ -35,7 +35,7 @@ #define NSSPKI1_H #ifdef DEBUG -static const char NSSPKI1_CVS_ID[] = "@(#) $RCSfile: nsspki1.h,v $ $Revision: 1.1.192.2 $ $Date: 2002-08-28 16:20:29 $ $Name: not supported by cvs2svn $"; +static const char NSSPKI1_CVS_ID[] = "@(#) $RCSfile: nsspki1.h,v $ $Revision: 1.1.192.3 $ $Date: 2002-09-05 22:49:47 $ $Name: not supported by cvs2svn $"; #endif /* DEBUG */ /* @@ -115,8 +115,6 @@ NSSOID_CreateFromBER NSSBER *berOid ); -extern const NSSError NSS_ERROR_INVALID_BER; -extern const NSSError NSS_ERROR_NO_MEMORY; /* * NSSOID_CreateFromUTF8 @@ -141,8 +139,6 @@ NSSOID_CreateFromUTF8 NSSUTF8 *stringOid ); -extern const NSSError NSS_ERROR_INVALID_STRING; -extern const NSSError NSS_ERROR_NO_MEMORY; /* * NSSOID_GetDEREncoding @@ -170,8 +166,6 @@ NSSOID_GetDEREncoding NSSArena *arenaOpt ); -extern const NSSError NSS_ERROR_INVALID_NSSOID; -extern const NSSError NSS_ERROR_NO_MEMORY; /* * NSSOID_GetUTF8Encoding @@ -200,8 +194,6 @@ NSSOID_GetUTF8Encoding NSSArena *arenaOpt ); -extern const NSSError NSS_ERROR_INVALID_NSSOID; -extern const NSSError NSS_ERROR_NO_MEMORY; /* * NSSOID_GetAlgorithmAndParameters @@ -259,8 +251,6 @@ NSSATAV_CreateFromBER NSSBER *derATAV ); -extern const NSSError NSS_ERROR_INVALID_BER; -extern const NSSError NSS_ERROR_NO_MEMORY; /* * NSSATAV_CreateFromUTF8 @@ -289,9 +279,6 @@ NSSATAV_CreateFromUTF8 NSSUTF8 *stringATAV ); -extern const NSSError NSS_ERROR_UNKNOWN_ATTRIBUTE; -extern const NSSError NSS_ERROR_INVALID_STRING; -extern const NSSError NSS_ERROR_NO_MEMORY; /* * NSSATAV_Create @@ -324,10 +311,6 @@ NSSATAV_Create PRUint32 length ); -extern const NSSError NSS_ERROR_INVALID_ARENA; -extern const NSSError NSS_ERROR_INVALID_NSSOID; -extern const NSSError NSS_ERROR_INVALID_POINTER; -extern const NSSError NSS_ERROR_NO_MEMORY; /* * NSSATAV_Destroy @@ -353,7 +336,6 @@ NSSATAV_Destroy NSSATAV *atav ); -extern const NSSError NSS_ERROR_INVALID_ATAV; /* * NSSATAV_GetDEREncoding @@ -380,8 +362,6 @@ NSSATAV_GetDEREncoding NSSArena *arenaOpt ); -extern const NSSError NSS_ERROR_INVALID_ATAV; -extern const NSSError NSS_ERROR_NO_MEMORY; /* * NSSATAV_GetUTF8Encoding @@ -410,8 +390,6 @@ NSSATAV_GetUTF8Encoding NSSArena *arenaOpt ); -extern const NSSError NSS_ERROR_INVALID_ATAV; -extern const NSSError NSS_ERROR_NO_MEMORY; /* * NSSATAV_GetType @@ -434,7 +412,6 @@ NSSATAV_GetType NSSATAV *atav ); -extern const NSSError NSS_ERROR_INVALID_ATAV; /* * NSSATAV_GetValue @@ -461,8 +438,6 @@ NSSATAV_GetValue NSSArena *arenaOpt ); -extern const NSSError NSS_ERROR_INVALID_ATAV; -extern const NSSError NSS_ERROR_NO_MEMORY; /* * NSSATAV_Compare @@ -492,8 +467,6 @@ NSSATAV_Compare PRBool *equalp ); -extern const NSSError NSS_ERROR_INVALID_ATAV; -extern const NSSError NSS_ERROR_INVALID_ARGUMENT; /* * NSSATAV_Duplicate @@ -520,8 +493,6 @@ NSSATAV_Duplicate NSSArena *arenaOpt ); -extern const NSSError NSS_ERROR_INVALID_ATAV; -extern const NSSError NSS_ERROR_NO_MEMORY; /* * NSSRDN diff --git a/mozilla/security/nss/lib/pki1/oid.c b/mozilla/security/nss/lib/pki1/oid.c index 558643a4e00..6ee9a023c50 100644 --- a/mozilla/security/nss/lib/pki1/oid.c +++ b/mozilla/security/nss/lib/pki1/oid.c @@ -32,7 +32,7 @@ */ #ifdef DEBUG -static const char CVS_ID[] = "@(#) $RCSfile: oid.c,v $ $Revision: 1.4.44.2 $ $Date: 2002-08-28 16:20:30 $ $Name: not supported by cvs2svn $"; +static const char CVS_ID[] = "@(#) $RCSfile: oid.c,v $ $Revision: 1.4.44.3 $ $Date: 2002-09-05 22:49:48 $ $Name: not supported by cvs2svn $"; #endif /* DEBUG */ /* @@ -75,7 +75,6 @@ static const char CVS_ID[] = "@(#) $RCSfile: oid.c,v $ $Revision: 1.4.44.2 $ $Da * * In debug builds, the following non-public calls are also available: * - * nssOID_verifyPointer * nssOID_getExplanation * nssOID_getTaggedUTF8 */ @@ -266,18 +265,6 @@ NSSOID_GetDEREncoding { nss_ClearErrorStack(); -#ifdef DEBUG - if( PR_SUCCESS != nssOID_verifyPointer(oid) ) { - return (NSSDER *)NULL; - } - - if( (NSSArena *)NULL != arenaOpt ) { - if( PR_SUCCESS != nssArena_verifyPointer(arenaOpt) ) { - return (NSSDER *)NULL; - } - } -#endif /* DEBUG */ - return nssOID_GetDEREncoding(oid, rvOpt, arenaOpt); } @@ -310,18 +297,6 @@ NSSOID_GetUTF8Encoding { nss_ClearErrorStack(); -#ifdef DEBUG - if( PR_SUCCESS != nssOID_verifyPointer(oid) ) { - return (NSSUTF8 *)NULL; - } - - if( (NSSArena *)NULL != arenaOpt ) { - if( PR_SUCCESS != nssArena_verifyPointer(arenaOpt) ) { - return (NSSUTF8 *)NULL; - } - } -#endif /* DEBUG */ - return nssOID_GetUTF8Encoding(oid, arenaOpt); } @@ -403,67 +378,6 @@ oid_hash_compare return (PRIntn)nssItem_Equal(i1, i2, NULL); } -/* - * The pointer-tracking code - */ - -#ifdef DEBUG -extern const NSSError NSS_ERROR_INTERNAL_ERROR; - -static nssPointerTracker oid_pointer_tracker; - -static PRStatus -oid_add_pointer -( - const NSSOID *oid -) -{ - PRStatus rv; - - rv = nssPointerTracker_initialize(&oid_pointer_tracker); - if( PR_SUCCESS != rv ) { - return rv; - } - - rv = nssPointerTracker_add(&oid_pointer_tracker, oid); - if( PR_SUCCESS != rv ) { - NSSError e = NSS_GetError(); - if( NSS_ERROR_NO_MEMORY != e ) { - nss_SetError(NSS_ERROR_INTERNAL_ERROR); - } - - return rv; - } - - return PR_SUCCESS; -} - -#if defined(CAN_DELETE_OIDS) -/* - * We actually don't define NSSOID deletion, since we keep OIDs - * in a hash table for easy comparison. Were we to, this is - * what the pointer-removal function would look like. - */ - -static PRStatus -oid_remove_pointer -( - const NSSOID *oid -) -{ - PRStatus rv; - - rv = nssPointerTracker_remove(&oid_pointer_tracker, oid); - if( PR_SUCCESS != rv ) { - nss_SetError(NSS_ERROR_INTERNAL_ERROR); - } - - return rv; -} -#endif /* CAN_DELETE_OIDS */ - -#endif /* DEBUG */ - /* * All dynamically-added OIDs get their memory from one statically- * declared arena here, merely so that any cleanup code will have @@ -517,12 +431,6 @@ oid_once_func nss_SetError(NSS_ERROR_NO_MEMORY); goto loser; } - -#ifdef DEBUG - if( PR_SUCCESS != oid_add_pointer(oid) ) { - goto loser; - } -#endif /* DEBUG */ } return PR_SUCCESS; @@ -566,54 +474,6 @@ oid_init return PR_CallOnce(&oid_call_once, oid_once_func); } -#ifdef DEBUG - -/* - * nssOID_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSOID object, - * this routine will return PR_SUCCESS. Otherwise, it will put an - * error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_NSSOID - * NSS_ERROR_NO_MEMORY - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssOID_verifyPointer -( - const NSSOID *oid -) -{ - PRStatus rv; - - rv = oid_init(); - if( PR_SUCCESS != rv ) { - return PR_FAILURE; - } - - rv = nssPointerTracker_initialize(&oid_pointer_tracker); - if( PR_SUCCESS != rv ) { - return PR_FAILURE; - } - - rv = nssPointerTracker_verify(&oid_pointer_tracker, oid); - if( PR_SUCCESS != rv ) { - nss_SetError(NSS_ERROR_INVALID_NSSOID); - return PR_FAILURE; - } - - return PR_SUCCESS; -} -#endif /* DEBUG */ - /* * oid_sanity_check_ber * @@ -767,21 +627,6 @@ nssOID_CreateFromBER return (NSSOID *)NULL; } -#ifdef DEBUG - { - PRStatus st; - st = oid_add_pointer(rv); - if( PR_SUCCESS != st ) { - PZ_Lock(oid_hash_lock); - (void)PL_HashTableRemove(oid_hash_table, &rv->data); - (void)PZ_Unlock(oid_hash_lock); - (void)nss_ZFreeIf(rv->data.data); - (void)nss_ZFreeIf(rv); - return (NSSOID *)NULL; - } - } -#endif /* DEBUG */ - return rv; } @@ -1024,7 +869,6 @@ oid_encode_huge * one. It assumes we've already sanity-checked the string. */ -extern const NSSError NSS_ERROR_INTERNAL_ERROR; static NSSOID * oid_encode_string @@ -1236,19 +1080,6 @@ nssOID_CreateFromUTF8 goto loser; } -#ifdef DEBUG - { - PRStatus st; - st = oid_add_pointer(rv); - if( PR_SUCCESS != st ) { - PZ_Lock(oid_hash_lock); - (void)PL_HashTableRemove(oid_hash_table, &rv->data); - (void)PZ_Unlock(oid_hash_lock); - goto loser; - } - } -#endif /* DEBUG */ - return rv; loser: @@ -1298,18 +1129,6 @@ nssOID_GetDEREncoding return (NSSDER *)NULL; } -#ifdef NSSDEBUG - if( PR_SUCCESS != nssOID_verifyPointer(oid) ) { - return (NSSDER *)NULL; - } - - if( (NSSArena *)NULL != arenaOpt ) { - if( PR_SUCCESS != nssArena_verifyPointer(arenaOpt) ) { - return (NSSDER *)NULL; - } - } -#endif /* NSSDEBUG */ - it = &oid->data; if( (NSSDER *)NULL == rvOpt ) { @@ -1374,18 +1193,6 @@ nssOID_GetUTF8Encoding return (NSSUTF8 *)NULL; } -#ifdef NSSDEBUG - if( PR_SUCCESS != nssOID_verifyPointer(oid) ) { - return (NSSUTF8 *)NULL; - } - - if( (NSSArena *)NULL != arenaOpt ) { - if( PR_SUCCESS != nssArena_verifyPointer(arenaOpt) ) { - return (NSSUTF8 *)NULL; - } - } -#endif /* NSSDEBUG */ - a = (char *)NULL; /* d will point to the next sequence of bytes to decode */ @@ -1524,16 +1331,9 @@ nssOID_getExplanation return (const NSSUTF8 *)NULL; } -#ifdef NSSDEBUG - if( PR_SUCCESS != nssOID_verifyPointer(oid) ) { - return (NSSUTF8 *)NULL; - } -#endif /* NSSDEBUG */ - return oid->expl; } -extern const NSSError NSS_ERROR_INVALID_NSSOID; #endif /* DEBUG */ /* @@ -1582,18 +1382,6 @@ nssOID_getTaggedUTF8 return (NSSUTF8 *)NULL; } -#ifdef NSSDEBUG - if( PR_SUCCESS != nssOID_verifyPointer(oid) ) { - return (NSSUTF8 *)NULL; - } - - if( (NSSArena *)NULL != arenaOpt ) { - if( PR_SUCCESS != nssArena_verifyPointer(arenaOpt) ) { - return (NSSUTF8 *)NULL; - } - } -#endif /* NSSDEBUG */ - a = PR_smprintf("{"); if( (char *)NULL == a ) { nss_SetError(NSS_ERROR_NO_MEMORY); @@ -1681,6 +1469,4 @@ nssOID_getTaggedUTF8 return rv; } -extern const NSSError NSS_ERROR_INVALID_NSSOID; -extern const NSSError NSS_ERROR_NO_MEMORY; #endif /* DEBUG */ diff --git a/mozilla/security/nss/lib/pki1/pki1.h b/mozilla/security/nss/lib/pki1/pki1.h index 8d926503f7b..f1b6f103fa5 100644 --- a/mozilla/security/nss/lib/pki1/pki1.h +++ b/mozilla/security/nss/lib/pki1/pki1.h @@ -35,7 +35,7 @@ #define PKI1_H #ifdef DEBUG -static const char PKI1_CVS_ID[] = "@(#) $RCSfile: pki1.h,v $ $Revision: 1.2.50.1 $ $Date: 2002-08-26 16:21:26 $ $Name: not supported by cvs2svn $"; +static const char PKI1_CVS_ID[] = "@(#) $RCSfile: pki1.h,v $ $Revision: 1.2.50.2 $ $Date: 2002-09-05 22:49:50 $ $Name: not supported by cvs2svn $"; #endif /* DEBUG */ /* @@ -73,7 +73,6 @@ extern const PRUint32 nss_attribute_type_alias_count; * * In debug builds, the following non-public calls are also available: * - * nssOID_verifyPointer * nssOID_getExplanation * nssOID_getTaggedUTF8 */ @@ -106,8 +105,6 @@ nssOID_CreateFromBER NSSBER *berOid ); -extern const NSSError NSS_ERROR_INVALID_BER; -extern const NSSError NSS_ERROR_NO_MEMORY; /* * nssOID_CreateFromUTF8 @@ -133,8 +130,6 @@ nssOID_CreateFromUTF8 NSSUTF8 *stringOid ); -extern const NSSError NSS_ERROR_INVALID_UTF8; -extern const NSSError NSS_ERROR_NO_MEMORY; /* * nssOID_GetDEREncoding @@ -189,33 +184,6 @@ nssOID_GetUTF8Encoding NSSArena *arenaOpt ); -/* - * nssOID_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid poitner to an NSSOID object, - * this routine will return PR_SUCCESS. Otherwise, it will put an - * error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_NSSOID - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -#ifdef DEBUG -NSS_EXTERN PRStatus -nssOID_verifyPointer -( - const NSSOID *oid -); - -extern const NSSError NSS_ERROR_INVALID_NSSOID; -#endif /* DEBUG */ - /* * nssOID_getExplanation * @@ -247,7 +215,6 @@ nssOID_getExplanation NSSOID *oid ); -extern const NSSError NSS_ERROR_INVALID_NSSOID; #endif /* DEBUG */ /* @@ -284,8 +251,6 @@ nssOID_getTaggedUTF8 NSSArena *arenaOpt ); -extern const NSSError NSS_ERROR_INVALID_NSSOID; -extern const NSSError NSS_ERROR_NO_MEMORY; #endif /* DEBUG */ /* @@ -307,7 +272,6 @@ extern const NSSError NSS_ERROR_NO_MEMORY; * * In debug builds, the following non-public call is also available: * - * nssATAV_verifyPointer */ /* @@ -572,8 +536,6 @@ nssATAV_Duplicate ); /* - * nssATAV_verifyPointer - * * This method is only present in debug builds. * * If the specified pointer is a valid pointer to an NSSATAV object, @@ -589,14 +551,6 @@ nssATAV_Duplicate * PR_FAILURE if it isn't */ -#ifdef DEBUG -NSS_EXTERN PRStatus -nssATAV_verifyPointer -( - NSSATAV *atav -); -#endif /* DEBUG */ - /* * NSSRDN * diff --git a/mozilla/security/nss/lib/pkix/include/pkix.h b/mozilla/security/nss/lib/pkix/include/pkix.h index b2c9d7999d7..dabd5f2a975 100644 --- a/mozilla/security/nss/lib/pkix/include/pkix.h +++ b/mozilla/security/nss/lib/pkix/include/pkix.h @@ -35,7 +35,7 @@ #define PKIX_H #ifdef DEBUG -static const char PKIX_CVS_ID[] = "@(#) $Source: /home/befator/cvs/jail/cvsroot/mozilla/security/nss/lib/pkix/include/Attic/pkix.h,v $ $Revision: 1.1.192.2 $ $Date: 2002-08-28 16:50:09 $ $Name: not supported by cvs2svn $"; +static const char PKIX_CVS_ID[] = "@(#) $Source: /home/befator/cvs/jail/cvsroot/mozilla/security/nss/lib/pkix/include/Attic/pkix.h,v $ $Revision: 1.1.192.3 $ $Date: 2002-09-05 22:49:53 $ $Name: not supported by cvs2svn $"; #endif /* DEBUG */ /* @@ -102,8 +102,6 @@ extern const nssASN1Template nssPKIXExtensions_template[]; * nssPKIXAttribute_Duplicate * * In debug builds, the following call is available: - * - * nssPKIXAttribute_verifyPointer */ /* @@ -554,31 +552,6 @@ nssPKIXAttribute_Duplicate NSSArena *arenaOpt ); -#ifdef DEBUG -/* - * nssPKIXAttribute_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXAttribute - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_ATTRIBUTE - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXAttribute_verifyPointer -( - NSSPKIXAttribute *p -); -#endif /* DEBUG */ - /* * AttributeTypeAndValue * @@ -610,9 +583,6 @@ nssPKIXAttribute_verifyPointer * nssPKIXATAV_Equal * nssPKIXATAV_Duplicate * - * In debug builds, the following call is available: - * - * nssPKIXATAV_verifyPointer */ /* @@ -879,31 +849,6 @@ nssPKIXATAV_Duplicate NSSArena *arenaOpt ); -#ifdef DEBUG -/* - * nssPKIXATAV_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXATAV - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_ATTRIBUTE_TYPE_AND_VALUE - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXATAV_verifyPointer -( - NSSPKIXATAV *p -); -#endif /* DEBUG */ - /* * X520Name * @@ -932,9 +877,6 @@ nssPKIXATAV_verifyPointer * nssPKIXX520Name_Equal * nssPKIXX520Name_Duplicate * - * In debug builds, the following call is available: - * - * nssPKIXX520Name_verifyPointer */ /* @@ -1111,33 +1053,6 @@ nssPKIXX520Name_Duplicate NSSArena *arenaOpt ); -#ifdef DEBUG - -/* - * nssPKIXX520Name_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXX520Name - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_X520_NAME - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXX520Name_verifyPointer -( - NSSPKIXX520Name *p -); - -#endif /* DEBUG */ - /* * X520CommonName * @@ -1167,9 +1082,6 @@ nssPKIXX520Name_verifyPointer * nssPKIXX520CommonName_Equal * nssPKIXX520CommonName_Duplicate * - * In debug builds, the following call is available: - * - * nssPKIXX520CommonName_verifyPointer */ /* @@ -1346,33 +1258,6 @@ nssPKIXX520CommonName_Duplicate NSSArena *arenaOpt ); -#ifdef DEBUG - -/* - * nssPKIXX520CommonName_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXX520CommonName - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_X520_NAME - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXX520CommonName_verifyPointer -( - NSSPKIXX520CommonName *p -); - -#endif /* DEBUG */ - /* * X520LocalityName * @@ -2104,10 +1989,6 @@ nssPKIXPkcs9email_Encode * * (here is where I had specific attribute value gettors in pki1) * - * In debug builds, the following call is available: - * - * nssPKIXName_verifyPointer - * */ extern const nssASN1Template nssPKIXName_template[]; @@ -2406,10 +2287,6 @@ nssPKIXName_Duplicate * nssPKIXRDNSequence_Equal * nssPKIXRDNSequence_Duplicate * - * In debug builds, the following call is available: - * - * nssPKIXRDNSequence_verifyPointer - * */ extern const nssASN1Template nssPKIXRDNSequence_template[]; @@ -2899,10 +2776,6 @@ nssPKIXRDNSequence_Duplicate * contain multiple ATAVs with the same type. Verify in the RFC if * this is possible or not. If not, nuke those three functions. * - * In debug builds, the following call is available: - * - * nssPKIXRDN_verifyPointer - * */ extern const nssASN1Template nssPKIXRDN_template[]; @@ -3290,31 +3163,6 @@ nssPKIXRDN_Duplicate NSSArena *arenaOpt ); -#ifdef DEBUG -/* - * nssPKIXRDN_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXRDN - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_RELATIVE_DISTINGUISHED_NAME - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXRDN_verifyPointer -( - NSSPKIXRDN *p -); -#endif /* DEBUG */ - /* * DirectoryString * @@ -3433,10 +3281,6 @@ nssPKIXDirectoryString_Encode * * { inherit TBSCertificate gettors? } * - * In debug builds, the following call is available: - * - * nssPKIXCertificate_verifyPointer - * */ #endif @@ -3770,9 +3614,6 @@ extern const nssASN1Template nssPKIXTBSCertificate_template[]; * nssPKIXTBSCertificate_Equal * nssPKIXTBSCertificate_Duplicate * - * In debug builds, the following call is available: - * - * nssPKIXTBSCertificate_verifyPointer */ /* @@ -4504,31 +4345,6 @@ nssPKIXTBSCertificate_Duplicate NSSArena *arenaOpt ); -#ifdef DEBUG -/* - * nssPKIXTBSCertificate_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXTBSCertificate - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_TBS_CERTIFICATE - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXTBSCertificate_verifyPointer -( - NSSPKIXTBSCertificate *p -); -#endif /* DEBUG */ - /* * CertificateSerialNumber * @@ -5003,10 +4819,6 @@ nssPKIXTime_Compare * nssPKIXSubjectPublicKeyInfo_Equal * nssPKIXSubjectPublicKeyInfo_Duplicate * - * In debug builds, the following call is available: - * - * nssPKIXSubjectPublicKeyInfo_verifyPointer - * */ /* @@ -5227,31 +5039,6 @@ nssPKIXSubjectPublicKeyInfo_Duplicate NSSArena *arenaOpt ); -#ifdef DEBUG -/* - * nssPKIXSubjectPublicKeyInfo_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXSubjectPublicKeyInfo - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_SUBJECT_PUBLIC_KEY_INFO - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXSubjectPublicKeyInfo_verifyPointer -( - NSSPKIXSubjectPublicKeyInfo *p -); -#endif /* DEBUG */ - /* * Extensions * @@ -5308,10 +5095,6 @@ nssPKIXSubjectPublicKeyInfo_verifyPointer * nssPKIXCertificateList_Equal * nssPKIXCertificateList_Duplicate * - * In debug builds, the following call is available: - * - * nssPKIXCertificateList_verifyPointer - * */ /* @@ -5582,31 +5365,6 @@ nssPKIXCertificateList_Duplicate NSSArena *arenaOpt ); -#ifdef DEBUG -/* - * nssPKIXCertificateList_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXCertificateList - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_CERTIFICATE_LIST - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXCertificateList_verifyPointer -( - NSSPKIXCertificateList *p -); -#endif /* DEBUG */ - /* * TBSCertList * @@ -5657,10 +5415,6 @@ nssPKIXCertificateList_verifyPointer * nssPKIXTBSCertList_Equal * nssPKIXTBSCertList_Duplicate * - * In debug builds, the following call is available: - * - * nssPKIXTBSCertList_verifyPointer - * */ /* @@ -6187,31 +5941,6 @@ nssPKIXTBSCertList_Duplicate NSSArena *arenaOpt ); -#ifdef DEBUG -/* - * nssPKIXTBSCertList_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXTBSCertList - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_TBS_CERT_LIST - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXTBSCertList_verifyPointer -( - NSSPKIXTBSCertList *p -); -#endif /* DEBUG */ - /* * revokedCertificates * @@ -6241,10 +5970,6 @@ nssPKIXTBSCertList_verifyPointer * nssPKIXrevokedCertificates_Equal * nssPKIXrevokedCertificates_Duplicate * - * In debug builds, the following call is available: - * - * nssPKIXrevokedCertificates_verifyPointer - * */ /* @@ -6585,31 +6310,6 @@ nssPKIXrevokedCertificates_Duplicate NSSArena *arenaOpt ); -#ifdef DEBUG -/* - * nssPKIXrevokedCertificates_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXrevokedCertificates - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_REVOKED_CERTIFICATES - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXrevokedCertificates_verifyPointer -( - NSSPKIXrevokedCertificates *p -); -#endif /* DEBUG */ - /* * revokedCertificate * @@ -6639,10 +6339,6 @@ nssPKIXrevokedCertificates_verifyPointer * nssPKIXrevokedCertificate_Equal * nssPKIXrevokedCertificate_Duplicate * - * In debug builds, the following call is available: - * - * nssPKIXrevokedCertificate_verifyPointer - * */ @@ -6953,31 +6649,6 @@ nssPKIXrevokedCertificate_Duplicate NSSArena *arenaOpt ); -#ifdef DEBUG -/* - * nssPKIXrevokedCertificate_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXrevokedCertificate - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_REVOKED_CERTIFICATE - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXrevokedCertificate_verifyPointer -( - NSSPKIXrevokedCertificate *p -); -#endif /* DEBUG */ - /* * AlgorithmIdentifier * @@ -7008,10 +6679,6 @@ nssPKIXrevokedCertificate_verifyPointer * nssPKIXAlgorithmIdentifier_Duplicate * { algorithm-specific parameter types and accessors ? } * - * In debug builds, the following call is available: - * - * nssPKIXAlgorithmIdentifier_verifyPointer - * */ /* @@ -7237,31 +6904,6 @@ nssPKIXAlgorithmIdentifier_Duplicate * { algorithm-specific parameter types and accessors ? } */ -#ifdef DEBUG -/* - * nssPKIXAlgorithmIdentifier_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXAlgorithmIdentifier - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_ALGORITHM_IDENTIFIER - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXAlgorithmIdentifier_verifyPointer -( - NSSPKIXAlgorithmIdentifier *p -); -#endif /* DEBUG */ - /* * ORAddress * @@ -7299,10 +6941,6 @@ nssPKIXAlgorithmIdentifier_verifyPointer * nssPKIXORAddress_Equal * nssPKIXORAddress_Duplicate * - * In debug builds, the following call is available: - * - * nssPKIXORAddress_verifyPointer - * */ /* @@ -7657,31 +7295,6 @@ nssPKIXORAddress_Duplicate NSSArena *arenaOpt ); -#ifdef DEBUG -/* - * nssPKIXORAddress_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXORAddress - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_OR_ADDRESS - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXORAddress_verifyPointer -( - NSSPKIXORAddress *p -); -#endif /* DEBUG */ - /* * BuiltInStandardAttributes * @@ -7749,10 +7362,6 @@ nssPKIXORAddress_verifyPointer * nssPKIXBuiltInStandardAttributes_Equal * nssPKIXBuiltInStandardAttributes_Duplicate * - * In debug builds, the following call is available: - * - * nssPKIXBuiltInStandardAttributes_verifyPointer - * */ /* @@ -8667,31 +8276,6 @@ nssPKIXBuiltInStandardAttributes_Duplicate NSSArena *arenaOpt ); -#ifdef DEBUG -/* - * nssPKIXBuiltInStandardAttributes_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXBuiltInStandardAttributes - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_BUILT_IN_STANDARD_ATTRIBUTES - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXBuiltInStandardAttributes_verifyPointer -( - NSSPKIXBuiltInStandardAttributes *p -); -#endif /* DEBUG */ - /* * CountryName * @@ -9408,10 +8992,6 @@ nssPKIXNumericUserIdentifier_Encode * nssPKIXPersonalName_Equal * nssPKIXPersonalName_Duplicate * - * In debug builds, the following call is available: - * - * nssPKIXPersonalName_verifyPointer - * */ /* @@ -9836,31 +9416,6 @@ nssPKIXPersonalName_Duplicate NSSArena *arenaOpt ); -#ifdef DEBUG -/* - * nssPKIXPersonalName_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXPersonalName - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_PERSONAL_NAME - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXPersonalName_verifyPointer -( - NSSPKIXPersonalName *p -); -#endif /* DEBUG */ - /* * OrganizationalUnitNames * @@ -9889,10 +9444,6 @@ nssPKIXPersonalName_verifyPointer * nssPKIXOrganizationalUnitNames_Equal * nssPKIXOrganizationalUnitNames_Duplicate * - * In debug builds, the following call is available: - * - * nssPKIXOrganizationalUnitNames_verifyPointer - * */ /* @@ -10232,31 +9783,6 @@ nssPKIXOrganizationalUnitNames_Duplicate NSSArena *arenaOpt ); -#ifdef DEBUG -/* - * nssPKIXOrganizationalUnitNames_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXOrganizationalUnitNames - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_ORGANIZATIONAL_UNIT_NAMES - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXOrganizationalUnitNames_verifyPointer -( - NSSPKIXOrganizationalUnitNames *p -); -#endif /* DEBUG */ - /* * OrganizationalUnitName * @@ -10370,10 +9896,6 @@ nssPKIXOrganizationalUnitName_Encode * nssPKIXBuiltInDomainDefinedAttributes_Equal * nssPKIXBuiltInDomainDefinedAttributes_Duplicate * - * In debug builds, the following call is available: - * - * nssPKIXBuiltInDomainDefinedAttributes_verifyPointer - * */ /* @@ -10717,31 +10239,6 @@ nssPKIXBuiltInDomainDefinedAttributes_Duplicate NSSArena *arenaOpt ); -#ifdef DEBUG -/* - * nssPKIXBuiltInDomainDefinedAttributes_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXBuiltInDomainDefinedAttributes - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_BUILT_IN_DOMAIN_DEFINED_ATTRIBUTES - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXBuiltInDomainDefinedAttributes_verifyPointer -( - NSSPKIXBuiltInDomainDefinedAttributes *p -); -#endif /* DEBUG */ - /* * BuiltInDomainDefinedAttribute * @@ -10768,10 +10265,6 @@ nssPKIXBuiltInDomainDefinedAttributes_verifyPointer * nssPKIXBuiltInDomainDefinedAttribute_Equal * nssPKIXBuiltInDomainDefinedAttribute_Duplicate * - * In debug builds, the following call is available: - * - * nssPKIXBuiltInDomainDefinedAttribute_verifyPointer - * */ /* @@ -10995,31 +10488,6 @@ nssPKIXBuiltInDomainDefinedAttribute_Duplicate NSSArena *arenaOpt ); -#ifdef DEBUG -/* - * nssPKIXBuiltInDomainDefinedAttribute_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXBuiltInDomainDefinedAttribute - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_BUILT_IN_DOMAIN_DEFINED_ATTRIBUTE - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXBuiltInDomainDefinedAttribute_verifyPointer -( - NSSPKIXBuiltInDomainDefinedAttribute *p -); -#endif /* DEBUG */ - /* * ExtensionAttributes * @@ -11048,10 +10516,6 @@ nssPKIXBuiltInDomainDefinedAttribute_verifyPointer * nssPKIXExtensionAttributes_Equal * nssPKIXExtensionAttributes_Duplicate * - * In debug builds, the following call is available: - * - * nssPKIXExtensionAttributes_verifyPointer - * */ /* @@ -11393,31 +10857,6 @@ nssPKIXExtensionAttributes_Duplicate * return the value for a specific value, etc. */ -#ifdef DEBUG -/* - * nssPKIXExtensionAttributes_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXExtensionAttributes - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_EXTENSION_ATTRIBUTES - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXExtensionAttributes_verifyPointer -( - NSSPKIXExtensionAttributes *p -); -#endif /* DEBUG */ - /* * ExtensionAttribute * @@ -11443,10 +10882,6 @@ nssPKIXExtensionAttributes_verifyPointer * nssPKIXExtensionAttribute_Equal * nssPKIXExtensionAttribute_Duplicate * - * In debug builds, the following call is available: - * - * nssPKIXExtensionAttribute_verifyPointer - * */ /* @@ -11669,31 +11104,6 @@ nssPKIXExtensionAttribute_Duplicate NSSArena *arenaOpt ); -#ifdef DEBUG -/* - * nssPKIXExtensionAttribute_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXExtensionAttribute - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_EXTENSION_ATTRIBUTE - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXExtensionAttribute_verifyPointer -( - NSSPKIXExtensionAttribute *p -); -#endif /* DEBUG */ - /* * CommonName * @@ -11985,10 +11395,6 @@ nssPKIXTeletexOrganizationName_Encode * nssPKIXTeletexPersonalName_Equal * nssPKIXTeletexPersonalName_Duplicate * - * In debug builds, the following call is available: - * - * nssPKIXTeletexPersonalName_verifyPointer - * */ /* @@ -12411,31 +11817,6 @@ nssPKIXTeletexPersonalName_Duplicate NSSArena *arenaOpt ); -#ifdef DEBUG -/* - * nssPKIXTeletexPersonalName_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXTeletexPersonalName - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_TELETEX_PERSONAL_NAME - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXTeletexPersonalName_verifyPointer -( - NSSPKIXTeletexPersonalName *p -); -#endif /* DEBUG */ - /* * TeletexOrganizationalUnitNames * @@ -12464,10 +11845,6 @@ nssPKIXTeletexPersonalName_verifyPointer * nssPKIXTeletexOrganizationalUnitNames_Equal * nssPKIXTeletexOrganizationalUnitNames_Duplicate * - * In debug builds, the following call is available: - * - * nssPKIXTeletexOrganizationalUnitNames_verifyPointer - * */ /* @@ -12807,31 +12184,6 @@ nssPKIXTeletexOrganizationalUnitNames_Duplicate NSSArena *arenaOpt ); -#ifdef DEBUG -/* - * nssPKIXTeletexOrganizationalUnitNames_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXTeletexOrganizationalUnitNames - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_TELETEX_ORGANIZATIONAL_UNIT_NAME - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXTeletexOrganizationalUnitNames_verifyPointer -( - NSSPKIXTeletexOrganizationalUnitNames *p -); -#endif /* DEBUG */ - /* * TeletexOrganizationalUnitName * @@ -13205,10 +12557,6 @@ nssPKIXPostalCode_Encode * nssPKIXPDSParameter_RemoveTeletexString * nssPKIXPDSParameter_Equal * nssPKIXPDSParameter_Duplicate - * - * In debug builds, the following call is available: - * - * nssPKIXPDSParameter_verifyPointer */ /* @@ -13555,31 +12903,6 @@ nssPKIXPDSParameter_Duplicate NSSArena *arenaOpt ); -#ifdef DEBUG -/* - * nssPKIXPDSParameter_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXPDSParameter - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_PDS_PARAMETER - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXPDSParameter_verifyPointer -( - NSSPKIXPDSParameter *p -); -#endif /* DEBUG */ - /* * fgmr: what about these PDS types? * @@ -13655,10 +12978,6 @@ nssPKIXPDSParameter_verifyPointer * nssPKIXExtendedNetworkAddress_Equal * nssPKIXExtendedNetworkAddress_Duplicate * - * In debug builds, the following call is available: - * - * nssPKIXExtendedNetworkAddress_verifyPointer - * */ /* @@ -13996,31 +13315,6 @@ nssPKIXExtendedNetworkAddress_Duplicate NSSArena *arenaOpt ); -#ifdef DEBUG -/* - * nssPKIXExtendedNetworkAddress_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXExtendedNetworkAddress - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_EXTENDED_NETWORK_ADDRESS - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXExtendedNetworkAddress_verifyPointer -( - NSSPKIXExtendedNetworkAddress *p -); -#endif /* DEBUG */ - /* * e163-4-address * @@ -14048,11 +13342,6 @@ nssPKIXExtendedNetworkAddress_verifyPointer * nssPKIXe1634Address_RemoveSubAddress * nssPKIXe1634Address_Equal * nssPKIXe1634Address_Duplicate - * - * In debug builds, the following call is available: - * - * nssPKIXe1634Address_verifyPointer - * */ /* @@ -14315,31 +13604,6 @@ nssPKIXe1634Address_Duplicate NSSArena *arenaOpt ); -#ifdef DEBUG -/* - * nssPKIXe1634Address_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXe1634Address - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_E163_4_ADDRESS - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXe1634Address_verifyPointer -( - NSSPKIXe1634Address *p -); -#endif /* DEBUG */ - /* * PresentationAddress * @@ -14378,11 +13642,6 @@ nssPKIXe1634Address_verifyPointer *{NAddresses must be more complex than that} * nssPKIXPresentationAddress_Compare * nssPKIXPresentationAddress_Duplicate - * - * In debug builds, the following call is available: - * - * _verifyPointer - * */ /* @@ -14412,11 +13671,6 @@ nssPKIXe1634Address_verifyPointer * nssPKIXTeletexDomainDefinedAttributes_FindTeletexDomainDefinedAttribute * nssPKIXTeletexDomainDefinedAttributes_Equal * nssPKIXTeletexDomainDefinedAttributes_Duplicate - * - * In debug builds, the following call is available: - * - * nssPKIXTeletexDomainDefinedAttributes_verifyPointer - * */ /* @@ -14760,31 +14014,6 @@ nssPKIXTeletexDomainDefinedAttributes_Duplicate NSSArena *arenaOpt ); -#ifdef DEBUG -/* - * nssPKIXTeletexDomainDefinedAttributes_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXTeletexDomainDefinedAttributes - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_TELETEX_DOMAIN_DEFINED_ATTRIBUTES - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXTeletexDomainDefinedAttributes_verifyPointer -( - NSSPKIXTeletexDomainDefinedAttributes *p -); -#endif /* DEBUG */ - /* * TeletexDomainDefinedAttribute * @@ -14812,11 +14041,6 @@ nssPKIXTeletexDomainDefinedAttributes_verifyPointer * nssPKIXTeletexDomainDefinedAttribute_GetValue * nssPKIXTeletexDomainDefinedAttribute_Equal * nssPKIXTeletexDomainDefinedAttribute_Duplicate - * - * In debug builds, the following call is available: - * - * nssPKIXTeletexDomainDefinedAttribute_verifyPointer - * */ /* @@ -15087,31 +14311,6 @@ nssPKIXTeletexDomainDefinedAttribute_Duplicate NSSArena *arenaOpt ); -#ifdef DEBUG -/* - * nssPKIXTeletexDomainDefinedAttribute_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXTeletexDomainDefinedAttribute - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_TELETEX_DOMAIN_DEFINED_ATTRIBUTE - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXTeletexDomainDefinedAttribute_verifyPointer -( - NSSPKIXTeletexDomainDefinedAttribute *p -); -#endif /* DEBUG */ - /* * AuthorityKeyIdentifier * @@ -15143,11 +14342,6 @@ nssPKIXTeletexDomainDefinedAttribute_verifyPointer * nssPKIXAuthorityKeyIdentifier_SetAuthorityCertIssuerAndSerialNumber * nssPKIXAuthorityKeyIdentifier_Equal * nssPKIXAuthorityKeyIdentifier_Duplicate - * - * In debug builds, the following call is available: - * - * nssPKIXAuthorityKeyIdentifier_verifyPointer - * */ /* @@ -15484,31 +14678,6 @@ nssPKIXAuthorityKeyIdentifier_Duplicate NSSArena *arenaOpt ); -#ifdef DEBUG -/* - * nssPKIXAuthorityKeyIdentifier_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXAuthorityKeyIdentifier - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_AUTHORITY_KEY_IDENTIFIER - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXAuthorityKeyIdentifier_verifyPointer -( - NSSPKIXAuthorityKeyIdentifier *p -); -#endif /* DEBUG */ - #endif /* nodef */ /* @@ -15542,11 +14711,6 @@ nssPKIXAuthorityKeyIdentifier_verifyPointer * { bitwise accessors? } * nssPKIXKeyUsage_Equal * nssPKIXKeyUsage_Duplicate - * - * In debug builds, the following call is available: - * - * nssPKIXKeyUsage_verifyPointer - * */ /* @@ -15794,11 +14958,6 @@ nssPKIXKeyUsage_Duplicate * nssPKIXPrivateKeyUsagePeriod_RemoveNotAfter * nssPKIXPrivateKeyUsagePeriod_Equal * nssPKIXPrivateKeyUsagePeriod_Duplicate - * - * In debug builds, the following call is available: - * - * nssPKIXPrivateKeyUsagePeriod_verifyPointer - * */ /* @@ -16107,31 +15266,6 @@ nssPKIXPrivateKeyUsagePeriod_Duplicate NSSArena *arenaOpt ); -#ifdef DEBUG -/* - * nssPKIXPrivateKeyUsagePeriod_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXPrivateKeyUsagePeriod - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_PRIVATE_KEY_USAGE_PERIOD - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXPrivateKeyUsagePeriod_verifyPointer -( - NSSPKIXPrivateKeyUsagePeriod *p -); -#endif /* DEBUG */ - /* * CertificatePolicies * @@ -16158,11 +15292,6 @@ nssPKIXPrivateKeyUsagePeriod_verifyPointer * nssPKIXCertificatePolicies_FindPolicyInformation * nssPKIXCertificatePolicies_Equal * nssPKIXCertificatePolicies_Duplicate - * - * In debug builds, the following call is available: - * - * nssPKIXCertificatePolicies_verifyPointer - * */ /* @@ -16502,31 +15631,6 @@ nssPKIXCertificatePolicies_Duplicate NSSArena *arenaOpt ); -#ifdef DEBUG -/* - * nssPKIXCertificatePolicies_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXCertificatePolicies - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_CERTIFICATE_POLICIES - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXCertificatePolicies_verifyPointer -( - NSSPKIXCertificatePolicies *p -); -#endif /* DEBUG */ - /* * PolicyInformation * @@ -16558,11 +15662,6 @@ nssPKIXCertificatePolicies_verifyPointer * nssPKIXPolicyInformation_Equal * nssPKIXPolicyInformation_Duplicate * { and accessors by specific policy qualifier ID } - * - * In debug builds, the following call is available: - * - * nssPKIXPolicyInformation_verifyPointer - * */ /* @@ -16930,31 +16029,6 @@ nssPKIXPolicyInformation_Duplicate * */ -#ifdef DEBUG -/* - * nssPKIXPolicyInformation_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXPolicyInformation - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_POLICY_INFORMATION - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXPolicyInformation_verifyPointer -( - NSSPKIXPolicyInformation *p -); -#endif /* DEBUG */ - /* * PolicyQualifierInfo * @@ -16979,11 +16053,6 @@ nssPKIXPolicyInformation_verifyPointer * nssPKIXPolicyQualifierInfo_Equal * nssPKIXPolicyQualifierInfo_Duplicate * { and accessors by specific qualifier id/type } - * - * In debug builds, the following call is available: - * - * nssPKIXPolicyQualifierInfo_verifyPointer - * */ /* @@ -17211,30 +16280,6 @@ nssPKIXPolicyQualifierInfo_Duplicate * { and accessors by specific qualifier id/type } * */ -#ifdef DEBUG -/* - * nssPKIXPolicyQualifierInfo_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXPolicyQualifierInfo - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_POLICY_QUALIFIER_INFO - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXPolicyQualifierInfo_verifyPointer -( - NSSPKIXPolicyQualifierInfo *p -); -#endif /* DEBUG */ /* * CPSuri @@ -17347,11 +16392,6 @@ nssPKIXCPSuri_Encode * nssPKIXUserNotice_RemoveExplicitText * nssPKIXUserNotice_Equal * nssPKIXUserNotice_Duplicate - * - * In debug builds, the following call is available: - * - * nssPKIXUserNotice_verifyPointer - * */ @@ -17660,31 +16700,6 @@ nssPKIXUserNotice_Duplicate NSSArena *arenaOpt ); -#ifdef DEBUG -/* - * nssPKIXUserNotice_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXUserNotice - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_USER_NOTICE - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXUserNotice_verifyPointer -( - NSSPKIXUserNotice *p -); -#endif /* DEBUG */ - /* * NoticeReference * @@ -17715,11 +16730,6 @@ nssPKIXUserNotice_verifyPointer * { maybe number-exists-p gettor? } * nssPKIXNoticeReference_Equal * nssPKIXNoticeReference_Duplicate - * - * In debug builds, the following call is available: - * - * nssPKIXNoticeReference_verifyPointer - * */ /* @@ -18089,31 +17099,6 @@ nssPKIXNoticeReference_Duplicate NSSArena *arenaOpt ); -#ifdef DEBUG -/* - * nssPKIXNoticeReference_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXNoticeReference - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_NOTICE_REFERENCE - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXNoticeReference_verifyPointer -( - NSSPKIXNoticeReference *p -); -#endif /* DEBUG */ - /* * DisplayText * @@ -18236,11 +17221,6 @@ nssPKIXDisplayText_Encode * nssPKIXPolicyMappings_MapIssuerToSubject * nssPKIXPolicyMappings_MapSubjectToIssuer * { find's and map's: what if there's more than one? } - * - * In debug builds, the following call is available: - * - * nssPKIXPolicyMappings_verifyPointer - * */ /* @@ -18583,31 +17563,6 @@ nssPKIXPolicyMappings_Duplicate NSSArena *arenaOpt ); -#ifdef DEBUG -/* - * nssPKIXPolicyMappings_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXPolicyMappings - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_POLICY_MAPPINGS - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXPolicyMappings_verifyPointer -( - NSSPKIXPolicyMappings *p -); -#endif /* DEBUG */ - /* * nssPKIXPolicyMappings_IssuerDomainPolicyExists * @@ -18765,11 +17720,6 @@ nssPKIXPolicyMappings_MapSubjectToIssuer * nssPKIXpolicyMapping_SetSubjectDomainPolicy * nssPKIXpolicyMapping_Equal * nssPKIXpolicyMapping_Duplicate - * - * In debug builds, the following call is available: - * - * nssPKIXpolicyMapping_verifyPointer - * */ /* @@ -18989,31 +17939,6 @@ nssPKIXpolicyMapping_Duplicate NSSArena *arenaOpt ); -#ifdef DEBUG -/* - * nssPKIXpolicyMapping_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXpolicyMapping - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_POLICY_MAPPING - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXpolicyMapping_verifyPointer -( - NSSPKIXpolicyMapping *p -); -#endif /* DEBUG */ - /* * GeneralName * @@ -19064,11 +17989,6 @@ nssPKIXpolicyMapping_verifyPointer * nssPKIXGeneralName_Equal * nssPKIXGeneralName_Duplicate * (in pki1 I had specific attribute value gettors here too) - * - * In debug builds, the following call is available: - * - * nssPKIXGeneralName_verifyPointer - * */ /* @@ -19705,31 +18625,6 @@ nssPKIXGeneralName_Duplicate * */ -#ifdef DEBUG -/* - * nssPKIXGeneralName_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXGeneralName - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_GENERAL_NAME - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXGeneralName_verifyPointer -( - NSSPKIXGeneralName *p -); -#endif /* DEBUG */ - /* * GeneralNames * @@ -19756,11 +18651,6 @@ nssPKIXGeneralName_verifyPointer * nssPKIXGeneralNames_FindGeneralName * nssPKIXGeneralNames_Equal * nssPKIXGeneralNames_Duplicate - * - * In debug builds, the following call is available: - * - * nssPKIXGeneralNames_verifyPointer - * */ /* @@ -20102,31 +18992,6 @@ nssPKIXGeneralNames_Duplicate NSSArena *arenaOpt ); -#ifdef DEBUG -/* - * nssPKIXGeneralNames_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXGeneralNames - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_GENERAL_NAMES - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXGeneralNames_verifyPointer -( - NSSPKIXGeneralNames *p -); -#endif /* DEBUG */ - /* * AnotherName * @@ -20150,11 +19015,6 @@ nssPKIXGeneralNames_verifyPointer * nssPKIXAnotherName_SetValue * nssPKIXAnotherName_Equal * nssPKIXAnotherName_Duplicate - * - * In debug builds, the following call is available: - * - * nssPKIXAnotherName_verifyPointer - * */ /* @@ -20377,31 +19237,6 @@ nssPKIXAnotherName_Duplicate NSSArena *arenaOpt ); -#ifdef DEBUG -/* - * nssPKIXAnotherName_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXAnotherName - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_ANOTHER_NAME - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXAnotherName_verifyPointer -( - NSSPKIXAnotherName *p -); -#endif /* DEBUG */ - /* * EDIPartyName * @@ -20428,11 +19263,6 @@ nssPKIXAnotherName_verifyPointer * nssPKIXEDIPartyName_SetPartyName * nssPKIXEDIPartyName_Equal * nssPKIXEDIPartyName_Duplicate - * - * In debug builds, the following call is available: - * - * nssPKIXEDIPartyName_verifyPointer - * */ /* @@ -20696,31 +19526,6 @@ nssPKIXEDIPartyName_Duplicate NSSArena *arenaOpt ); -#ifdef DEBUG -/* - * nssPKIXEDIPartyName_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXEDIPartyName - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_EDI_PARTY_NAME - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXEDIPartyName_verifyPointer -( - NSSPKIXEDIPartyName *p -); -#endif /* DEBUG */ - /* * SubjectDirectoryAttributes * @@ -20747,11 +19552,6 @@ nssPKIXEDIPartyName_verifyPointer * nssPKIXSubjectDirectoryAttributes_FindAttribute * nssPKIXSubjectDirectoryAttributes_Equal * nssPKIXSubjectDirectoryAttributes_Duplicate - * - * In debug builds, the following call is available: - * - * nssPKIXSubjectDirectoryAttributes_verifyPointer - * */ /* @@ -21095,31 +19895,6 @@ nssPKIXSubjectDirectoryAttributes_Duplicate NSSArena *arenaOpt ); -#ifdef DEBUG -/* - * nssPKIXSubjectDirectoryAttributes_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXSubjectDirectoryAttributes - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_SUBJECT_DIRECTORY_ATTRIBUTES - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXSubjectDirectoryAttributes_verifyPointer -( - NSSPKIXSubjectDirectoryAttributes *p -); -#endif /* DEBUG */ - #endif /* nodef */ /* @@ -21459,11 +20234,6 @@ nssPKIXBasicConstraints_CompareToPathLenConstraint * nssPKIXNameConstraints_Equal * nssPKIXNameConstraints_Duplicate * { and the comparator functions } - * - * In debug builds, the following call is available: - * - * nssPKIXNameConstraints_verifyPointer - * */ /* @@ -21775,31 +20545,6 @@ nssPKIXNameConstraints_Duplicate * */ -#ifdef DEBUG -/* - * nssPKIXNameConstraints_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXNameConstraints - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_NAME_CONSTRAINTS - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXNameConstraints_verifyPointer -( - NSSPKIXNameConstraints *p -); -#endif /* DEBUG */ - /* * GeneralSubtrees * @@ -21827,11 +20572,6 @@ nssPKIXNameConstraints_verifyPointer * nssPKIXGeneralSubtrees_Equal * nssPKIXGeneralSubtrees_Duplicate * { and finders and comparators } - * - * In debug builds, the following call is available: - * - * nssPKIXGeneralSubtrees_verifyPointer - * */ /* @@ -22178,31 +20918,6 @@ nssPKIXGeneralSubtrees_Duplicate * */ -#ifdef DEBUG -/* - * nssPKIXGeneralSubtrees_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXGeneralSubtrees - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_GENERAL_SUBTREES - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXGeneralSubtrees_verifyPointer -( - NSSPKIXGeneralSubtrees *p -); -#endif /* DEBUG */ - /* * GeneralSubtree * @@ -22233,11 +20948,6 @@ nssPKIXGeneralSubtrees_verifyPointer * nssPKIXGeneralSubtree_Duplicate * nssPKIXGeneralSubtree_DistanceInRange * {other tests and comparators} - * - * In debug builds, the following call is available: - * - * nssPKIXGeneralSubtree_verifyPointer - * */ /* @@ -22539,31 +21249,6 @@ nssPKIXGeneralSubtree_Duplicate NSSArena *arenaOpt ); -#ifdef DEBUG -/* - * nssPKIXGeneralSubtree_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXGeneralSubtree - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_GENERAL_SUBTREE - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXGeneralSubtree_verifyPointer -( - NSSPKIXGeneralSubtree *p -); -#endif /* DEBUG */ - /* * nssPKIXGeneralSubtree_DistanceInRange * @@ -22620,10 +21305,6 @@ nssPKIXGeneralSubtree_DistanceInRange * nssPKIXPolicyConstraints_RemoveInhibitPolicyMapping * nssPKIXPolicyConstraints_Equal * nssPKIXPolicyConstraints_Duplicate - * - * In debug builds, the following call is available: - * - * nssPKIXPolicyConstraints_verifyPointer * */ @@ -22922,31 +21603,6 @@ nssPKIXPolicyConstraints_Duplicate NSSArena *arenaOpt ); -#ifdef DEBUG -/* - * nssPKIXPolicyConstraints_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXPolicyConstraints - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_POLICY_CONSTRAINTS - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXPolicyConstraints_verifyPointer -( - NSSPKIXPolicyConstraints *p -); -#endif /* DEBUG */ - /* * CRLDistPointsSyntax * @@ -22973,10 +21629,6 @@ nssPKIXPolicyConstraints_verifyPointer * nssPKIXCRLDistPointsSyntax_FindDistributionPoint * nssPKIXCRLDistPointsSyntax_Equal * nssPKIXCRLDistPointsSyntax_Duplicate - * - * In debug builds, the following call is available: - * - * nssPKIXCRLDistPointsSyntax_verifyPointer * */ @@ -23318,31 +21970,6 @@ nssPKIXCRLDistPointsSyntax_Duplicate NSSArena *arenaOpt ); -#ifdef DEBUG -/* - * nssPKIXCRLDistPointsSyntax_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXCRLDistPointsSyntax - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_CRL_DIST_POINTS_SYNTAX - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXCRLDistPointsSyntax_verifyPointer -( - NSSPKIXCRLDistPointsSyntax *p -); -#endif /* DEBUG */ - /* * DistributionPoint * @@ -23375,10 +22002,6 @@ nssPKIXCRLDistPointsSyntax_verifyPointer * nssPKIXDistributionPoint_RemoveCRLIssuer * nssPKIXDistributionPoint_Equal * nssPKIXDistributionPoint_Duplicate - * - * In debug builds, the following call is available: - * - * nssPKIXDistributionPoint_verifyPointer * */ @@ -23770,31 +22393,6 @@ nssPKIXDistributionPoint_Duplicate NSSArena *arenaOpt ); -#ifdef DEBUG -/* - * nssPKIXDistributionPoint_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXDistributionPoint - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_DISTRIBUTION_POINT - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXDistributionPoint_verifyPointer -( - NSSPKIXDistributionPoint *p -); -#endif /* DEBUG */ - /* * DistributionPointName * @@ -23819,10 +22417,6 @@ nssPKIXDistributionPoint_verifyPointer * nssPKIXDistributionPointName_GetNameRelativeToCRLIssuer * nssPKIXDistributionPointName_Equal * nssPKIXDistributionPointName_Duplicate - * - * In debug builds, the following call is available: - * - * nssPKIXDistributionPointName_verifyPointer * */ @@ -24070,31 +22664,6 @@ nssPKIXDistributionPointName_Duplicate NSSArena *arenaOpt ); -#ifdef DEBUG -/* - * nssPKIXDistributionPointName_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXDistributionPointName - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_DISTRIBUTION_POINT_NAME - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXDistributionPointName_verifyPointer -( - NSSPKIXDistributionPointName *p -); -#endif /* DEBUG */ - /* * ReasonFlags * @@ -24124,10 +22693,6 @@ nssPKIXDistributionPointName_verifyPointer * nssPKIXReasonFlags_Duplicate * { bitwise accessors? } * - * In debug builds, the following call is available: - * - * nssPKIXReasonFlags_verifyPointer - * */ /* @@ -24332,31 +22897,6 @@ nssPKIXReasonFlags_Duplicate * */ -#ifdef DEBUG -/* - * nssPKIXReasonFlags_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXReasonFlags - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_REASON_FLAGS - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXReasonFlags_verifyPointer -( - NSSPKIXReasonFlags *p -); -#endif /* DEBUG */ - /* * ExtKeyUsageSyntax * @@ -24383,10 +22923,6 @@ nssPKIXReasonFlags_verifyPointer * nssPKIXExtKeyUsageSyntax_FindKeyPurposeId * nssPKIXExtKeyUsageSyntax_Equal * nssPKIXExtKeyUsageSyntax_Duplicate - * - * In debug builds, the following call is available: - * - * nssPKIXExtKeyUsageSyntax_verifyPointer * */ @@ -24729,31 +23265,6 @@ nssPKIXExtKeyUsageSyntax_Duplicate NSSArena *arenaOpt ); -#ifdef DEBUG -/* - * nssPKIXExtKeyUsageSyntax_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXExtKeyUsageSyntax - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_EXT_KEY_USAGE_SYNTAX - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXExtKeyUsageSyntax_verifyPointer -( - NSSPKIXExtKeyUsageSyntax *p -); -#endif /* DEBUG */ - /* * AuthorityInfoAccessSyntax * @@ -24781,10 +23292,6 @@ nssPKIXExtKeyUsageSyntax_verifyPointer * nssPKIXAuthorityInfoAccessSyntax_FindAccessDescription * nssPKIXAuthorityInfoAccessSyntax_Equal * nssPKIXAuthorityInfoAccessSyntax_Duplicate - * - * In debug builds, the following call is available: - * - * nssPKIXAuthorityInfoAccessSyntax_verifyPointer * */ @@ -25130,31 +23637,6 @@ nssPKIXAuthorityInfoAccessSyntax_Duplicate NSSArena *arenaOpt ); -#ifdef DEBUG -/* - * nssPKIXAuthorityInfoAccessSyntax_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXAuthorityInfoAccessSyntax - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_AUTHORITY_INFO_ACCESS_SYNTAX - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXAuthorityInfoAccessSyntax_verifyPointer -( - NSSPKIXAuthorityInfoAccessSyntax *p -); -#endif /* DEBUG */ - /* * AccessDescription * @@ -25178,10 +23660,6 @@ nssPKIXAuthorityInfoAccessSyntax_verifyPointer * nssPKIXAccessDescription_SetAccessLocation * nssPKIXAccessDescription_Equal * nssPKIXAccessDescription_Duplicate - * - * In debug builds, the following call is available: - * - * nssPKIXAccessDescription_verifyPointer * */ @@ -25404,31 +23882,6 @@ nssPKIXAccessDescription_Duplicate NSSArena *arenaOpt ); -#ifdef DEBUG -/* - * nssPKIXAccessDescription_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXAccessDescription - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_ACCESS_DESCRIPTION - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXAccessDescription_verifyPointer -( - NSSPKIXAccessDescription *p -); -#endif /* DEBUG */ - /* * IssuingDistributionPoint * @@ -25465,10 +23918,6 @@ nssPKIXAccessDescription_verifyPointer * nssPKIXIssuingDistributionPoint_SetIndirectCRL * nssPKIXIssuingDistributionPoint_Equal * nssPKIXIssuingDistributionPoint_Duplicate - * - * In debug builds, the following call is available: - * - * nssPKIXIssuingDistributionPoint_verifyPointer * */ @@ -25901,31 +24350,6 @@ nssPKIXIssuingDistributionPoint_Duplicate NSSArena *arenaOpt ); -#ifdef DEBUG -/* - * nssPKIXIssuingDistributionPoint_verifyPointer - * - * This method is only present in debug builds. - * - * If the specified pointer is a valid pointer to an NSSPKIXIssuingDistributionPoint - * object, this routine will return PR_SUCCESS. Otherwise, it will - * put an error on the error stack and return PR_FAILURE. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_ISSUING_DISTRIBUTION_POINT - * - * Return value: - * PR_SUCCESS if the pointer is valid - * PR_FAILURE if it isn't - */ - -NSS_EXTERN PRStatus -nssPKIXIssuingDistributionPoint_verifyPointer -( - NSSPKIXIssuingDistributionPoint *p -); -#endif /* DEBUG */ - #endif /* nodef */ /* XXX extension - move later */