Package aQute.bnd.url
Class HttpsVerification
java.lang.Object
aQute.bnd.url.DefaultURLConnectionHandler
aQute.bnd.url.HttpsVerification
- All Implemented Interfaces:
Plugin
,RegistryPlugin
,URLConnectionHandler
,aQute.service.reporter.Report
,aQute.service.reporter.Reporter
TODO Needs testing Can be used to override default verification of HTTPS.
-
Nested Class Summary
Nested classes/interfaces inherited from interface aQute.service.reporter.Report
aQute.service.reporter.Report.Location
Nested classes/interfaces inherited from interface aQute.service.reporter.Reporter
aQute.service.reporter.Reporter.SetLocation
-
Field Summary
Fields inherited from class aQute.bnd.url.DefaultURLConnectionHandler
registry
Fields inherited from interface aQute.bnd.service.url.URLConnectionHandler
MATCH
-
Constructor Summary
ConstructorsConstructorDescriptionHttpsVerification
(String certificates, boolean hostnameVerify, aQute.service.reporter.Reporter reporter) HttpsVerification
(X509Certificate[] certificateChain, boolean b, aQute.service.reporter.Reporter hc) -
Method Summary
Modifier and TypeMethodDescriptionstatic void
getCertificates
(String paths, List<X509Certificate> certificates) void
handle
(URLConnection connection) Ensure Https verification is disabled or matches given certificatesvoid
setProperties
(Map<String, String> map) Set the propertiestoString()
Methods inherited from class aQute.bnd.url.DefaultURLConnectionHandler
addMatcher, error, exception, getErrors, getLocation, getWarnings, isOk, isPedantic, matches, matches, progress, setRegistry, setReporter, trace, warning
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface aQute.bnd.service.url.URLConnectionHandler
maxConcurrentConnections
-
Constructor Details
-
HttpsVerification
public HttpsVerification() -
HttpsVerification
public HttpsVerification(String certificates, boolean hostnameVerify, aQute.service.reporter.Reporter reporter) -
HttpsVerification
public HttpsVerification(X509Certificate[] certificateChain, boolean b, aQute.service.reporter.Reporter hc)
-
-
Method Details
-
handle
Ensure Https verification is disabled or matches given certificates- Specified by:
handle
in interfaceURLConnectionHandler
- Overrides:
handle
in classDefaultURLConnectionHandler
- Parameters:
connection
- The connection to modify- Throws:
Exception
-
setProperties
Set the properties- Specified by:
setProperties
in interfacePlugin
- Overrides:
setProperties
in classDefaultURLConnectionHandler
- Parameters:
map
- attributes and directives for this plugin's clause- Throws:
Exception
-
getCertificates
public static void getCertificates(String paths, List<X509Certificate> certificates) throws CertificateException, IOException - Throws:
CertificateException
IOException
-
toString
-