diff options
author | B Stack <bgstack15@gmail.com> | 2019-07-16 13:25:19 +0000 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2019-07-16 13:25:19 +0000 |
commit | 240c7ecb12cd1ebb9780de70c4d15b0a84854020 (patch) | |
tree | 6fb69bb5ec481b1ce68892d0b4c14e7bb75e66c2 /openssl-freefilesync/make-dummy-cert | |
parent | freefilesync dpkg add unzip (diff) | |
parent | Merge branch 'freefilesync-rpm' into 'freefilesync-bump' (diff) | |
download | stackrpms-240c7ecb12cd1ebb9780de70c4d15b0a84854020.tar.gz stackrpms-240c7ecb12cd1ebb9780de70c4d15b0a84854020.tar.bz2 stackrpms-240c7ecb12cd1ebb9780de70c4d15b0a84854020.zip |
Merge branch 'freefilesync-bump' into 'master'
Freefilesync 10.14
See merge request bgstack15/stackrpms!73
Diffstat (limited to 'openssl-freefilesync/make-dummy-cert')
-rwxr-xr-x | openssl-freefilesync/make-dummy-cert | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/openssl-freefilesync/make-dummy-cert b/openssl-freefilesync/make-dummy-cert new file mode 100755 index 0000000..f5f0453 --- /dev/null +++ b/openssl-freefilesync/make-dummy-cert @@ -0,0 +1,28 @@ +#!/bin/sh +umask 077 + +answers() { + echo -- + echo SomeState + echo SomeCity + echo SomeOrganization + echo SomeOrganizationalUnit + echo localhost.localdomain + echo root@localhost.localdomain +} + +if [ $# -eq 0 ] ; then + echo $"Usage: `basename $0` filename [...]" + exit 0 +fi + +for target in $@ ; do + PEM1=`/bin/mktemp /tmp/openssl.XXXXXX` + PEM2=`/bin/mktemp /tmp/openssl.XXXXXX` + trap "rm -f $PEM1 $PEM2" SIGINT + answers | /usr/bin/openssl req -newkey rsa:2048 -keyout $PEM1 -nodes -x509 -days 365 -out $PEM2 2> /dev/null + cat $PEM1 > ${target} + echo "" >> ${target} + cat $PEM2 >> ${target} + rm -f $PEM1 $PEM2 +done |