public class HttpsVerification extends DefaultURLConnectionHandler
| Modifier and Type | Class and Description |
|---|---|
(package private) static interface |
HttpsVerification.Config |
Reporter.SetLocationReport.Location| Modifier and Type | Field and Description |
|---|---|
private java.security.cert.X509Certificate[] |
certificateChain |
private java.lang.String |
certificatesPath |
private javax.net.ssl.SSLSocketFactory |
factory |
private javax.net.ssl.HostnameVerifier |
verifier |
private boolean |
verify |
registryMATCH| Constructor and Description |
|---|
HttpsVerification() |
HttpsVerification(java.lang.String certificates,
boolean hostnameVerify,
Reporter reporter) |
HttpsVerification(java.security.cert.X509Certificate[] certificateChain,
boolean b,
Reporter hc) |
| Modifier and Type | Method and Description |
|---|---|
(package private) java.util.List<java.security.cert.X509Certificate> |
createCertificates(java.lang.String paths) |
(package private) javax.net.ssl.X509TrustManager |
getTrustManager(java.security.cert.X509Certificate[] trusted) |
void |
handle(java.net.URLConnection connection)
Ensure Https verification is disabled or matches given certificates
|
private void |
init()
Initialize the SSL Context, factory and verifier.
|
void |
setProperties(java.util.Map<java.lang.String,java.lang.String> map)
Set the properties
|
java.lang.String |
toString() |
error, exception, getErrors, getLocation, getWarnings, isOk, isPedantic, matches, matches, progress, setRegistry, setReporter, trace, warningprivate javax.net.ssl.SSLSocketFactory factory
private javax.net.ssl.HostnameVerifier verifier
private boolean verify
private java.lang.String certificatesPath
private java.security.cert.X509Certificate[] certificateChain
public HttpsVerification()
public HttpsVerification(java.lang.String certificates,
boolean hostnameVerify,
Reporter reporter)
public HttpsVerification(java.security.cert.X509Certificate[] certificateChain,
boolean b,
Reporter hc)
private void init()
throws java.security.NoSuchAlgorithmException,
java.security.KeyManagementException,
java.io.FileNotFoundException,
java.security.cert.CertificateException,
java.io.IOException
java.security.NoSuchAlgorithmExceptionjava.security.KeyManagementExceptionjava.io.IOExceptionjava.security.cert.CertificateExceptionjava.io.FileNotFoundExceptionjavax.net.ssl.X509TrustManager getTrustManager(java.security.cert.X509Certificate[] trusted)
public void handle(java.net.URLConnection connection)
throws java.lang.Exception
handle in interface URLConnectionHandlerhandle in class DefaultURLConnectionHandlerconnection - The connection to modifyjava.lang.Exceptionpublic void setProperties(java.util.Map<java.lang.String,java.lang.String> map)
throws java.lang.Exception
setProperties in interface PluginsetProperties in class DefaultURLConnectionHandlermap - attributes and directives for this plugin's clausejava.lang.Exceptionjava.util.List<java.security.cert.X509Certificate> createCertificates(java.lang.String paths)
throws java.io.FileNotFoundException,
java.security.cert.CertificateException,
java.io.IOException
java.io.FileNotFoundExceptionjava.security.cert.CertificateExceptionjava.io.IOExceptionpublic java.lang.String toString()
toString in class java.lang.Object