jdk/src/share/classes/sun/security/pkcs11/P11SecretKeyFactory.java
changeset 2180 9994f4f08a59
parent 291 be2e0a87d658
child 5506 202f599c92aa
equal deleted inserted replaced
2173:519bbd41590c 2180:9994f4f08a59
   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);