Archive of certificates

This commit is contained in:
Bob Mottram 2014-09-13 13:48:00 +01:00
parent e88da5662e
commit 33e3898932
1 changed files with 8 additions and 5 deletions

View File

@ -2635,15 +2635,16 @@ Enter the following, changing the country code and location as needed:
#!/bin/bash
HOSTNAME=$1
COUNTRY_CODE="GB"
AREA="Greater Manchester"
LOCATION="Manchester"
COUNTRY_CODE="US"
AREA="Free Speech Zone"
LOCATION="Freedomville"
ORGANISATION="Freedombone"
UNIT="Freedombone Unit"
openssl req \
-x509 -nodes -days 3650 \
-subj "/O=$ORGANISATION/C=$COUNTRY_CODE/ST=$AREA/L=$LOCATION/CN=$HOSTNAME" \
-newkey rsa:1024 \
-subj "/O=$ORGANISATION/OU=$UNIT/C=$COUNTRY_CODE/ST=$AREA/L=$LOCATION/CN=$HOSTNAME" \
-newkey rsa:2048 \
-keyout /etc/ssl/private/$HOSTNAME.key \
-out /etc/ssl/certs/$HOSTNAME.crt
chmod 400 /etc/ssl/private/$HOSTNAME.key
@ -2657,6 +2658,7 @@ fi
cp /etc/ssl/certs/$HOSTNAME.crt /etc/ssl/mycerts
# Create a bundle of your certificates
cat /etc/ssl/mycerts/*.crt > /etc/ssl/freedombone-bundle.crt
tar -czvf /etc/ssl/freedombone-certs.tar.gz /etc/ssl/mycerts/*.crt
#+END_SRC
Save and exit.
@ -8252,6 +8254,7 @@ And also add it to the overall bundle of certificates for the BBB. This will all
mkdir /etc/ssl/mycerts
cp /etc/ssl/certs/$HOSTNAME.bundle.crt /etc/ssl/mycerts
cat /etc/ssl/mycerts/*.crt > /etc/ssl/freedombone-bundle.crt
tar -czvf /etc/ssl/freedombone-certs.tar.gz /etc/ssl/mycerts/*.crt
#+END_SRC
Edit your configuration file.