Class SigningKeyCache.Item
- java.lang.Object
-
- com.axis.jenkins.plugins.eiffel.eiffelbroadcaster.signing.SigningKeyCache.Item
-
- Enclosing class:
- SigningKeyCache
public static class SigningKeyCache.Item extends Object
An immutable cache item, containing a signing key, the associated identity, and the time when the data was extracted from theKeyStore
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getIdentity()
PrivateKey
getKey()
boolean
hasExpired()
-
-
-
Constructor Detail
-
Item
public Item(@NonNull com.cloudbees.plugins.credentials.common.CertificateCredentials cred) throws InvalidCertificateConfigurationException, KeyStoreException, NoSuchAlgorithmException, UnrecoverableKeyException
Creates a new Item by extracting the private key and identity from the first certificate and key found in the givenKeyStore
of the given credential.- Parameters:
cred
- theCertificateCredentials
from which to extract the key and identity- Throws:
InvalidCertificateConfigurationException
- if theKeyStore
was entirely empty or its first item didn't contain a certificate with a private keyKeyStoreException
- if theKeyStore
hasn't been initializedNoSuchAlgorithmException
- if the algorithm needed to decrypt the key isn't availableUnrecoverableKeyException
- if the key couldn't be decrypted, e.g. because the password is wrong
-
-
Method Detail
-
getIdentity
@NonNull public String getIdentity()
-
getKey
@NonNull public PrivateKey getKey()
-
hasExpired
public boolean hasExpired()
-
-