mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-23 17:07:31 +09:00
[NSS] sync with https://github.com/roytam1/NSS/tree/NSS_3_48_UXP_BRANCH, notably:
- Bug 1665715 - (1/2) revert e8f2720c8254 (bug 1593141) because it's no longer necessary r=jcj (a9bca998) - Bug 1665715 - (2/2) pass encoded signed certificate timestamp extension (if present) in CheckRevocation r=jcj (429f9ef9)
This commit is contained in:
parent
96524cc3c5
commit
4e45ee69e0
22 changed files with 130 additions and 272 deletions
|
|
@ -411,17 +411,12 @@ PK11_FindCrlByName(PK11SlotInfo **slot, CK_OBJECT_HANDLE *crlHandle,
|
|||
nssPKIObjectCollection *collection;
|
||||
nssTokenSearchType tokenOnly = nssTokenSearchType_TokenOnly;
|
||||
NSSToken *token = PK11Slot_GetNSSToken(*slot);
|
||||
if (!token) {
|
||||
goto loser;
|
||||
}
|
||||
collection = nssCRLCollection_Create(td, NULL);
|
||||
if (!collection) {
|
||||
(void)nssToken_Destroy(token);
|
||||
goto loser;
|
||||
}
|
||||
instances = nssToken_FindCRLsBySubject(token, NULL, &subject,
|
||||
tokenOnly, 0, NULL);
|
||||
(void)nssToken_Destroy(token);
|
||||
nssPKIObjectCollection_AddInstances(collection, instances, 0);
|
||||
nss_ZFreeIf(instances);
|
||||
crls = nssPKIObjectCollection_GetCRLs(collection, NULL, 0, NULL);
|
||||
|
|
@ -485,21 +480,16 @@ PK11_PutCrl(PK11SlotInfo *slot, SECItem *crl, SECItem *name,
|
|||
char *url, int type)
|
||||
{
|
||||
NSSItem derCRL, derSubject;
|
||||
NSSToken *token;
|
||||
NSSToken *token = PK11Slot_GetNSSToken(slot);
|
||||
nssCryptokiObject *object;
|
||||
PRBool isKRL = (type == SEC_CRL_TYPE) ? PR_FALSE : PR_TRUE;
|
||||
CK_OBJECT_HANDLE rvH;
|
||||
|
||||
NSSITEM_FROM_SECITEM(&derSubject, name);
|
||||
NSSITEM_FROM_SECITEM(&derCRL, crl);
|
||||
token = PK11Slot_GetNSSToken(slot);
|
||||
if (!token) {
|
||||
PORT_SetError(SEC_ERROR_NO_TOKEN);
|
||||
return CK_INVALID_HANDLE;
|
||||
}
|
||||
|
||||
object = nssToken_ImportCRL(token, NULL,
|
||||
&derSubject, &derCRL, isKRL, url, PR_TRUE);
|
||||
(void)nssToken_Destroy(token);
|
||||
|
||||
if (object) {
|
||||
rvH = object->handle;
|
||||
|
|
@ -518,8 +508,8 @@ SECStatus
|
|||
SEC_DeletePermCRL(CERTSignedCrl *crl)
|
||||
{
|
||||
PRStatus status;
|
||||
nssCryptokiObject *object;
|
||||
NSSToken *token;
|
||||
nssCryptokiObject *object;
|
||||
PK11SlotInfo *slot = crl->slot;
|
||||
|
||||
if (slot == NULL) {
|
||||
|
|
@ -528,17 +518,13 @@ SEC_DeletePermCRL(CERTSignedCrl *crl)
|
|||
PORT_SetError(SEC_ERROR_CRL_INVALID);
|
||||
return SECFailure;
|
||||
}
|
||||
|
||||
token = PK11Slot_GetNSSToken(slot);
|
||||
if (!token) {
|
||||
return SECFailure;
|
||||
}
|
||||
|
||||
object = nss_ZNEW(NULL, nssCryptokiObject);
|
||||
if (!object) {
|
||||
(void)nssToken_Destroy(token);
|
||||
return SECFailure;
|
||||
}
|
||||
object->token = token; /* object takes ownership */
|
||||
object->token = nssToken_AddRef(token);
|
||||
object->handle = crl->pkcs11ID;
|
||||
object->isTokenObject = PR_TRUE;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue