zombie.chat
Class IRCClient.TrustManager

java.lang.Object
  extended by zombie.chat.IRCClient.TrustManager
All Implemented Interfaces:
org.schwering.irc.lib.ssl.SSLTrustManager
Enclosing class:
IRCClient

public class IRCClient.TrustManager
extends java.lang.Object
implements org.schwering.irc.lib.ssl.SSLTrustManager


Constructor Summary
IRCClient.TrustManager()
           
 
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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IRCClient.TrustManager

public IRCClient.TrustManager()
Method Detail

getAcceptedIssuers

public java.security.cert.X509Certificate[] getAcceptedIssuers()
Description copied from interface: org.schwering.irc.lib.ssl.SSLTrustManager
Return an array of certificate authority certificates which are trusted for authenticating peers.

Specified by:
getAcceptedIssuers in interface org.schwering.irc.lib.ssl.SSLTrustManager
Returns:
A non-null (possibly empty) array of acceptable CA issuer certificates.

isTrusted

public boolean isTrusted(java.security.cert.X509Certificate[] chain)
Description copied from interface: org.schwering.irc.lib.ssl.SSLTrustManager
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.

Specified by:
isTrusted in interface org.schwering.irc.lib.ssl.SSLTrustManager
Parameters:
chain - The peer certificate chain.
Returns:
true if the server is trusted, false if the server is not trusted.