mg_tls_init EC private key too short #3376
-
Environment
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I don't see any of our examples or tutorials where we do or suggest something like that. |
Beta Was this translation helpful? Give feedback.
-
|
I did as you suggested and used only the server.pem from generate.sh and received the same failure and error message. I used openssl to verify the server.key is in fact 256bit EC (bits altered to post this safely) Why does the embedded TLS stack fail to read/recognize this as a valid key? |
Beta Was this translation helpful? Give feedback.
You are not feeding the key file, you are feeding a string with the file name. Please read the docs and do as the docs instruct; we do not do what you are doing in any of our examples or docs, and specifically, the doc I linked for you yesterday, has a section named "How-to-load-credentials" https://mongoose.ws/documentation/tutorials/tls/#how-to-load-credentials that shows how you have to do that,
thing that you're not doing properly
BTW, generate.sh does not create .pem but .crt files; you're free to change the name but please do not modify the generated files