diff -Nurd nss-3.74.orig/nss/lib/pkcs12/p12d.c nss-3.74/nss/lib/pkcs12/p12d.c --- nss-3.74.orig/nss/lib/pkcs12/p12d.c 2022-01-06 06:38:58.000000000 -0500 +++ nss-3.74/nss/lib/pkcs12/p12d.c 2024-01-01 03:14:36.000000000 -0500 @@ -2770,7 +2770,7 @@ SEC_PKCS12NicknameCollisionCallback nicknameCb) { SECStatus rv; - int i, noInstallCnt, probCnt, bagCnt, errorVal = 0; + int i, probCnt, errorVal = 0; if (!p12dcx || p12dcx->error || !p12dcx->safeBags) { PORT_SetError(SEC_ERROR_INVALID_ARGS); return SECFailure; @@ -2781,12 +2781,9 @@ p12dcx->bagsVerified = PR_TRUE; } - noInstallCnt = probCnt = bagCnt = 0; + probCnt = 0; i = 0; while (p12dcx->safeBags[i]) { - bagCnt++; - if (p12dcx->safeBags[i]->noInstall) - noInstallCnt++; if (p12dcx->safeBags[i]->problem) { probCnt++; errorVal = p12dcx->safeBags[i]->error; @@ -2794,15 +2791,6 @@ i++; } - /* formerly was erroneous code here that assumed that if all bags - * failed to import, then the problem was duplicated data; - * that is, it assume that the problem must be that the file had - * previously been successfully imported. But importing a - * previously imported file causes NO ERRORS at all, and this - * false assumption caused real errors to be hidden behind false - * errors about duplicated data. - */ - if (probCnt) { PORT_SetError(errorVal); return SECFailure;