uk.ac.soton.itinnovation.grid.comms.client
Class InteractiveX509TrustManager

java.lang.Object
  extended by uk.ac.soton.itinnovation.grid.comms.client.InteractiveX509TrustManager
All Implemented Interfaces:
CertificateTrustValidator

public class InteractiveX509TrustManager
extends Object
implements CertificateTrustValidator

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:
UserInputHandler.queryUnknownCertificate(java.security.cert.X509Certificate[])

Constructor Summary
InteractiveX509TrustManager(UserInputHandler userInputHandler)
           
 
Method Summary
 boolean isCertificateTrusted(X509Certificate[] chain)
          Check with user whether to trust a certificate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InteractiveX509TrustManager

public InteractiveX509TrustManager(UserInputHandler userInputHandler)
Method Detail

isCertificateTrusted

public 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.

Specified by:
isCertificateTrusted in interface CertificateTrustValidator
Parameters:
chain - the chain (if available) or single certificate to check
Returns:
whether the certificate should be trusted


Copyright © 2001-2008 University of Southampton IT Innovation Centre. All Rights Reserved.