/[packages]/cauldron/openssl/current/SOURCES/make-dummy-cert
ViewVC logotype

Contents of /cauldron/openssl/current/SOURCES/make-dummy-cert

Parent Directory Parent Directory | Revision Log Revision Log


Revision 733 - (show annotations) (download)
Sat Jan 8 15:43:48 2011 UTC (13 years, 3 months ago) by blino
File size: 610 byte(s)
imported package openssl
1 #!/bin/sh
2 umask 077
3
4 answers() {
5 echo --
6 echo SomeState
7 echo SomeCity
8 echo SomeOrganization
9 echo SomeOrganizationalUnit
10 echo localhost.localdomain
11 echo root@localhost.localdomain
12 }
13
14 if [ $# -eq 0 ] ; then
15 echo $"Usage: `basename $0` filename [...]"
16 exit 0
17 fi
18
19 for target in $@ ; do
20 PEM1=`/bin/mktemp /tmp/openssl.XXXXXX`
21 PEM2=`/bin/mktemp /tmp/openssl.XXXXXX`
22 trap "rm -f $PEM1 $PEM2" SIGINT
23 answers | /usr/bin/openssl req -newkey rsa:1024 -keyout $PEM1 -nodes -x509 -days 365 -out $PEM2 2> /dev/null
24 cat $PEM1 > ${target}
25 echo "" >> ${target}
26 cat $PEM2 >> ${target}
27 rm -f $PEM1 $PEM2
28 done

  ViewVC Help
Powered by ViewVC 1.1.30