Package eu.emi.security.authn.x509
Interface X509Credential
-
- All Known Implementing Classes:
AbstractDelegatingX509Credential
,AbstractX509Credential
,DERCredential
,KeyAndCertCredential
,KeystoreCredential
,PEMCredential
public interface X509Credential
Implementations are used to wrap credentials (private key and certificate) in various formats. Methods allow for converting the wrapped credentials into the format usable by the Java API.- Author:
- K. Benedyczak
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.security.cert.X509Certificate
getCertificate()
Helper method to get certificate from the underlying keystorejava.security.cert.X509Certificate[]
getCertificateChain()
Helper method to get certificate chain from the underlying keystorejava.security.PrivateKey
getKey()
Helper method to get private key from the underlying keystorejava.lang.String
getKeyAlias()
Returns an alias which can be used to obtain the PrivateKey entry from the KeyStore returned by thegetKeyStore()
method.javax.net.ssl.X509ExtendedKeyManager
getKeyManager()
Returns a KeyManager which accompanies the KeyStore.char[]
getKeyPassword()
Returns a password which can be used to obtain PrivateKey entry from the KeyStore returned by thegetKeyStore()
method, with the alias returned by thegetKeyAlias()
method.java.security.KeyStore
getKeyStore()
Returns the credential in a keystore.java.lang.String
getSubjectName()
-
-
-
Method Detail
-
getKeyStore
java.security.KeyStore getKeyStore()
Returns the credential in a keystore.- Returns:
- the KeyStore
-
getKeyManager
javax.net.ssl.X509ExtendedKeyManager getKeyManager()
Returns a KeyManager which accompanies the KeyStore.- Returns:
- the KeyManager
-
getKeyPassword
char[] getKeyPassword()
Returns a password which can be used to obtain PrivateKey entry from the KeyStore returned by thegetKeyStore()
method, with the alias returned by thegetKeyAlias()
method.- Returns:
- key password
-
getKeyAlias
java.lang.String getKeyAlias()
Returns an alias which can be used to obtain the PrivateKey entry from the KeyStore returned by thegetKeyStore()
method.- Returns:
- key alias
-
getKey
java.security.PrivateKey getKey()
Helper method to get private key from the underlying keystore- Returns:
- private key
-
getCertificate
java.security.cert.X509Certificate getCertificate()
Helper method to get certificate from the underlying keystore- Returns:
- certificate
-
getCertificateChain
java.security.cert.X509Certificate[] getCertificateChain()
Helper method to get certificate chain from the underlying keystore- Returns:
- certificate chain
-
getSubjectName
java.lang.String getSubjectName()
- Returns:
- RFC 2253 distinguished name of the certificate subject
- Since:
- 1.1.0
-
-