org.schwering.irc.lib.ssl.SSLDefaultTrustManager
.public class SSLDefaultTrustManager
extends java.lang.Object
implements com.sun.net.ssl.X509TrustManager
TrustManager
of the
SSLIRCConnection
.
Note that this class is deprecated. The SSL supporting classes moved
to org.schwering.irc.lib.ssl
since IRClib 1.10.
It automatically accepts the X509 certificate.
In many cases you should change the SSLIRCConnection
's
TrustManager
. For examle if you write an IRC client for human
users, you may want to ask the user whether he accepts the server's
certificate or not. You could do this by a new class which extends the
SSLDefaultTrustManager
class and overrides the
checkServerTrusted
method and asks the user whether he wants to
accept the certification or not.
SSLIRCConnection
,
TrustManager
Modifier and Type | Field and Description |
---|---|
protected java.security.cert.X509Certificate[] |
accepted
Deprecated.
The
X509Certificate s which are accepted. |
Constructor and Description |
---|
SSLDefaultTrustManager()
Deprecated.
Creates a new instance of the
SSLDefaultTrustManager class. |
Modifier and Type | Method and Description |
---|---|
java.security.cert.X509Certificate[] |
getAcceptedIssuers()
Deprecated.
Returns the accepted certificates.
|
boolean |
isClientTrusted(java.security.cert.X509Certificate[] chain)
Deprecated.
Does nothing.
|
boolean |
isServerTrusted(java.security.cert.X509Certificate[] chain)
Deprecated.
Invoked when the client should check whether he trusts the server or not.
|
protected java.security.cert.X509Certificate[] accepted
X509Certificate
s which are accepted.public SSLDefaultTrustManager()
SSLDefaultTrustManager
class.public final boolean isClientTrusted(java.security.cert.X509Certificate[] chain)
isClientTrusted
in interface com.sun.net.ssl.X509TrustManager
chain
- The peer certificate chain.false
.public boolean isServerTrusted(java.security.cert.X509Certificate[] chain)
isServerTrusted
in interface com.sun.net.ssl.X509TrustManager
chain
- The peer certificate chain.true
.public java.security.cert.X509Certificate[] getAcceptedIssuers()
checkServerTrusted
method.getAcceptedIssuers
in interface com.sun.net.ssl.X509TrustManager