diff options
author | Sachin Kumar Gupta <s.k.gupta@samsung.com> | 2014-08-13 15:39:08 -0700 |
---|---|---|
committer | Sachin Kumar Gupta <s.k.gupta@samsung.com> | 2014-08-13 15:39:08 -0700 |
commit | 9075ef984a0593f07af33109f064e81915d69b4c (patch) | |
tree | 31732bf4346bdffa45a770616da108f2c0b7e1d7 /lib/certhigh/certvfypkix.c | |
parent | 408c5e83a544b9f9461f64e8178d955f7ec9e251 (diff) | |
download | nss-hg-9075ef984a0593f07af33109f064e81915d69b4c.tar.gz |
Bug 1050107: Remove lib/certhigh/certvfypkixprint.c from NSS
compilation, to remove dead code. r=ryan.sleevi,wtc.
Diffstat (limited to 'lib/certhigh/certvfypkix.c')
-rw-r--r-- | lib/certhigh/certvfypkix.c | 70 |
1 files changed, 2 insertions, 68 deletions
diff --git a/lib/certhigh/certvfypkix.c b/lib/certhigh/certvfypkix.c index 4a6859c95..dcb2dbf2c 100644 --- a/lib/certhigh/certvfypkix.c +++ b/lib/certhigh/certvfypkix.c @@ -27,20 +27,6 @@ extern PRLogModuleInfo *pkixLog; -#ifdef DEBUG_volkov -/* Temporary declarations of functioins. Will be removed with fix for - * 391183 */ -extern char * -pkix_Error2ASCII(PKIX_Error *error, void *plContext); - -extern void -cert_PrintCert(PKIX_PL_Cert *pkixCert, void *plContext); - -extern PKIX_Error * -cert_PrintCertChain(PKIX_List *pkixCertChain, void *plContext); - -#endif /* DEBUG */ - #ifdef PKIX_OBJECT_LEAK_TEST extern PKIX_UInt32 @@ -898,11 +884,6 @@ cert_GetLogFromVerifyNode( if (children == NULL) { PKIX_ERRORCODE errCode = PKIX_ANCHORDIDNOTCHAINTOCERT; if (node->error && node->error->errCode != errCode) { -#ifdef DEBUG_volkov - char *string = pkix_Error2ASCII(node->error, plContext); - fprintf(stderr, "Branch search finished with error: \t%s\n", string); - PKIX_PL_Free(string, NULL); -#endif if (log != NULL) { SECErrorCodes nssErrorCode = 0; CERTCertificate *cert = NULL; @@ -1003,9 +984,6 @@ cert_GetBuildResults( PKIX_TrustAnchor *trustAnchor = NULL; PKIX_PL_Cert *trustedCert = NULL; PKIX_List *pkixCertChain = NULL; -#ifdef DEBUG_volkov - PKIX_Error *tmpPkixError = NULL; -#endif /* DEBUG */ PKIX_ENTER(CERTVFYPKIX, "cert_GetBuildResults"); if (buildResult == NULL && error == NULL) { @@ -1014,11 +992,6 @@ cert_GetBuildResults( if (error) { SECErrorCodes nssErrorCode = 0; -#ifdef DEBUG_volkov - char *temp = pkix_Error2ASCII(error, plContext); - fprintf(stderr, "BUILD ERROR:\n%s\n", temp); - PKIX_PL_Free(temp, NULL); -#endif /* DEBUG */ if (verifyNode) { PKIX_Error *tmpError = cert_GetLogFromVerifyNode(log, verifyNode, plContext); @@ -1037,13 +1010,6 @@ cert_GetBuildResults( plContext), PKIX_BUILDRESULTGETCERTCHAINFAILED); -#ifdef DEBUG_volkov - tmpPkixError = cert_PrintCertChain(pkixCertChain, plContext); - if (tmpPkixError) { - PKIX_PL_Object_DecRef((PKIX_PL_Object*)tmpPkixError, plContext); - } -#endif - PKIX_CHECK( cert_PkixToNssCertsChain(pkixCertChain, &validChain, plContext), PKIX_CERTCHAINTONSSCHAINFAILED); @@ -1065,13 +1031,7 @@ cert_GetBuildResults( plContext), PKIX_TRUSTANCHORGETTRUSTEDCERTFAILED); -#ifdef DEBUG_volkov - if (pvalidChain == NULL) { - cert_PrintCert(trustedCert, plContext); - } -#endif - - PKIX_CHECK( + PKIX_CHECK( PKIX_PL_Cert_GetCERTCertificate(trustedCert, &trustedRoot, plContext), PKIX_CERTGETCERTCERTIFICATEFAILED); @@ -1158,10 +1118,6 @@ cert_VerifyCertChainPkix( SECStatus rv = SECFailure; void *plContext = NULL; -#ifdef DEBUG_volkov - CERTCertificate *trustedRoot = NULL; - CERTCertList *validChain = NULL; -#endif /* DEBUG */ #ifdef PKIX_OBJECT_LEAK_TEST int leakedObjNum = 0; @@ -1196,10 +1152,6 @@ do { result = NULL; verifyNode = NULL; error = NULL; -#ifdef DEBUG_volkov - trustedRoot = NULL; - validChain = NULL; -#endif /* DEBUG */ errorGenerated = PKIX_FALSE; stackPosition = 0; @@ -1242,29 +1194,11 @@ do { rv = SECSuccess; cleanup: - error = cert_GetBuildResults(result, verifyNode, error, log, -#ifdef DEBUG_volkov - &trustedRoot, &validChain, -#else - NULL, NULL, -#endif /* DEBUG */ + error = cert_GetBuildResults(result, verifyNode, error, log, NULL, NULL, plContext); if (error) { -#ifdef DEBUG_volkov - char *temp = pkix_Error2ASCII(error, plContext); - fprintf(stderr, "GET BUILD RES ERRORS:\n%s\n", temp); - PKIX_PL_Free(temp, NULL); -#endif /* DEBUG */ PKIX_PL_Object_DecRef((PKIX_PL_Object *)error, plContext); } -#ifdef DEBUG_volkov - if (trustedRoot) { - CERT_DestroyCertificate(trustedRoot); - } - if (validChain) { - CERT_DestroyCertList(validChain); - } -#endif /* DEBUG */ if (procParams) { PKIX_PL_Object_DecRef((PKIX_PL_Object *)procParams, plContext); } |