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.LocationNested classes/interfaces inherited from interface aQute.service.reporter.Reporter
aQute.service.reporter.Reporter.SetLocation -
Field Summary
Fields inherited from class aQute.bnd.url.DefaultURLConnectionHandler
registryFields 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 voidgetCertificates(String paths, List<X509Certificate> certificates) voidhandle(URLConnection connection) Ensure Https verification is disabled or matches given certificatesvoidsetProperties(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
-
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:
handlein interfaceURLConnectionHandler- Overrides:
handlein classDefaultURLConnectionHandler- Parameters:
connection- The connection to modify- Throws:
Exception
-
setProperties
Set the properties- Specified by:
setPropertiesin interfacePlugin- Overrides:
setPropertiesin 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:
CertificateExceptionIOException
-
toString
-