@ProviderType
public interface KeystoreService
Modifier and Type | Method and Description |
---|---|
void |
createKeyPair(java.lang.String alias,
java.lang.String algorithm,
int keySize,
java.lang.String signatureAlgorithm,
java.lang.String attributes)
Creates and persists a new keypair in the managed keystore using the specified alias
|
void |
createKeyPair(java.lang.String alias,
java.lang.String algorithm,
int keySize,
java.lang.String signatureAlgorithm,
java.lang.String attributes,
java.security.SecureRandom secureRandom)
Creates and persists a new keypair in the managed keystore using the specified alias
|
void |
deleteEntry(java.lang.String alias)
Deletes the entry identified by the specified alias, if it exists.
|
java.util.List<java.lang.String> |
getAliases()
Returns the list of all the aliases corresponding to the keystore service managed objects
|
java.util.Collection<java.security.cert.CRL> |
getCRLs()
Returns a list of the current cached CRLs.
|
java.security.cert.CertStore |
getCRLStore()
Returns a
CertStore containing the cached CRLs. |
java.lang.String |
getCSR(java.security.KeyPair keyPair,
javax.security.auth.x500.X500Principal principal,
java.lang.String signerAlg)
Creates and returns a CSR for the given keypair based on the provided principal and signer algorithm selected
|
java.lang.String |
getCSR(java.lang.String alias,
javax.security.auth.x500.X500Principal principal,
java.lang.String signerAlg) |
java.util.Map<java.lang.String,java.security.KeyStore.Entry> |
getEntries()
Returns the map representing the entries associated with the corresponding aliases in the keystore
|
java.security.KeyStore.Entry |
getEntry(java.lang.String alias)
Returns the entry object specified by the provided alias
|
java.util.List<javax.net.ssl.KeyManager> |
getKeyManagers(java.lang.String algorithm)
Returns one key manager for each type of key material.
|
java.security.KeyStore |
getKeyStore()
Returns the managed
KeyStore |
void |
setEntry(java.lang.String alias,
java.security.KeyStore.Entry entry)
Stores the specified entry with the defined alias to the managed keystore
|
java.security.KeyStore getKeyStore() throws KuraException
KeyStore
KuraException
- when the keystore does not exist or cannot be loadedjava.security.KeyStore.Entry getEntry(java.lang.String alias) throws KuraException
alias
- KuraException
java.lang.IllegalArgumentException
- if the specified alias is nullvoid setEntry(java.lang.String alias, java.security.KeyStore.Entry entry) throws KuraException
alias
- entry
- KuraException
- if the entry could not be set or the keystore could not be persistedjava.lang.IllegalArgumentException
- if one of the arguments is nulljava.util.Map<java.lang.String,java.security.KeyStore.Entry> getEntries() throws KuraException
KuraException
- if the entries could not be retrievedvoid deleteEntry(java.lang.String alias) throws KuraException
alias
- KuraException
- if the entry could not be deleted or the managed keystore could not be persisted after the changejava.lang.IllegalArgumentException
- if the specified alias is nulljava.util.List<javax.net.ssl.KeyManager> getKeyManagers(java.lang.String algorithm) throws KuraException
algorithm
- KuraException
- if the provided algorithm is not supported or does not exist or if the associated keystore cannot be
accessedjava.lang.IllegalArgumentException
- if the algorithm is nullvoid createKeyPair(java.lang.String alias, java.lang.String algorithm, int keySize, java.lang.String signatureAlgorithm, java.lang.String attributes) throws KuraException
alias
- algorithm
- keySize
- signatureAlgorithm
- attributes
- KuraException
- if the keypair cannot be created or the keypair cannot be added to the managed keystorejava.lang.IllegalArgumentException
- if one of the arguments is null or emptyvoid createKeyPair(java.lang.String alias, java.lang.String algorithm, int keySize, java.lang.String signatureAlgorithm, java.lang.String attributes, java.security.SecureRandom secureRandom) throws KuraException
alias
- algorithm
- keySize
- signatureAlgorithm
- attributes
- secureRandom
- KuraException
- if the keypair cannot be created or the keypair cannot be added to the managed keystorejava.lang.IllegalArgumentException
- if one of the arguments is null or emptyjava.lang.String getCSR(java.security.KeyPair keyPair, javax.security.auth.x500.X500Principal principal, java.lang.String signerAlg) throws KuraException
keyPair
- principal
- signerAlg
- KuraException
- if the CSR cannot be computed or if it cannot be encodedjava.lang.IllegalArgumentException
- if one of the arguments is null or emptyjava.lang.String getCSR(java.lang.String alias, javax.security.auth.x500.X500Principal principal, java.lang.String signerAlg) throws KuraException
alias
- principal
- signerAlg
- KuraException
- if the alias does not correspond to a managed entry of the keystore, it refers to an entry that
cannot be used to obtain a CSR or the CSR cannot be computed or encodedjava.lang.IllegalArgumentException
- if one of the arguments is null or emptyjava.util.List<java.lang.String> getAliases() throws KuraException
KuraException
- if the list of aliases cannot be retrievedjava.util.Collection<java.security.cert.CRL> getCRLs() throws KuraException
KuraException
- if the list cannot be retrievedjava.security.cert.CertStore getCRLStore() throws KuraException
CertStore
containing the cached CRLs.CertStore
containing the cached CRLs.KuraException
- if the CertStore
cannot be created.