setup: Added script for cert generation

Copied commands from README.md without the unused
pkcs export
This commit is contained in:
MDE
2020-01-11 21:21:20 +01:00
committed by Shin'ichiro Kawasaki
parent e9dc711f83
commit 58c4959454

6
gencert.sh Executable file
View File

@@ -0,0 +1,6 @@
openssl req -x509 -out scratch-device-manager.cer \
-keyout scratch-device-manager.key -newkey rsa:2048 -nodes -sha256 \
-subj '/CN=scratch-device-manager' -extensions EXT -config <( \
printf "[dn]\nCN=localhost\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName=DNS:localhost\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth")
grep -h ^ scratch-device-manager.cer scratch-device-manager.key \
| tr -d '\r' > scratch-device-manager.pem