eduardsui / tlse

Single C file TLS 1.2/1.3 implementation, using tomcrypt as crypto library
Other
535 stars 87 forks source link

Examples expects testcert folder. #74

Closed Velho closed 1 year ago

Velho commented 1 year ago

load_keys(server_context, "testcert/fullchain.pem", "testcert/privkey.pem");

What is the required format for the private key?

eduardsui commented 1 year ago

Hello,

X509 in PEM format should work (for example letsencrypt certificate). You can use openssl to generate a self-signed certificate:

openssl req -x509 -newkey rsa:4096 -keyout privkey.pem -out fullchain.pem -sha256 -days 365 -subj "/C=US/ST=Oregon/L=Portland/O=Company Name/OU=Org/CN=www.example.com" (copied and pasted from stackoverflow, not 100% sure about the syntax)