uk.ac.soton.itinnovation.grid.comms.client
Class InteractiveX509TrustManager
java.lang.Object
uk.ac.soton.itinnovation.grid.comms.client.InteractiveX509TrustManager
- All Implemented Interfaces:
- TrustManager, X509TrustManager
public class InteractiveX509TrustManager
- extends Object
- implements X509TrustManager
Trust manager that asks the user if a certificate isn't trusted using the configured
UserInputHandler.
This is somewhat badly named, because it is now also used for services, where the UserInputHandler
is non-interactive but still needs to be called.
- See Also:
ImplementationFactory,
UserInputHandler.queryUnknownCertificate(java.security.cert.X509Certificate[])
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InteractiveX509TrustManager
public InteractiveX509TrustManager(X509TrustManager parent)
checkClientTrusted
public void checkClientTrusted(X509Certificate[] chain,
String authType)
throws CertificateException
- Specified by:
checkClientTrusted in interface X509TrustManager
- Throws:
CertificateException
checkServerTrusted
public void checkServerTrusted(X509Certificate[] chain,
String authType)
throws CertificateException
- Specified by:
checkServerTrusted in interface X509TrustManager
- Throws:
CertificateException
isCertificateTrusted
public static boolean isCertificateTrusted(X509Certificate[] chain)
- Check with user whether to trust a certificate.
If the user has already given an answer, we give the same answer again.
If the user cancels, we reject this check but ask again next time.
- Parameters:
chain - the chain (if available) or single certificate to check
- Returns:
- whether the certificate should be trusted
getAcceptedIssuers
public X509Certificate[] getAcceptedIssuers()
- Specified by:
getAcceptedIssuers in interface X509TrustManager
Copyright © 2001-2007 University of Southampton IT Innovation Centre. All Rights Reserved.