Questions about HTTPS #239
-
Hi, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hello, I don't know why you have this error, since you didn't post a sample code, but the function If you only need https, you should use instead You have several resources on this project to help you:
Hope that will help you. |
Beta Was this translation helpful? Give feedback.
-
In the function 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 Something like: const char key_pem[] = "-----BEGIN PRIVATE KEY-----\n"
"MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDC2kwAziXUf33m\n"
"iqWp0yG6o259+nj7hpQLC4UT0Hmz0wmvreDJ/yNbSgOvsxvVdvzL2IaRZ+Gi5mo0\n"
"lswWvL6IGz7PZO0kXTq9sdBnNqMOx27HddV9e/2/p0MgibJTbgywY2Sk23QYhJpq\n"
//...
const char cert_pem[] = "-----BEGIN CERTIFICATE-----\n"
MIIH/TCCBeWgAwIBAgIQaBYE3/M08XHYCnNVmcFBcjANBgkqhkiG9w0BAQsFADBy\n"
MQswCQYDVQQGEwJVUzEOMAwGA1UECAwFVGV4YXMxEDAOBgNVBAcMB0hvdXN0b24x\n"
ETAPBgNVBAoMCFNTTCBDb3JwMS4wLAYDVQQDDCVTU0wuY29tIEVWIFNTTCBJbnRl\n"
// ...
ulfius_start_secure_framework(&instance, key_pem, cert_pem) The last parameter in the function |
Beta Was this translation helpful? Give feedback.
In the function
ulfius_start_secure_framework
, the parametersconst char * key_pem
andconst 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:
and then use the content of the files
key.pem
andcert.pem
as theulfius_start_secure_framework
parametersconst char * key_pem
andconst char * cert_pem
.Something like: