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
Version:
1.00
Author:
Christoph Schwering <schwering@gmail.com>
See Also:
SSLIRCConnection, SSLDefaultTrustManager

Method Summary
 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

public 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

public 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.