Skip to content

Questions about HTTPS #239

Answered by babelouest
JaZzHT9 asked this question in Q&A
Sep 6, 2022 · 2 comments · 2 replies
Discussion options

You must be logged in to vote

In the function ulfius_start_secure_framework, the parameters const char * key_pem and const char * cert_pem must be on X509 PEM format,

With openssl for example, you can run the following command to generate a self-signed key/certificate pair using X509 PEM format:

$ openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 365

and then use the content of the files key.pem and cert.pem as the ulfius_start_secure_framework parameters const char * key_pem and const char * cert_pem.

Something like:

const char key_pem[] = "-----BEGIN PRIVATE KEY-----\n"
"MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDC2kwAziXUf33m\n"
"iqWp0yG6o259+nj7hpQLC4UT0Hmz0wmvreDJ/yNbSgOvsxvVd…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@JaZzHT9
Comment options

Comment options

You must be logged in to vote
1 reply
@JaZzHT9
Comment options

Answer selected by JaZzHT9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants