diff -r 519bbd41590c -r 9994f4f08a59 jdk/src/share/classes/sun/security/pkcs11/P11SecretKeyFactory.java --- a/jdk/src/share/classes/sun/security/pkcs11/P11SecretKeyFactory.java Mon Mar 02 15:10:55 2009 -0800 +++ b/jdk/src/share/classes/sun/security/pkcs11/P11SecretKeyFactory.java Tue Mar 03 19:50:59 2009 -0800 @@ -151,7 +151,7 @@ session = token.getObjSession(); long newKeyID = token.p11.C_CopyObject(session.id(), p11Key.keyID, extraAttrs); - p11Key = (P11Key) (P11Key.secretKey(p11Key.session, + p11Key = (P11Key) (P11Key.secretKey(session, newKeyID, p11Key.algorithm, p11Key.keyLength, extraAttrs)); } catch (PKCS11Exception p11e) {