Stunnel
openssl How To
The client private key and certificate, defined below, was generated using these two instructions:
openssl req -new -x509 -sha256 -newkey rsa:4096 -keyout client-key.pem -out client-cert.pem -days 3650 -nodes
...
cat client-key.pem client-cert.pem > client-keycert.pem
client-keycert.pem
-----BEGIN PRIVATE KEY-----
MIIJQwIBADANBgkqhkiG9w0BAQEFAASCCS0wggkpAgEAAoICAQCUjZeCnQE+6ZiI
2CyXPYGWAIZV4GwsN262g5f95svDgJGSTiyPC4u/DvE6npR9VrWrPGcgiWbC86R1
mMwIqz5fERpNhSeGXDF3VMeEegXhrEO2qT0RcILMOmW/SZybkEuGIPp2etnbpGU3
cOpQCww0crHNwyvDxVX8CjtgFgFi6oXOhV7lR4PqWCkkdd8tki6mMOwGMeSoybk/
p/j1gqc++VOCPphvWFqQPO+5BHsDdN7uxdz3RGbf9An1fahwMTUdBpQpQmx6lwgQ
C+okQ2mXK9gS/TpToB8X/Gfr8YA+VkWtz1M69JFKhqODjjMUhPpLurtMMYZQgTmU
WkvU2NcPPykj7m5IthH3HVOvkf5jLHQ9I/osrrtP3lLzg/4TOR4coNPWjQIobdzM
huBhVQSlSrBH2+NJAlcuhI/fLoWJpUrrZTjxN6Xz1CWFavAxEv+BYsciGudNe4pR
VVp41wjGeIr6jMN9TZdghwZpETRkbbMGW0pjRSgYTSh8ly58ZFCaqQZWkPSPgHrh
+5RXnxqfzRyd/YcY5vADX4A4bh8lSgbRTAqFLbPGmUll6wZ4NSW8fCUvyJf1sd/r
/qIWXvzXHCEwGJpVNLKVi0k2XO6EoyBA8bT5uzDPK37vakrvyvamgAOZFr5zvXMn
ARgoJ8gr8wSLbMFPxUewvDtKdBKLmQIDAQABAoICAAD1dP/j0Yk9ar2fX5JOVFLK
iBNv0mLqrK1C5i0+WxxU7Rubo4/8zBccmpP9SAoTEDMdvbCpEl+5wNr9dHut10Y3
zwqnDF1CpRMXGf6R5w3Q1dMM/pbpOf7ldZipefhLEyG3fsZa/qL7Saf08542pAqG
nv0sAFFQKcDps/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