Package org.simpleframework.transport
Interface Certificate
-
- All Known Implementing Classes:
NegotiationState
,RequestCertificate
public interface Certificate
TheCertificate
interface represents the certificate that is sent by a client during a secure HTTPS conversation. This may or may not contain an X509 certificate chain from the client. If it does not aCertificateChallenge
may be used to issue a renegotiation of the connection. One completion of the renegotiation the challenge executes a completion operation.- See Also:
CertificateChallenge
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description javax.security.cert.X509Certificate[]
getChain()
This will return the X509 certificate chain, if any, that has been sent by the client.CertificateChallenge
getChallenge()
This returns a challenge for the certificate.boolean
isChainPresent()
This is used to determine if the X509 certificate chain is present for the request.
-
-
-
Method Detail
-
getChain
javax.security.cert.X509Certificate[] getChain() throws java.lang.Exception
This will return the X509 certificate chain, if any, that has been sent by the client. A certificate chain is typically only send when the server explicitly requests the certificate on the initial connection or when it is challenged for.- Returns:
- this returns the clients X509 certificate chain
- Throws:
java.lang.Exception
-
getChallenge
CertificateChallenge getChallenge() throws java.lang.Exception
This returns a challenge for the certificate. A challenge is issued by providing aRunnable
task which is to be executed when the challenge has completed. Typically this task should be used to drive completion of an HTTPS request.- Returns:
- this returns a challenge for the client certificate
- Throws:
java.lang.Exception
-
isChainPresent
boolean isChainPresent() throws java.lang.Exception
This is used to determine if the X509 certificate chain is present for the request. If it is not present then a challenge can be used to request the certificate.- Returns:
- true if the certificate chain is present
- Throws:
java.lang.Exception
-
-