RPM Package Manager, CVS Repository
/cvs/
____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson
Root: /v/rpm/cvs Email: jbj@rpm5.org
Module: rpm Date: 16-Aug-2010 14:22:04
Branch: rpm-5_1 Handle: 2010081612220300
Added files: (Branch: rpm-5_1)
rpm/tests genpgp.sh
Log:
- orphans.
Summary:
Revision Changes Path
1.3.2.2 +72 -0 rpm/tests/genpgp.sh
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: rpm/tests/genpgp.sh
============================================================================
$ cvs diff -u -r0 -r1.3.2.2 genpgp.sh
--- /dev/null 2010-08-16 14:22:01.000000000 +0200
+++ genpgp.sh 2010-08-16 14:22:04.103866137 +0200
@@ -0,0 +1,72 @@
+#!/bin/sh
+
+top="`pwd`/tmp"
+hdir="$top/.gnupg"
+plaintext="$top/plaintext"
+DSA="$top/DSA"
+RSA="$top/RSA"
+
+gpg="gpg2 --homedir $hdir"
+
+rm -rf $hdir
+mkdir -p $hdir
+chmod go-rwx $hdir
+
+$gpg --batch --debug-quick-random --gen-key << GO_SYSIN_DD
+Key-Type: DSA
+Key-Length: 1024
+Key-Usage: sign
+Name-Real: Donald
+Name-Comment: 1024
+Name-Email: rppm-devel@rpm5.org
+Expire-Date: 1
+%commit
+Key-Type: RSA
+Key-Length: 4096
+Key-Usage: sign,encrypt
+Name-Real: Ronald
+Name-Comment: 4096
+Name-Email: rpm-devel@rpm5.org
+Expire-Date: 1
+%commit
+GO_SYSIN_DD
+
+str="test"
+
+# Note carefully the trailing white space on 1st line below: "${str} "
+# $ od -c plaintext
+# 0000000 t e s t \n t e s t
+# 0000020 \n
+# 0000021
+cat << GO_SYSIN_DD > $plaintext
+${str}
+${str}
+GO_SYSIN_DD
+
+echo "static const char * plaintextfn = \"$plaintext\";"
+
+$gpg --detach-sign -u Donald --output - $plaintext > ${DSA}.sig
+$gpg --detach-sign -a -u Donald --output - $plaintext > ${DSA}.sigpem
+$gpg --clearsign -u Donald --output - $plaintext > ${DSA}.pem
+$gpg --export Donald > ${DSA}.pub
+$gpg --export -a Donald > ${DSA}.pubpem
+
+echo "static const char * DSAsig = \"${DSA}.sig\";"
+echo "static const char * DSAsigpem = \"${DSA}.sigpem\";"
+echo "static const char * DSApem = \"${DSA}.pem\";"
+echo "static const char * DSApub = \"${DSA}.pub\";"
+echo "static const char * DSApubpem = \"${DSA}.pubpem\";"
+echo "static const char * DSApubid = \"`$gpg --fingerprint DSApub | grep 'finger' | sed -e 's/.*print = //' -e 's/ //g'`\";"
+
+$gpg --detach-sign -u Ronald --output - $plaintext > ${RSA}.sig
+$gpg --detach-sign -a -u Ronald --output - $plaintext > ${RSA}.sigpem
+$gpg --clearsign -u Ronald --output - $plaintext > ${RSA}.pem
+$gpg --export Ronald > ${RSA}.pub
+$gpg --export -a Ronald > ${RSA}.pubpem
+
+echo "static const char * RSAsig = \"${RSA}.sig\";"
+echo "static const char * RSAsigpem = \"${RSA}.sigpem\";"
+echo "static const char * RSApem = \"${RSA}.pem\";"
+echo "static const char * RSApub = \"${RSA}.pub\";"
+echo "static const char * RSApubpem = \"${RSA}.pubpem\";"
+echo "static const char * RSApubid = \"`$gpg --fingerprint RSApub | grep 'finger' | sed -e 's/.*print = //' -e 's/ //g'`\";"
@@ .
Received on Mon Aug 16 14:22:04 2010