equal
deleted
inserted
replaced
149 Session session = null; |
149 Session session = null; |
150 try { |
150 try { |
151 session = token.getObjSession(); |
151 session = token.getObjSession(); |
152 long newKeyID = token.p11.C_CopyObject(session.id(), |
152 long newKeyID = token.p11.C_CopyObject(session.id(), |
153 p11Key.keyID, extraAttrs); |
153 p11Key.keyID, extraAttrs); |
154 p11Key = (P11Key) (P11Key.secretKey(p11Key.session, |
154 p11Key = (P11Key) (P11Key.secretKey(session, |
155 newKeyID, p11Key.algorithm, p11Key.keyLength, |
155 newKeyID, p11Key.algorithm, p11Key.keyLength, |
156 extraAttrs)); |
156 extraAttrs)); |
157 } catch (PKCS11Exception p11e) { |
157 } catch (PKCS11Exception p11e) { |
158 throw new InvalidKeyException |
158 throw new InvalidKeyException |
159 ("Cannot duplicate the PKCS11 key", p11e); |
159 ("Cannot duplicate the PKCS11 key", p11e); |