--- old/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11KeyPairGenerator.java 2018-06-04 19:27:23.116698098 -0300 +++ new/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11KeyPairGenerator.java 2018-06-04 19:27:22.894696520 -0300 @@ -416,9 +416,9 @@ (session.id(), new CK_MECHANISM(mechanism), publicKeyTemplate, privateKeyTemplate); PublicKey publicKey = P11Key.publicKey - (session, keyIDs[0], algorithm, keySize, publicKeyTemplate); + (session, keyIDs[0], algorithm, keySize, publicKeyTemplate, true); PrivateKey privateKey = P11Key.privateKey - (session, keyIDs[1], algorithm, keySize, privateKeyTemplate); + (session, keyIDs[1], algorithm, keySize, privateKeyTemplate, true); return new KeyPair(publicKey, privateKey); } catch (PKCS11Exception e) { throw new ProviderException(e);