mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-28 03:17:31 +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
|
|
@ -72,10 +72,12 @@ class EncryptDeriveTest
|
|||
return CKM_CAMELLIA_ECB_ENCRYPT_DATA;
|
||||
case CKM_CAMELLIA_CBC:
|
||||
return CKM_CAMELLIA_CBC_ENCRYPT_DATA;
|
||||
#ifndef NSS_DISABLE_DEPRECATED_SEED
|
||||
case CKM_SEED_ECB:
|
||||
return CKM_SEED_ECB_ENCRYPT_DATA;
|
||||
case CKM_SEED_CBC:
|
||||
return CKM_SEED_CBC_ENCRYPT_DATA;
|
||||
#endif
|
||||
default:
|
||||
ADD_FAILURE() << "Unknown mechanism";
|
||||
break;
|
||||
|
|
@ -93,7 +95,9 @@ class EncryptDeriveTest
|
|||
case CKM_DES3_ECB:
|
||||
case CKM_AES_ECB:
|
||||
case CKM_CAMELLIA_ECB:
|
||||
#ifndef NSS_DISABLE_DEPRECATED_SEED
|
||||
case CKM_SEED_ECB:
|
||||
#endif
|
||||
string_data.pData = toUcharPtr(kInput);
|
||||
string_data.ulLen = keysize();
|
||||
param.data = reinterpret_cast<uint8_t*>(&string_data);
|
||||
|
|
@ -110,7 +114,9 @@ class EncryptDeriveTest
|
|||
|
||||
case CKM_AES_CBC:
|
||||
case CKM_CAMELLIA_CBC:
|
||||
#ifndef NSS_DISABLE_DEPRECATED_SEED
|
||||
case CKM_SEED_CBC:
|
||||
#endif
|
||||
aes_data.pData = toUcharPtr(kInput);
|
||||
aes_data.length = keysize();
|
||||
PORT_Memcpy(aes_data.iv, kIv, keysize());
|
||||
|
|
@ -132,14 +138,18 @@ class EncryptDeriveTest
|
|||
case CKM_DES3_ECB:
|
||||
case CKM_AES_ECB:
|
||||
case CKM_CAMELLIA_ECB:
|
||||
#ifndef NSS_DISABLE_DEPRECATED_SEED
|
||||
case CKM_SEED_ECB:
|
||||
#endif
|
||||
// No parameter needed here.
|
||||
break;
|
||||
|
||||
case CKM_DES3_CBC:
|
||||
case CKM_AES_CBC:
|
||||
case CKM_CAMELLIA_CBC:
|
||||
#ifndef NSS_DISABLE_DEPRECATED_SEED
|
||||
case CKM_SEED_CBC:
|
||||
#endif
|
||||
param.data = toUcharPtr(kIv);
|
||||
param.len = keysize();
|
||||
break;
|
||||
|
|
@ -185,12 +195,22 @@ class EncryptDeriveTest
|
|||
|
||||
TEST_P(EncryptDeriveTest, Test) { TestEncryptDerive(); }
|
||||
|
||||
static const CK_MECHANISM_TYPE kEncryptDeriveMechanisms[] = {
|
||||
CKM_DES3_ECB, CKM_DES3_CBC, CKM_AES_ECB, CKM_AES_ECB, CKM_AES_CBC,
|
||||
CKM_CAMELLIA_ECB, CKM_CAMELLIA_CBC, CKM_SEED_ECB, CKM_SEED_CBC};
|
||||
static const CK_MECHANISM_TYPE kEncryptDeriveMechanisms[] = {CKM_DES3_ECB,
|
||||
CKM_DES3_CBC,
|
||||
CKM_AES_ECB,
|
||||
CKM_AES_ECB,
|
||||
CKM_AES_CBC,
|
||||
CKM_CAMELLIA_ECB,
|
||||
CKM_CAMELLIA_CBC
|
||||
#ifndef NSS_DISABLE_DEPRECATED_SEED
|
||||
,
|
||||
CKM_SEED_ECB,
|
||||
CKM_SEED_CBC
|
||||
#endif
|
||||
};
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(EncryptDeriveTests, EncryptDeriveTest,
|
||||
::testing::ValuesIn(kEncryptDeriveMechanisms));
|
||||
INSTANTIATE_TEST_SUITE_P(EncryptDeriveTests, EncryptDeriveTest,
|
||||
::testing::ValuesIn(kEncryptDeriveMechanisms));
|
||||
|
||||
// This class handles the case where 3DES takes a 192-bit key
|
||||
// where all 24 octets will be used.
|
||||
|
|
@ -204,7 +224,7 @@ TEST_P(EncryptDerive3Test, Test) { TestEncryptDerive(); }
|
|||
static const CK_MECHANISM_TYPE kDES3EncryptDeriveMechanisms[] = {CKM_DES3_ECB,
|
||||
CKM_DES3_CBC};
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(Encrypt3DeriveTests, EncryptDerive3Test,
|
||||
::testing::ValuesIn(kDES3EncryptDeriveMechanisms));
|
||||
INSTANTIATE_TEST_SUITE_P(Encrypt3DeriveTests, EncryptDerive3Test,
|
||||
::testing::ValuesIn(kDES3EncryptDeriveMechanisms));
|
||||
|
||||
} // namespace nss_test
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue