jdk/src/jdk.crypto.pkcs11/share/classes/sun/security/pkcs11/P11KeyStore.java
changeset 28059 e576535359cc
parent 25859 3317bb8137f4
child 31538 0981099a3e54
equal deleted inserted replaced
28058:87940c838900 28059:e576535359cc
  1639         PrivateKey key = pke.getPrivateKey();
  1639         PrivateKey key = pke.getPrivateKey();
  1640         CK_ATTRIBUTE[] attrs = null;
  1640         CK_ATTRIBUTE[] attrs = null;
  1641 
  1641 
  1642         // If the key is a token object on this token, update it instead
  1642         // If the key is a token object on this token, update it instead
  1643         // of creating a duplicate key object.
  1643         // of creating a duplicate key object.
  1644         // Otherwise, treat a P11Key like any other key, if is is extractable.
  1644         // Otherwise, treat a P11Key like any other key, if it is extractable.
  1645         if (key instanceof P11Key) {
  1645         if (key instanceof P11Key) {
  1646             P11Key p11Key = (P11Key)key;
  1646             P11Key p11Key = (P11Key)key;
  1647             if (p11Key.tokenObject && (p11Key.token == this.token)) {
  1647             if (p11Key.tokenObject && (p11Key.token == this.token)) {
  1648                 updateP11Pkey(alias, null, p11Key);
  1648                 updateP11Pkey(alias, null, p11Key);
  1649                 storeChain(alias, (X509Certificate[])pke.getCertificateChain());
  1649                 storeChain(alias, (X509Certificate[])pke.getCertificateChain());