java.lang.Object
net.i2p.util.SSLEepGet.SavingTrustManager
- All Implemented Interfaces:
TrustManager, X509TrustManager
- Enclosing class:
SSLEepGet
From http://blogs.sun.com/andreas/resource/InstallCert.java This just saves the certificate chain for later inspection.
Field Summary
FieldsModifier and TypeFieldDescriptionprivate X509Certificate[]The certificate chain received from the peer.private final X509TrustManagerThe trust manager this one delegates to.Constructor Summary
ConstructorsConstructorDescriptionWraps the trust manager to save the chain.Method Summary
All MethodsModifier and TypeMethodDescriptionvoidcheckClientTrusted(X509Certificate[] chain, String authType) Reject all client certificates.voidcheckServerTrusted(X509Certificate[] chain, String authType) Save the presented chain, delegating to the wrapped trust manager.Issuers accepted by the wrapped trust manager.
Field Details
tm
The trust manager this one delegates to.chain
The certificate chain received from the peer.
Constructor Details
SavingTrustManager
SavingTrustManager(X509TrustManager tm) Wraps the trust manager to save the chain.- Parameters:
tm- the trust manager to delegate to
Method Details
getAcceptedIssuers
Issuers accepted by the wrapped trust manager.- Specified by:
getAcceptedIssuersin interfaceX509TrustManager- Returns:
- the accepted issuers
checkClientTrusted
public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException Reject all client certificates.- Specified by:
checkClientTrustedin interfaceX509TrustManager- Throws:
CertificateException
checkServerTrusted
public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException Save the presented chain, delegating to the wrapped trust manager.- Specified by:
checkServerTrustedin interfaceX509TrustManager- Throws:
CertificateException