< prev index next >

src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11DSAKeyFactory.java

Print this page

        

*** 177,187 **** Session session = null; try { session = token.getObjSession(); long keyID = token.p11.C_CreateObject(session.id(), attributes); return P11Key.publicKey ! (session, keyID, "DSA", p.bitLength(), attributes); } finally { token.releaseSession(session); } } --- 177,187 ---- Session session = null; try { session = token.getObjSession(); long keyID = token.p11.C_CreateObject(session.id(), attributes); return P11Key.publicKey ! (session, keyID, "DSA", p.bitLength(), attributes, true); } finally { token.releaseSession(session); } }
*** 200,210 **** Session session = null; try { session = token.getObjSession(); long keyID = token.p11.C_CreateObject(session.id(), attributes); return P11Key.privateKey ! (session, keyID, "DSA", p.bitLength(), attributes); } finally { token.releaseSession(session); } } --- 200,210 ---- Session session = null; try { session = token.getObjSession(); long keyID = token.p11.C_CreateObject(session.id(), attributes); return P11Key.privateKey ! (session, keyID, "DSA", p.bitLength(), attributes, true); } finally { token.releaseSession(session); } }
*** 216,226 **** new CK_ATTRIBUTE(CKA_VALUE), new CK_ATTRIBUTE(CKA_PRIME), new CK_ATTRIBUTE(CKA_SUBPRIME), new CK_ATTRIBUTE(CKA_BASE), }; ! token.p11.C_GetAttributeValue(session[0].id(), key.keyID, attributes); KeySpec spec = new DSAPublicKeySpec( attributes[0].getBigInteger(), attributes[1].getBigInteger(), attributes[2].getBigInteger(), attributes[3].getBigInteger() --- 216,232 ---- new CK_ATTRIBUTE(CKA_VALUE), new CK_ATTRIBUTE(CKA_PRIME), new CK_ATTRIBUTE(CKA_SUBPRIME), new CK_ATTRIBUTE(CKA_BASE), }; ! key.incNativeKeyRef(); ! try { ! token.p11.C_GetAttributeValue(session[0].id(), key.keyID, ! attributes); ! } finally { ! key.decNativeKeyRef(); ! } KeySpec spec = new DSAPublicKeySpec( attributes[0].getBigInteger(), attributes[1].getBigInteger(), attributes[2].getBigInteger(), attributes[3].getBigInteger()
*** 240,250 **** new CK_ATTRIBUTE(CKA_VALUE), new CK_ATTRIBUTE(CKA_PRIME), new CK_ATTRIBUTE(CKA_SUBPRIME), new CK_ATTRIBUTE(CKA_BASE), }; ! token.p11.C_GetAttributeValue(session[0].id(), key.keyID, attributes); KeySpec spec = new DSAPrivateKeySpec( attributes[0].getBigInteger(), attributes[1].getBigInteger(), attributes[2].getBigInteger(), attributes[3].getBigInteger() --- 246,262 ---- new CK_ATTRIBUTE(CKA_VALUE), new CK_ATTRIBUTE(CKA_PRIME), new CK_ATTRIBUTE(CKA_SUBPRIME), new CK_ATTRIBUTE(CKA_BASE), }; ! key.incNativeKeyRef(); ! try { ! token.p11.C_GetAttributeValue(session[0].id(), key.keyID, ! attributes); ! } finally { ! key.decNativeKeyRef(); ! } KeySpec spec = new DSAPrivateKeySpec( attributes[0].getBigInteger(), attributes[1].getBigInteger(), attributes[2].getBigInteger(), attributes[3].getBigInteger()
< prev index next >