Package org.schwering.irc.lib.ssl
Interface SSLTrustManager
-
- All Known Implementing Classes:
SSLDefaultTrustManager
public interface SSLTrustManager
A trust manager decides whether the server is trusted or not.- Since:
- 1.10
- See Also:
SSLIRCConnection
,SSLDefaultTrustManager
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.security.cert.X509Certificate[]
getAcceptedIssuers()
Return an array of certificate authority certificates which are trusted for authenticating peers.boolean
isTrusted(java.security.cert.X509Certificate[] chain)
Checks whether the server is trusted or not.
-
-
-
Method Detail
-
isTrusted
boolean isTrusted(java.security.cert.X509Certificate[] chain)
Checks whether the server is trusted or not.
Given the partial or complete certificate chain provided by the peer, build a certificate path to a trusted root and return true if it can be validated and is trusted for server SSL authentication.- Parameters:
chain
- The peer certificate chain.- Returns:
true
if the server is trusted,false
if the server is not trusted.
-
getAcceptedIssuers
java.security.cert.X509Certificate[] getAcceptedIssuers()
Return an array of certificate authority certificates which are trusted for authenticating peers.- Returns:
- A non-null (possibly empty) array of acceptable CA issuer certificates.
-
-