Package org.ldaptive.ssl
Class AllowAnyHostnameVerifier
- java.lang.Object
-
- org.ldaptive.ssl.AllowAnyHostnameVerifier
-
- All Implemented Interfaces:
HostnameVerifier
,CertificateHostnameVerifier
public class AllowAnyHostnameVerifier extends Object implements HostnameVerifier, CertificateHostnameVerifier
Hostname verifier that returns true for any hostname. Use with caution.
-
-
Constructor Summary
Constructors Constructor Description AllowAnyHostnameVerifier()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
verify(String hostname, X509Certificate cert)
Verify the supplied hostname matches the supplied certificate.boolean
verify(String hostname, SSLSession session)
-
-
-
Method Detail
-
verify
public boolean verify(String hostname, SSLSession session)
- Specified by:
verify
in interfaceHostnameVerifier
-
verify
public boolean verify(String hostname, X509Certificate cert)
Description copied from interface:CertificateHostnameVerifier
Verify the supplied hostname matches the supplied certificate.- Specified by:
verify
in interfaceCertificateHostnameVerifier
- Parameters:
hostname
- to verifycert
- to verify hostname against- Returns:
- whether hostname is valid for the supplied certificate
-
-