| Index: nss/lib/pk11wrap/pk11slot.c
|
| diff --git a/nss/lib/pk11wrap/pk11slot.c b/nss/lib/pk11wrap/pk11slot.c
|
| index 1db527b1f02287fbd69a5e4720c5807087537c43..1f6597b5ebb441d2fbc407eaaf8d52099cb0e6bd 100644
|
| --- a/nss/lib/pk11wrap/pk11slot.c
|
| +++ b/nss/lib/pk11wrap/pk11slot.c
|
| @@ -29,9 +29,10 @@
|
| * to make the config files understand more entries, add them
|
| * to this table.
|
| */
|
| -PK11DefaultArrayEntry PK11_DefaultArray[] = {
|
| +const PK11DefaultArrayEntry PK11_DefaultArray[] = {
|
| { "RSA", SECMOD_RSA_FLAG, CKM_RSA_PKCS },
|
| { "DSA", SECMOD_DSA_FLAG, CKM_DSA },
|
| + { "ECC", SECMOD_ECC_FLAG, CKM_ECDSA },
|
| { "DH", SECMOD_DH_FLAG, CKM_DH_PKCS_DERIVE },
|
| { "RC2", SECMOD_RC2_FLAG, CKM_RC2_CBC },
|
| { "RC4", SECMOD_RC4_FLAG, CKM_RC4 },
|
| @@ -56,7 +57,7 @@ PK11DefaultArrayEntry PK11_DefaultArray[] = {
|
| const int num_pk11_default_mechanisms =
|
| sizeof(PK11_DefaultArray) / sizeof(PK11_DefaultArray[0]);
|
|
|
| -PK11DefaultArrayEntry *
|
| +const PK11DefaultArrayEntry *
|
| PK11_GetDefaultArray(int *size)
|
| {
|
| if (size) {
|
| @@ -1502,6 +1503,12 @@ PK11_GetDisabledReason(PK11SlotInfo *slot)
|
| /* returns PR_FALSE otherwise */
|
| PRBool PK11_UserDisableSlot(PK11SlotInfo *slot) {
|
|
|
| + /* Prevent users from disabling the internal module. */
|
| + if (slot->isInternal) {
|
| + PORT_SetError(SEC_ERROR_INVALID_ARGS);
|
| + return PR_FALSE;
|
| + }
|
| +
|
| slot->defaultFlags |= PK11_DISABLE_FLAG;
|
| slot->disabled = PR_TRUE;
|
| slot->reason = PK11_DIS_USER_SELECTED;
|
|
|