- Refer https://www.baeldung.com/openssl-self-signed-cert to create a
key
andcrt
for the Mock Server - Copy the
key
andcrt
file to the server directory and update thecertFile
andkeyFile
parameters in themain.bal
with the paths. - Extract public cert of client (wso2carbon cert from wso2carbon.jks) and copy it to the server directory.
- Update
cert
parameter inmain.bal
file with the client crt path.
Run the server using
bal run /<root_path>/mtls-mock-server -- -Cballerina.http.traceLogConsole=true
to enable HTTP logs if necessary.
- Copy the IS keystore and truststore to the client root directory.
- Refer https://access.redhat.com/documentation/en-us/red_hat_jboss_data_virtualization/6.2/html/security_guide/extract_a_self-signed_certificate_from_the_keystore to extract the crt with alias
wso2carbon
. Use this crt in the server setup. - Import the Server crt to the truststore
Run the client with VM options
-Djavax.net.debug=ssl:handshake
to enable SSL handshake logs.