If the given key is of type java.security.PrivateKey
, it must be accompanied by a certificate chain certifying the corresponding public key.
If the given alias already exists, the keystore information associated with it is overridden by the given key (and possibly certificate chain).
@param alias the alias name
@param key the key to be associated with the alias
@param password the password to protect the key
@param chain the certificate chain for the corresponding publickey (only required if the given key is of type java.security.PrivateKey
).
@exception KeyStoreException if the given key cannot be protected, orthis operation fails for some other reason
|
|
|
|
|
|
|
|