Jan Dittberner
5c3f0ea942
This commit adds a simple go backend calling openssl ca to sign CRS coming from the client. The JavaScript code in src/index.html has been extended to send requests to the sign endpoint and display the resulting certificate in a separate div element. A script setup_example_ca.sh and an openssl configuration file ca.cnf has been added to allow quick setup of a simple example CA.
11 lines
No EOL
377 B
Bash
Executable file
11 lines
No EOL
377 B
Bash
Executable file
#!/bin/sh
|
|
|
|
if [ ! -d "exampleca" ]; then
|
|
mkdir -p exampleca/newcerts
|
|
touch exampleca/index.txt
|
|
umask 077
|
|
mkdir exampleca/private
|
|
openssl req -new -x509 -keyout exampleca/private/ca.key.pem -out exampleca/ca.crt.pem -days 3650 \
|
|
-subj "/CN=Example CA" -nodes -newkey rsa:3072 -addext "basicConstraints=critical,CA:true,pathlen:0"
|
|
chmod +r exampleca/ca.crt.pem
|
|
fi |