mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-23 08:57:34 +09:00
Replace NSS with Pale Moon's
This commit is contained in:
parent
ff1e5e48bf
commit
8c2e376f94
2870 changed files with 1762232 additions and 1374220 deletions
|
|
@ -26,11 +26,9 @@ lg_createCertObject(SDB *sdb, CK_OBJECT_HANDLE *handle,
|
|||
SECItem derCert;
|
||||
NSSLOWCERTCertificate *cert;
|
||||
NSSLOWCERTCertTrust *trust = NULL;
|
||||
NSSLOWCERTCertTrust userTrust =
|
||||
{ CERTDB_USER, CERTDB_USER, CERTDB_USER };
|
||||
NSSLOWCERTCertTrust defTrust =
|
||||
{ CERTDB_TRUSTED_UNKNOWN,
|
||||
CERTDB_TRUSTED_UNKNOWN, CERTDB_TRUSTED_UNKNOWN };
|
||||
NSSLOWCERTCertTrust userTrust = { CERTDB_USER, CERTDB_USER, CERTDB_USER };
|
||||
NSSLOWCERTCertTrust defTrust = { CERTDB_TRUSTED_UNKNOWN,
|
||||
CERTDB_TRUSTED_UNKNOWN, CERTDB_TRUSTED_UNKNOWN };
|
||||
char *label = NULL;
|
||||
char *email = NULL;
|
||||
SECStatus rv;
|
||||
|
|
@ -574,8 +572,8 @@ lg_mkPrivKey(SDB *sdb, const CK_ATTRIBUTE *templ, CK_ULONG count,
|
|||
&privKey->u.dsa.privateValue, sdb);
|
||||
if (crv != CKR_OK)
|
||||
break;
|
||||
if (lg_hasAttribute(CKA_NETSCAPE_DB, templ, count)) {
|
||||
crv = lg_Attribute2SSecItem(arena, CKA_NETSCAPE_DB, templ, count,
|
||||
if (lg_hasAttribute(CKA_NSS_DB, templ, count)) {
|
||||
crv = lg_Attribute2SSecItem(arena, CKA_NSS_DB, templ, count,
|
||||
&privKey->u.dsa.publicValue);
|
||||
/* privKey was zero'd so public value is already set to NULL, 0
|
||||
* if we don't set it explicitly */
|
||||
|
|
@ -596,8 +594,8 @@ lg_mkPrivKey(SDB *sdb, const CK_ATTRIBUTE *templ, CK_ULONG count,
|
|||
&privKey->u.dh.privateValue, sdb);
|
||||
if (crv != CKR_OK)
|
||||
break;
|
||||
if (lg_hasAttribute(CKA_NETSCAPE_DB, templ, count)) {
|
||||
crv = lg_Attribute2SSecItem(arena, CKA_NETSCAPE_DB, templ, count,
|
||||
if (lg_hasAttribute(CKA_NSS_DB, templ, count)) {
|
||||
crv = lg_Attribute2SSecItem(arena, CKA_NSS_DB, templ, count,
|
||||
&privKey->u.dh.publicValue);
|
||||
/* privKey was zero'd so public value is already set to NULL, 0
|
||||
* if we don't set it explicitly */
|
||||
|
|
@ -623,8 +621,8 @@ lg_mkPrivKey(SDB *sdb, const CK_ATTRIBUTE *templ, CK_ULONG count,
|
|||
&privKey->u.ec.privateValue, sdb);
|
||||
if (crv != CKR_OK)
|
||||
break;
|
||||
if (lg_hasAttribute(CKA_NETSCAPE_DB, templ, count)) {
|
||||
crv = lg_Attribute2SSecItem(arena, CKA_NETSCAPE_DB, templ, count,
|
||||
if (lg_hasAttribute(CKA_NSS_DB, templ, count)) {
|
||||
crv = lg_Attribute2SSecItem(arena, CKA_NSS_DB, templ, count,
|
||||
&privKey->u.ec.publicValue);
|
||||
if (crv != CKR_OK)
|
||||
break;
|
||||
|
|
@ -672,7 +670,7 @@ lg_createPrivateKeyObject(SDB *sdb, CK_KEY_TYPE key_type,
|
|||
return crv;
|
||||
label = lg_getString(CKA_LABEL, templ, count);
|
||||
|
||||
crv = lg_Attribute2SSecItem(NULL, CKA_NETSCAPE_DB, templ, count, &pubKey);
|
||||
crv = lg_Attribute2SSecItem(NULL, CKA_NSS_DB, templ, count, &pubKey);
|
||||
if (crv != CKR_OK) {
|
||||
crv = CKR_TEMPLATE_INCOMPLETE;
|
||||
rv = SECFailure;
|
||||
|
|
@ -960,6 +958,22 @@ lg_createKeyObject(SDB *sdb, CK_OBJECT_CLASS objclass,
|
|||
return CKR_ATTRIBUTE_VALUE_INVALID;
|
||||
}
|
||||
|
||||
/*
|
||||
* return the 'next' key handle
|
||||
*/
|
||||
CK_RV
|
||||
lg_GetNewObjectID(SDB *sdb, CK_OBJECT_HANDLE *handle)
|
||||
{
|
||||
/* the upper level needs the Object ID early to populate any
|
||||
* signature attributes. The legacy can't really return a new
|
||||
* handle without the full object template (chicken and egg issue).
|
||||
* Fortunately we can just return a bogus handle because the legacy
|
||||
* database doesn't support meta data and can't store any of the signed
|
||||
* attributes anyway */
|
||||
*handle = CK_INVALID_HANDLE;
|
||||
return CKR_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Parse the template and create an object stored in the DB that reflects.
|
||||
* the object specified in the database.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue