re-introduce old nss im too tired for this

This commit is contained in:
wuggy 2026-06-30 06:37:32 +01:00
commit 3a838106b9
2871 changed files with 1374431 additions and 1762417 deletions

2
security/nss/lib/libpkix/pkix_pl_nss/pki/Makefile Executable file → Normal file
View file

@ -26,6 +26,7 @@ include $(CORE_DEPTH)/coreconf/config.mk
# (4) Include "local" platform-dependent assignments (OPTIONAL). #
#######################################################################
include config.mk
#######################################################################
# (5) Execute "global" rules. (OPTIONAL) #
@ -43,5 +44,6 @@ include $(CORE_DEPTH)/coreconf/rules.mk
# (7) Execute "local" rules. (OPTIONAL). #
#######################################################################
export:: private_export

View file

@ -0,0 +1,15 @@
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Override TARGETS variable so that only static libraries
# are specifed as dependencies within rules.mk.
#
TARGETS = $(LIBRARY)
SHARED_LIBRARY =
IMPORT_LIBRARY =
PROGRAM =

5
security/nss/lib/libpkix/pkix_pl_nss/pki/manifest.mn Executable file → Normal file
View file

@ -4,6 +4,9 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
CORE_DEPTH = ../../../..
EXPORTS = \
$(NULL)
PRIVATE_EXPORTS = \
pkix_pl_basicconstraints.h \
pkix_pl_cert.h \
@ -47,4 +50,4 @@ CSRCS = \
$(NULL)
LIBRARY_NAME = pkixpki
SHARED_LIBRARY = $(NULL)

View file

@ -2811,23 +2811,14 @@ PKIX_PL_Cert_VerifySignature(
PKIX_PL_Cert *cachedCert = NULL;
PKIX_Error *verifySig = NULL;
PKIX_Error *cachedSig = NULL;
PKIX_Error *checkSig = NULL;
SECStatus status;
PKIX_Boolean certEqual = PKIX_FALSE;
PKIX_Boolean certInHash = PKIX_FALSE;
PKIX_Boolean checkCertSig = PKIX_TRUE;
void* wincx = NULL;
PKIX_ENTER(CERT, "PKIX_PL_Cert_VerifySignature");
PKIX_NULLCHECK_THREE(cert, cert->nssCert, pubKey);
/* if the cert check flag is off, skip the check */
checkSig = pkix_pl_NssContext_GetCertSignatureCheck(
(PKIX_PL_NssContext *)plContext, &checkCertSig);
if ((checkCertSig == PKIX_FALSE) && (checkSig == NULL)) {
goto cleanup;
}
verifySig = PKIX_PL_HashTable_Lookup
(cachedCertSigTable,
(PKIX_PL_Object *) pubKey,
@ -2888,7 +2879,6 @@ cleanup:
}
PKIX_DECREF(cachedCert);
PKIX_DECREF(checkSig);
PKIX_DECREF(verifySig);
PKIX_DECREF(cachedSig);
@ -3160,15 +3150,6 @@ PKIX_PL_Cert_CheckNameConstraints(
if (arena == NULL) {
PKIX_ERROR(PKIX_OUTOFMEMORY);
}
/* only check common Name if the usage requires it */
if (treatCommonNameAsDNSName) {
SECCertificateUsage certificateUsage;
certificateUsage = ((PKIX_PL_NssContext*)plContext)->certificateUsage;
if ((certificateUsage != certificateUsageSSLServer) &&
(certificateUsage != certificateUsageIPsec)) {
treatCommonNameAsDNSName = PKIX_FALSE;
}
}
/* This NSS call returns Subject Alt Names. If
* treatCommonNameAsDNSName is true, it also returns the

View file

@ -829,15 +829,10 @@ pkix_pl_CertNameConstraints_Create(
if (nssNameConstraints == NULL) {
*pNameConstraints = NULL;
/* we free the arnea here because PKIX_ERROR_RECEIVED
* may not be set. Setting arena to NULL makes sure
* we don't try to free it again (and makes scanners
* happy). */
if (arena){
PKIX_CERTNAMECONSTRAINTS_DEBUG
("\t\tCalling PORT_FreeArena).\n");
PORT_FreeArena(arena, PR_FALSE);
arena = NULL;
}
goto cleanup;
}

View file

@ -741,9 +741,7 @@ pkix_pl_OcspResponse_VerifyResponse(
PKIX_CERTVERIFYKEYUSAGEFAILED);
rv = SECSuccess;
} else {
/* checkSig is !isRoot */
PRBool checkSig = response->signerCert->isRoot ? PR_FALSE : PR_TRUE;
rv = CERT_VerifyCert(response->handle, response->signerCert, checkSig,
rv = CERT_VerifyCert(response->handle, response->signerCert, PKIX_TRUE,
certUsage, response->producedAt, NULL, NULL);
if (rv != SECSuccess) {
PKIX_ERROR(PKIX_CERTVERIFYKEYUSAGEFAILED);