mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-25 18:07:31 +09:00
nss: update to 3.44.1, with vc2013 fix and gyp fix
This commit is contained in:
parent
a2ef5fcde7
commit
d4b834111b
553 changed files with 1515569 additions and 1130 deletions
|
|
@ -1598,6 +1598,7 @@ PK11_DeriveWithTemplate(PK11SymKey *baseKey, CK_MECHANISM_TYPE derive,
|
|||
PK11_FreeSymKey(newBaseKey);
|
||||
if (crv != CKR_OK) {
|
||||
PK11_FreeSymKey(symKey);
|
||||
PORT_SetError(PK11_MapError(crv));
|
||||
return NULL;
|
||||
}
|
||||
return symKey;
|
||||
|
|
@ -1839,6 +1840,35 @@ loser:
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* This regenerate a public key from a private key. This function is currently
|
||||
* NSS private. If we want to make it public, we need to add and optional
|
||||
* template or at least flags (a.la. PK11_DeriveWithFlags).
|
||||
*/
|
||||
CK_OBJECT_HANDLE
|
||||
PK11_DerivePubKeyFromPrivKey(SECKEYPrivateKey *privKey)
|
||||
{
|
||||
PK11SlotInfo *slot = privKey->pkcs11Slot;
|
||||
CK_MECHANISM mechanism;
|
||||
CK_OBJECT_HANDLE objectID = CK_INVALID_HANDLE;
|
||||
CK_RV crv;
|
||||
|
||||
mechanism.mechanism = CKM_NSS_PUB_FROM_PRIV;
|
||||
mechanism.pParameter = NULL;
|
||||
mechanism.ulParameterLen = 0;
|
||||
|
||||
PK11_EnterSlotMonitor(slot);
|
||||
crv = PK11_GETTAB(slot)->C_DeriveKey(slot->session, &mechanism,
|
||||
privKey->pkcs11ID, NULL, 0,
|
||||
&objectID);
|
||||
PK11_ExitSlotMonitor(slot);
|
||||
if (crv != CKR_OK) {
|
||||
PORT_SetError(PK11_MapError(crv));
|
||||
return CK_INVALID_HANDLE;
|
||||
}
|
||||
return objectID;
|
||||
}
|
||||
|
||||
/*
|
||||
* This Generates a wrapping key based on a privateKey, publicKey, and two
|
||||
* random numbers. For Mail usage RandomB should be NULL. In the Sender's
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue