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
public class HttpsVerification extends DefaultURLConnectionHandler
TODO Needs testing Can be used to override default verification of HTTPS.
-
-
Field Summary
-
Fields inherited from class aQute.bnd.url.DefaultURLConnectionHandler
registry
-
Fields inherited from interface aQute.bnd.service.url.URLConnectionHandler
MATCH
-
-
Constructor Summary
Constructors Constructor Description HttpsVerification()
HttpsVerification(java.lang.String certificates, boolean hostnameVerify, aQute.service.reporter.Reporter reporter)
HttpsVerification(java.security.cert.X509Certificate[] certificateChain, boolean b, aQute.service.reporter.Reporter hc)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
getCertificates(java.lang.String paths, java.util.List<java.security.cert.X509Certificate> certificates)
void
handle(java.net.URLConnection connection)
Ensure Https verification is disabled or matches given certificatesvoid
setProperties(java.util.Map<java.lang.String,java.lang.String> map)
Set the propertiesjava.lang.String
toString()
-
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 Detail
-
HttpsVerification
public HttpsVerification()
-
HttpsVerification
public HttpsVerification(java.lang.String certificates, boolean hostnameVerify, aQute.service.reporter.Reporter reporter)
-
HttpsVerification
public HttpsVerification(java.security.cert.X509Certificate[] certificateChain, boolean b, aQute.service.reporter.Reporter hc)
-
-
Method Detail
-
handle
public void handle(java.net.URLConnection connection) throws java.lang.Exception
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:
java.lang.Exception
-
setProperties
public void setProperties(java.util.Map<java.lang.String,java.lang.String> map) throws java.lang.Exception
Set the properties- Specified by:
setProperties
in interfacePlugin
- Overrides:
setProperties
in classDefaultURLConnectionHandler
- Parameters:
map
- attributes and directives for this plugin's clause- Throws:
java.lang.Exception
-
getCertificates
public static void getCertificates(java.lang.String paths, java.util.List<java.security.cert.X509Certificate> certificates) throws java.security.cert.CertificateException, java.io.IOException
- Throws:
java.security.cert.CertificateException
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-