public class SSLDNHostVerifier extends Object implements HostnameVerifier
Matching is done using Java regular expressions against the RFC1779 normalized DN. The regular expression is applied against the entire DN string, but the regular expression could be constructed to treat only a portion of it as relevant.
| Constructor and Description |
|---|
SSLDNHostVerifier(InstanceParams params)
Construct an SSLDNHostVerifier
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
peerMatches(SSLSession sslSession) |
static void |
validate(String regex)
Verify that the string is a valid pattern.
|
boolean |
verify(String targetHost,
SSLSession sslSession)
Checks whether an SSL connection has been made to the intended target.
|
public SSLDNHostVerifier(InstanceParams params)
params - The parameter for authentication creation. This class
requires a Java regular expression to be applied to the subject
common name.public boolean verify(String targetHost, SSLSession sslSession)
verify in interface HostnameVerifiertargetHost - the intended target of a network connection
This parameter is not used by this implementation.sslSession - the SSLSession that has been set up for the connectionpublic static void validate(String regex) throws IllegalArgumentException
IllegalArgumentException - if not a valid pattern.public boolean peerMatches(SSLSession sslSession)
Copyright © 2024. All rights reserved.