Skip to content

https for embedded use case (certificates) #228

Answered by babelouest
nicolasb565 asked this question in Q&A
Discussion options

You must be logged in to vote

Hello,

For tests purpose, you can generate a self-signed certificate using openssl (see example) or GnuTLS' certtool:

$ # example with openssl
$ openssl req -x509 -newkey rsa:4096 -sha256 -days 3650 -nodes \
  -keyout localhost.key -out localhost.crt -subj "/CN=localhost"
$
$ # example with certtool
$ certtool --generate-privkey --outfile localhost.key --sec-param High
$ certtool --generate-self-signed --load-privkey localhost.key --outfile localhost.crt

Then, you can use the content of the files localhost.key and localhost.crt as parameters key_pem and cert_pem in the function ulfius_start_secure_framework:

const char key_pem[] =
"-----BEGIN RSA PRIVATE KEY-----\
MIIG4wIBAA[...]LolR+U2f7…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by babelouest
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