Topic: wolfSSL failed to load private key of self-generated cert
I created an issue ticket on GitHub, but I'm also asking it here.
Hi, I'm very new to wolfSSL, it's the most smooth experience I had with an SSL lib ever and thanks to wolfssl-examples
I want to use my own self-generated cert for my server, so I generated cert and private key with OpenSSL CLI util with
$ openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365
and when I try to use these generated files on my implementation, I'm getting the following error
ERROR: Failed to load ./key.pem, please check the file.
from wolfSSL_CTX_use_PrivateKey_file function. I'm not sure what goes wrong, Can someone help me with this?
I'm using wolfSSL Release 4.7.0
My code example is from https://github.com/wolfSSL/wolfssl-exam … rver-tls.c