b93447
diff -up jss-4.2.6/mozilla/security/jss/org/mozilla/jss/crypto/Algorithm.c.orig jss-4.2.6/mozilla/security/jss/org/mozilla/jss/crypto/Algorithm.c
b93447
--- jss-4.2.6/mozilla/security/jss/org/mozilla/jss/crypto/Algorithm.c.orig	2011-05-18 10:01:36.792151000 -0700
b93447
+++ jss-4.2.6/mozilla/security/jss/org/mozilla/jss/crypto/Algorithm.c	2011-05-18 10:06:07.483691000 -0700
b93447
@@ -110,6 +110,7 @@ JSS_AlgInfo JSS_AlgTable[NUM_ALGS] = {
b93447
 /* 47 */    {SEC_OID_ANSIX962_ECDSA_SHA256_SIGNATURE, SEC_OID_TAG},
b93447
 /* 48 */    {SEC_OID_ANSIX962_ECDSA_SHA384_SIGNATURE, SEC_OID_TAG},
b93447
 /* 49 */    {SEC_OID_ANSIX962_ECDSA_SHA512_SIGNATURE, SEC_OID_TAG},
b93447
+/* 50 */    {SEC_OID_ANSIX962_ECDSA_SIGNATURE_SPECIFIED_DIGEST, SEC_OID_TAG},
b93447
 /* REMEMBER TO UPDATE NUM_ALGS!!! */
b93447
 };
b93447
 
b93447
diff -up jss-4.2.6/mozilla/security/jss/org/mozilla/jss/crypto/Algorithm.h.orig jss-4.2.6/mozilla/security/jss/org/mozilla/jss/crypto/Algorithm.h
b93447
--- jss-4.2.6/mozilla/security/jss/org/mozilla/jss/crypto/Algorithm.h.orig	2011-05-18 10:01:43.561164000 -0700
b93447
+++ jss-4.2.6/mozilla/security/jss/org/mozilla/jss/crypto/Algorithm.h	2011-05-18 10:06:07.489690000 -0700
b93447
@@ -56,7 +56,7 @@ typedef struct JSS_AlgInfoStr {
b93447
     JSS_AlgType type;
b93447
 } JSS_AlgInfo;
b93447
 
b93447
-#define NUM_ALGS 50
b93447
+#define NUM_ALGS 51
b93447
 
b93447
 extern JSS_AlgInfo JSS_AlgTable[];
b93447
 extern CK_ULONG JSS_symkeyUsage[];
b93447
diff -up jss-4.2.6/mozilla/security/jss/org/mozilla/jss/crypto/Algorithm.java.orig jss-4.2.6/mozilla/security/jss/org/mozilla/jss/crypto/Algorithm.java
b93447
--- jss-4.2.6/mozilla/security/jss/org/mozilla/jss/crypto/Algorithm.java.orig	2011-05-18 10:01:51.232179000 -0700
b93447
+++ jss-4.2.6/mozilla/security/jss/org/mozilla/jss/crypto/Algorithm.java	2011-05-18 10:06:07.493690000 -0700
b93447
@@ -232,5 +232,6 @@ public class Algorithm {
b93447
     protected static final short SEC_OID_ANSIX962_ECDSA_SHA256_SIGNATURE=47;
b93447
     protected static final short SEC_OID_ANSIX962_ECDSA_SHA384_SIGNATURE=48;
b93447
     protected static final short SEC_OID_ANSIX962_ECDSA_SHA512_SIGNATURE=49;
b93447
+    protected static final short SEC_OID_ANSIX962_ECDSA_SIGNATURE_SPECIFIED_DIGEST=50;
b93447
 
b93447
 }
b93447
diff -up jss-4.2.6/mozilla/security/jss/org/mozilla/jss/crypto/KeyPairAlgorithm.java.orig jss-4.2.6/mozilla/security/jss/org/mozilla/jss/crypto/KeyPairAlgorithm.java
b93447
--- jss-4.2.6/mozilla/security/jss/org/mozilla/jss/crypto/KeyPairAlgorithm.java.orig	2011-05-18 10:02:01.056198000 -0700
b93447
+++ jss-4.2.6/mozilla/security/jss/org/mozilla/jss/crypto/KeyPairAlgorithm.java	2011-05-18 13:46:33.452948000 -0700
b93447
@@ -94,7 +94,12 @@ public class KeyPairAlgorithm extends Al
b93447
     DSAFamily = new Algorithm(SEC_OID_ANSIX9_DSA_SIGNATURE, "DSA");
b93447
 
b93447
     public static final Algorithm
b93447
-    ECFamily = new Algorithm(SEC_OID_ANSIX962_EC_PUBLIC_KEY, "EC");
b93447
+
b93447
+//    To support both ECDSA and ECDH, it is best to provide two EC Families;
b93447
+//    However, since there is no token that does only CKM_DERIVE to
b93447
+//    date, we will just do ECDSA for now as it is sufficient enough today.
b93447
+//    This fix will support tokens that do not do ECDH
b93447
+    ECFamily = new Algorithm(SEC_OID_ANSIX962_ECDSA_SIGNATURE_SPECIFIED_DIGEST, "EC");
b93447
 
b93447
     public static final KeyPairAlgorithm
b93447
     RSA = new KeyPairAlgorithm(CKM_RSA_PKCS_KEY_PAIR_GEN, "RSA", RSAFamily);
b93447
diff -up jss-4.2.6/mozilla/security/jss/org/mozilla/jss/crypto/SignatureAlgorithm.java.orig jss-4.2.6/mozilla/security/jss/org/mozilla/jss/crypto/SignatureAlgorithm.java
b93447
--- jss-4.2.6/mozilla/security/jss/org/mozilla/jss/crypto/SignatureAlgorithm.java.orig	2011-05-18 10:02:10.696218000 -0700
b93447
+++ jss-4.2.6/mozilla/security/jss/org/mozilla/jss/crypto/SignatureAlgorithm.java	2011-05-18 10:06:07.496691000 -0700
b93447
@@ -124,7 +124,7 @@ public class SignatureAlgorithm extends 
b93447
      * operates on its input, which should be a hash.
b93447
      */
b93447
     public static final SignatureAlgorithm
b93447
-    ECSignature = new SignatureAlgorithm(SEC_OID_ANSIX962_EC_PUBLIC_KEY, 
b93447
+    ECSignature = new SignatureAlgorithm(SEC_OID_ANSIX962_ECDSA_SIGNATURE_SPECIFIED_DIGEST, 
b93447
 	"EC",
b93447
         null, null, ANSI_X962_OID.subBranch(2).subBranch(1) );
b93447