Package eu.emi.security.authn.x509.proxy
Interface ProxyCertificate
-
- All Known Implementing Classes:
ProxyCertificateImpl
public interface ProxyCertificate
Wraps information about a new proxy which was generated by theProxyGenerator
.- Author:
- K. Benedyczak
- See Also:
ProxyGenerator
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.security.cert.X509Certificate[]
getCertificateChain()
Returns the certificate chain of the proxy.X509Credential
getCredential()
Returns the X509Credential wrapping the generated private key and proxy certificate.java.security.PrivateKey
getPrivateKey()
Returns the generated private key of this proxy.boolean
hasPrivateKey()
-
-
-
Method Detail
-
getCertificateChain
java.security.cert.X509Certificate[] getCertificateChain()
Returns the certificate chain of the proxy.- Returns:
- the Certificate chain starting with the generated proxy certificate.
-
getPrivateKey
java.security.PrivateKey getPrivateKey() throws java.lang.IllegalStateException
Returns the generated private key of this proxy. If public key was manually set an exception is thrown.- Returns:
- The private key.
- Throws:
java.lang.IllegalStateException
- if the private and public keys were not generated
-
getCredential
X509Credential getCredential() throws java.lang.IllegalStateException
Returns the X509Credential wrapping the generated private key and proxy certificate. This method is useful if KeyStore or KeyManager with the newly generated proxy certificate is needed.- Returns:
- The generated credential wrapped in
X509Credential
- Throws:
java.lang.IllegalStateException
- if the private and public keys were not generated
-
hasPrivateKey
boolean hasPrivateKey()
- Returns:
- true if private key was generated and is available through
getPrivateKey()
andgetCredential()
-
-