I am new to working with openSSL and cert do's and dont's.
Within my sink file I am making use of SecurityContext to force HTTPs:
@override
SecurityContext get securityContext {
return new SecurityContext()
..usePrivateKey("SSL/key.pem", password: keypassword)
..useCertificateChain("SSL/cert.pem", password: certpassword);
}
I am developing locally and created the self signed key and cert using OpenSSL. When running the application via aqueduct serve, I have no issues (other than confirming with the respective browser that I am aware that the certificate is not CA signed) but when running my tests I receive the following error:
HandshakeException: Handshake error in client (OS Error:
CERTIFICATE_VERIFY_FAILED: self signed certificate(ssl_cert.c:345))
Does this mean that I need to be using a CA signed certificate to avoid this?