Skip to content
This repository has been archived by the owner on May 24, 2020. It is now read-only.

Latest commit

 

History

History
20 lines (13 loc) · 824 Bytes

SSLContext.md

File metadata and controls

20 lines (13 loc) · 824 Bytes

A Brief Guide to SSLContext

SSLContext

SSL Context is needed by the jdk.incubator.httpclient to connect to TLS. An SSL Context requires a JKS keystore that contains the credentials of the server. See SimpleSSLContext for an example.

If your server does not support JKS, you may have a private key and a certificate. These must be converted into a JKS.

This command converts a crt and private key to the p12 source format needed by a JKS

* openssl pkcs12 -export -in ca.crt -inkey ca.key -out server.p12 -name proxy -CAfile ca.crt -caname root

This command creates a new keystore from the p12 formatted source

keytool -importkeystore -deststorepass changeme -destkeypass changeme -destkeystore proxy.jks -srckeystore server.p12 -srcstoretype PKCS12 -srcstorepass changeme -alias proxy