Package eu.emi.security.authn.x509.impl
Interface HostnameMismatchCallback2
-
- All Known Implementing Classes:
DisabledNameMismatchCallback
,EnforcingNameMismatchCallback
public interface HostnameMismatchCallback2
Implementation should react to the event when remote SSL peer's certificate is not matching its hostname.- Author:
- K. Benedyczak
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
nameMismatch(java.security.cert.X509Certificate peerCertificate, java.lang.String hostName)
This method is called whenever peer's host name is not matching the peer's certificate DN.
-
-
-
Method Detail
-
nameMismatch
void nameMismatch(java.security.cert.X509Certificate peerCertificate, java.lang.String hostName) throws java.security.cert.CertificateException
This method is called whenever peer's host name is not matching the peer's certificate DN. The method can log the problem/display a popup with a question what to do or simply can throw an exception indicating that the socket should be closed- Parameters:
peerCertificate
- peer's certificate (for convenience)hostName
- peer's host name (for convenience)- Throws:
java.security.cert.CertificateException
- if the error is considered fatal and the socket should be closed
-
-