Snippets tagged “sslcontext”
3 snippets use this tag.
- Error - trustAnchors parameter must be non-emptyJava
The trustAnchors parameter must be non-empty error typically occurs when you are trying to create an instance of the SSLContext class in Java and you pass an empty trust store as the trustAnchors parameter.
- Java HTTPS client certificate authenticationJava
To perform HTTPS client certificate authentication in Java, you can use the HttpsURLConnection class and the SSLSocketFactory class.
- Trusting all certificates using HttpClient over HTTPSJava
To trust all certificates when using the Apache HttpClient library to make HTTPS requests, you can create a custom X509TrustManager implementation that trusts all certificates and use it to create an SSLContext with a custom TrustStrategy.