public class NaiveTrustManager extends Object implements X509TrustManager
| Modifier and Type | Method and Description |
|---|---|
void |
checkClientTrusted(X509Certificate[] chain,
String authType)
Checks wether the we trust the client.
|
void |
checkServerTrusted(X509Certificate[] chain,
String authType)
Checks wether the we trust the server, which we allways will.
|
X509Certificate[] |
getAcceptedIssuers()
Return an array of certificate authority certificates which are
trusted for authenticating peers.
|
static SocketFactory |
getSocketFactory()
Generate a socket factory with this trust manager.
|
public static SocketFactory getSocketFactory() throws NoSuchAlgorithmException, KeyManagementException, NoSuchProviderException, KeyStoreException, UnrecoverableKeyException, CertificateException, IOException
public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException
checkClientTrusted in interface X509TrustManagerchain - The client's certificate chainauthType - authorization type (e.g. "RSA" or "DHE_DSS")CertificateExceptionpublic void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException
checkServerTrusted in interface X509TrustManagerchain - The server's certificate chainauthType - authorization type (e.g. "RSA" or "DHE_DSS")CertificateExceptionpublic X509Certificate[] getAcceptedIssuers()
getAcceptedIssuers in interface X509TrustManagerCopyright © 2010-2015 Pivotal Software, Inc. All rights reserved.