jdk/src/jdk.crypto.mscapi/windows/classes/sun/security/mscapi/KeyStore.java
changeset 40389 c6df8bba0b71
parent 36759 07dc1868fd1e
child 45193 a4c62ccf8688
equal deleted inserted replaced
40320:2e83d21d78cd 40389:c6df8bba0b71
   166                         encoding.length, 0L, 0L); // no private key to attach
   166                         encoding.length, 0L, 0L); // no private key to attach
   167                 }
   167                 }
   168             }
   168             }
   169             certChain = chain;
   169             certChain = chain;
   170         }
   170         }
   171     };
   171     }
   172 
   172 
   173     /*
   173     /*
   174      * An X.509 certificate factory.
   174      * An X.509 certificate factory.
   175      * Used to create an X.509 certificate from its DER-encoding.
   175      * Used to create an X.509 certificate from its DER-encoding.
   176      */
   176      */
   796             {
   796             {
   797                 certChain[i] = (X509Certificate) iter.next();
   797                 certChain[i] = (X509Certificate) iter.next();
   798             }
   798             }
   799 
   799 
   800             storeWithUniqueAlias(alias, new KeyEntry(alias,
   800             storeWithUniqueAlias(alias, new KeyEntry(alias,
   801                     new RSAPrivateKey(hCryptProv, hCryptKey, keyLength),
   801                     new RSAPrivateKey(new Key.NativeHandles(hCryptProv,
       
   802                             hCryptKey), keyLength),
   802                     certChain));
   803                     certChain));
   803         }
   804         }
   804         catch (Throwable e)
   805         catch (Throwable e)
   805         {
   806         {
   806             // Ignore the exception and skip this entry
   807             // Ignore the exception and skip this entry
   852 
   853 
   853     /**
   854     /**
   854      * Load keys and/or certificates from keystore into Collection.
   855      * Load keys and/or certificates from keystore into Collection.
   855      *
   856      *
   856      * @param name Name of keystore.
   857      * @param name Name of keystore.
   857      * @param entries Collection of key/certificate.
       
   858      */
   858      */
   859     private native void loadKeysOrCertificateChains(String name)
   859     private native void loadKeysOrCertificateChains(String name)
   860             throws KeyStoreException;
   860             throws KeyStoreException;
   861 
   861 
   862     /**
   862     /**