Bug 367577: Only require NSS_ENABLE_ECC to sign data with EC keys.
authorWan-Teh Chang <wtc@google.com>
Thu, 04 Apr 2013 10:35:52 -0700
changeset 10724 0198afefa09ab41f82f4b9d8c61879830a5f1ec9
parent 10723 eca0c48e59c17758c18090893c1f8ecf81b263fd
child 10725 8b2a6b06539153448d895d3d83a32546ad94bc7b
push id34
push userwtc@google.com
push dateThu, 04 Apr 2013 17:36:06 +0000
bugs367577
Bug 367577: Only require NSS_ENABLE_ECC to sign data with EC keys. r=rrelyea. Basic ECC. r=rrelyea.
lib/cryptohi/secsign.c
--- a/lib/cryptohi/secsign.c
+++ b/lib/cryptohi/secsign.c
@@ -50,23 +50,16 @@ SGN_NewContext(SECOidTag alg, SECKEYPriv
 
     /* verify our key type */
     if (key->keyType != keyType &&
 	!((key->keyType == dsaKey) && (keyType == fortezzaKey)) ) {
 	PORT_SetError(SEC_ERROR_INVALID_ALGORITHM);
 	return 0;
     }
 
-#ifndef NSS_ECC_MORE_THAN_SUITE_B
-    if (key->keyType == ecKey) {
-	PORT_SetError(SEC_ERROR_INVALID_ALGORITHM);
-	return 0;
-    }
-#endif
-
     cx = (SGNContext*) PORT_ZAlloc(sizeof(SGNContext));
     if (cx) {
 	cx->hashalg = hashalg;
 	cx->signalg = signalg;
 	cx->key = key;
     }
     return cx;
 }