mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-28 03:17:31 +09:00
re-introduce old nss im too tired for this
This commit is contained in:
parent
3c46be320d
commit
3a838106b9
2871 changed files with 1374431 additions and 1762417 deletions
|
|
@ -22,8 +22,7 @@ class ParamHolder {
|
|||
};
|
||||
|
||||
void Pkcs11KeyPairGenerator::GenerateKey(ScopedSECKEYPrivateKey* priv_key,
|
||||
ScopedSECKEYPublicKey* pub_key,
|
||||
bool sensitive) const {
|
||||
ScopedSECKEYPublicKey* pub_key) const {
|
||||
// This function returns if an assertion fails, so don't leak anything.
|
||||
priv_key->reset(nullptr);
|
||||
pub_key->reset(nullptr);
|
||||
|
|
@ -35,11 +34,10 @@ void Pkcs11KeyPairGenerator::GenerateKey(ScopedSECKEYPrivateKey* priv_key,
|
|||
ASSERT_TRUE(slot);
|
||||
|
||||
SECKEYPublicKey* pub_tmp;
|
||||
ScopedSECKEYPrivateKey priv_tmp(
|
||||
PK11_GenerateKeyPair(slot.get(), mech_, params->get(), &pub_tmp, PR_FALSE,
|
||||
sensitive ? PR_TRUE : PR_FALSE, nullptr));
|
||||
ASSERT_NE(nullptr, priv_tmp)
|
||||
<< "PK11_GenerateKeyPair failed: " << PORT_ErrorToName(PORT_GetError());
|
||||
ScopedSECKEYPrivateKey priv_tmp(PK11_GenerateKeyPair(
|
||||
slot.get(), mech_, params->get(), &pub_tmp, PR_FALSE, PR_TRUE, nullptr));
|
||||
ASSERT_NE(nullptr, priv_tmp) << "PK11_GenerateKeyPair failed: "
|
||||
<< PORT_ErrorToName(PORT_GetError());
|
||||
ASSERT_NE(nullptr, pub_tmp);
|
||||
|
||||
priv_key->swap(priv_tmp);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue