ehsbe CommonsTM
Version 1.1.0rc3

com.ehsbe.commons.util
Interface InvalidCertHandler

All Known Implementing Classes:
JxInvalidCertHandler

public interface InvalidCertHandler

A handler, which might get attached to a LocalTrustManager to accept e.g. SSL connections with provided a certificate path, whoms validation failed.

Version:
$Revision: 440 $
Author:
Jens Elkner

Method Summary
 boolean accept(X509Certificate[] chain, CertificateException ex)
          Handles the invalid certificate chain and corresponding exception.
 

Method Detail

accept

boolean accept(X509Certificate[] chain,
               CertificateException ex)
               throws CertificateException
Handles the invalid certificate chain and corresponding exception.

Parameters:
chain - certificate chain, which could not be validated.
ex - exception thrown during validation.
Returns:
true if the calling trust manager entity should add the first certificate in the chain (aka client or server certificate) to its trusted certificate list.
Throws:
CertificateException - if the chain should be treated as invalid. In this case one should re-throw the given exception.

ehsbe CommonsTM
Version 1.1.0rc3

Copyright ©2005-2009 EHSBE, Walther-Rathenau-Str. 58, 39104 Magdeburg, Sachsen-Anhalt, Germany. All Rights Reserved.