Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Unified Diff: nss/lib/pk11wrap/pk11slot.c

Issue 319593003: Update to NSS 3.16.2 Beta 3. (Closed) Base URL: http://src.chromium.org/svn/trunk/deps/third_party/nss
Patch Set: Remove unused function SEC_NumberOrNameStringToOIDTag Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;

Powered by Google App Engine
This is Rietveld 408576698