I plan to connect via HTTPS to a server using the Innovation HTTP Client.
I need to be able to accept all server SSL certificates.
There are some examples using HttpsURLConnection, but I need to use the Innovation implementation.
Does anyone have any examples for Innovation HTTP Client?
Innovation HTTPClient doesn’t directly support HTTPS. See this page on the Innovation website for more information. There are a number of 3rd party patches and examples listed there which you can implement. Setting certificate acceptance depends on the patch implementation you choose.
EDIT / UPDATE
Note that
JSSE SSLimplementation is being used and the intent is to define aTrustedManagerand bind it viaSSLContexttoHTTPConnection.Assuming you know how to create a
TrustManager, the following code is co-opted from this Stackoverflow page, which also shows how to generate one.Per the README file I got from the JSSE SSL download off the Innovation website link from earlier, you can assign it to the HTTPConnection by doing this: