Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(914)

Unified Diff: nss/lib/certhigh/certvfypkix.c

Issue 1017413002: Uprev NSS to 3.18 RTM (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/nss.git@nspr_uprev
Patch Set: Rebased Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « nss/lib/certdb/xconst.c ('k') | nss/lib/certhigh/certvfypkixprint.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: nss/lib/certhigh/certvfypkix.c
diff --git a/nss/lib/certhigh/certvfypkix.c b/nss/lib/certhigh/certvfypkix.c
index 4a6859c95cad0b3bc6ae53d96941252741fa11e7..dcb2dbf2cc56e5ffe95725ec98d5630ceab897af 100644
--- a/nss/lib/certhigh/certvfypkix.c
+++ b/nss/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);
}
« no previous file with comments | « nss/lib/certdb/xconst.c ('k') | nss/lib/certhigh/certvfypkixprint.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698