- Add functionality to query online sources (Keyservers, etc) for certificates. - Use introducers to determine which UserIDs should be fetched from online soources. Check certifications before importing certifiactes into the local cert store. - start docker image for local end-to-end testing.
24 lines
614 B
Bash
Executable File
24 lines
614 B
Bash
Executable File
#!/usr/bin/bash
|
|
|
|
DOMAIN=$1
|
|
DIR=/etc/local_certs
|
|
USER=hockeypuck
|
|
|
|
if [ "$DOMAIN" == "" ] ; then
|
|
echo "USAGE: $0 DOMAIN"
|
|
exit 1
|
|
fi
|
|
|
|
if [ ! -d $DIR ] ; then
|
|
mkdir -p $DIR
|
|
fi
|
|
|
|
echo "create key material for $DOMAIN ..."
|
|
openssl req -newkey rsa:2048 -keyout $DIR/$DOMAIN.key -nodes -x509 -days 365 -out $DIR/$DOMAIN.crt -subj "/C=DE/ST=HH/L=Earth/O=CompanyName/OU=IT/CN=$DOMAIN/emailAddress=email@example.com"
|
|
chown $USER:$USER $DIR/$DOMAIN.key
|
|
|
|
cp $DIR/$DOMAIN.crt /usr/share/ca-certificates/
|
|
echo $DOMAIN.crt >> /etc/ca-certificates.conf
|
|
|
|
# dont forget to run `update-ca-certificates` after all DOMAINs are done
|