Package org.ldaptive.ssl
Class HostnameVerifierAdapter
- java.lang.Object
-
- org.ldaptive.ssl.HostnameVerifierAdapter
-
- All Implemented Interfaces:
HostnameVerifier
public class HostnameVerifierAdapter extends Object implements HostnameVerifier
Adapts aCertificateHostnameVerifier
for use as aHostnameVerifier
. This component can only be used with a verified SSL session as it accesses the certificate fromSSLSession.getPeerCertificates()
.
-
-
Field Summary
Fields Modifier and Type Field Description private CertificateHostnameVerifier
hostnameVerifier
Hostname verifier to adapt.protected Logger
logger
Logger for this class.
-
Constructor Summary
Constructors Constructor Description HostnameVerifierAdapter(CertificateHostnameVerifier verifier)
Creates a new hostname verifier adapter.
-
-
-
Field Detail
-
logger
protected final Logger logger
Logger for this class.
-
hostnameVerifier
private final CertificateHostnameVerifier hostnameVerifier
Hostname verifier to adapt.
-
-
Constructor Detail
-
HostnameVerifierAdapter
public HostnameVerifierAdapter(CertificateHostnameVerifier verifier)
Creates a new hostname verifier adapter.- Parameters:
verifier
- verifier to adapt
-
-
Method Detail
-
verify
public boolean verify(String hostname, SSLSession session)
- Specified by:
verify
in interfaceHostnameVerifier
-
-