generate root cert auth private key
openssl genrsa -out rootCA.key 2048
openssl req does the folloing:
This command primarily creates and processes certificate requests (CSRs) in PKCS#10 format. It can additionally create self-signed certificates for use as root CAs for example.
This command creates the root CA cert
openssl req -x509 -new -nodes -key rootCA.key -sha256 -days 365 -out rootCA.pem
generate device private key
openssl genrsa -out device.key 2048
Then, generate a certificate signing request.
openssl req -new -key device.key -out device.csr
note: i used localhost for common name and it worked fine note: challege password = 3579640978
sign the CSR with the device private key. the csr already has been signed with the device private key
openssl x509 -req -in device.csr -CA rootCA.pem -CAkey rootCA.key -CAcreateserial -out device.crt -days 364 -sha256
https://gist.github.com/marshalhayes/ca9508f97d673b6fb73ba64a67b76ce8 https://datacenteroverlords.com/2012/03/01/creating-your-own-ssl-certificate-authority/