Added simple script to create x.509 certificates to run with examples and fun faster.
parent
9c7a1044b2
commit
0572e707c5
@ -0,0 +1,28 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# Libsxmp i.e. Secure X (for 10) Message Passing library
|
||||||
|
#
|
||||||
|
# This script generates CA primary certificates, mostly used
|
||||||
|
# by examples and fun.
|
||||||
|
#
|
||||||
|
|
||||||
|
OPENSSL=/usr/bin/openssl
|
||||||
|
|
||||||
|
|
||||||
|
$OPENSSL genrsa -out rootCA.key 2048
|
||||||
|
|
||||||
|
$OPENSSL req -x509 -new -nodes -key rootCA.key -days 8096 -out rootCA.pem
|
||||||
|
|
||||||
|
# make a compound
|
||||||
|
cat rootCA.key > rootCA.crt
|
||||||
|
cat rootCA.pem >> rootCA.crt
|
||||||
|
|
||||||
|
# create a key for the certificate authority daemon
|
||||||
|
$OPENSSL genrsa -out cadaemon.key 2048
|
||||||
|
$OPENSSL req -new -key cadaemon.key -out cadaemon.csr
|
||||||
|
$OPENSSL x509 -req -in cadaemon.csr -CA rootCA.pem -CAkey rootCA.key -CAcreateserial -out cadaemon.pem -days 8096
|
||||||
|
|
||||||
|
# make a compound
|
||||||
|
cat cadaemon.key > cadaemon.crt
|
||||||
|
cat cadaemon.pem >> cadaemon.crt
|
||||||
|
|
Loading…
Reference in New Issue