public class HttpsVerification extends DefaultURLConnectionHandler
Modifier and Type | Class and Description |
---|---|
(package private) static interface |
HttpsVerification.Config |
Reporter.SetLocation
Report.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 |
registry
MATCH
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, warning
private 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.NoSuchAlgorithmException
java.security.KeyManagementException
java.io.IOException
java.security.cert.CertificateException
java.io.FileNotFoundException
javax.net.ssl.X509TrustManager getTrustManager(java.security.cert.X509Certificate[] trusted)
public void handle(java.net.URLConnection connection) throws java.lang.Exception
handle
in interface URLConnectionHandler
handle
in class DefaultURLConnectionHandler
connection
- The connection to modifyjava.lang.Exception
public void setProperties(java.util.Map<java.lang.String,java.lang.String> map) throws java.lang.Exception
setProperties
in interface Plugin
setProperties
in class DefaultURLConnectionHandler
map
- attributes and directives for this plugin's clausejava.lang.Exception
java.util.List<java.security.cert.X509Certificate> createCertificates(java.lang.String paths) throws java.io.FileNotFoundException, java.security.cert.CertificateException, java.io.IOException
java.io.FileNotFoundException
java.security.cert.CertificateException
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object