GNUPG-1-9-BRANCH gnupg/tools (ChangeLog Makefile.am
gpgsm-gencert.sh)
cvs user wk
cvs at cvs.gnupg.org
Fri Oct 22 14:27:37 CEST 2004
Date: Friday, October 22, 2004 @ 14:31:04
Author: wk
Path: /cvs/gnupg/gnupg/tools
Tag: GNUPG-1-9-BRANCH
Modified: ChangeLog Makefile.am gpgsm-gencert.sh
* Makefile.am (bin_SCRIPTS): Add gpgsm-gencert.sh
* gpgsm-gencert.sh: Fixed copyright; its part of GnuPG thus FSF.
------------------+
ChangeLog | 6 ++++++
Makefile.am | 2 ++
gpgsm-gencert.sh | 28 ++++++++++++++++------------
3 files changed, 24 insertions(+), 12 deletions(-)
Index: gnupg/tools/ChangeLog
diff -u gnupg/tools/ChangeLog:1.25.2.54 gnupg/tools/ChangeLog:1.25.2.55
--- gnupg/tools/ChangeLog:1.25.2.54 Fri Oct 1 18:51:18 2004
+++ gnupg/tools/ChangeLog Fri Oct 22 14:31:04 2004
@@ -1,3 +1,9 @@
+2004-10-22 Werner Koch <wk at g10code.com>
+
+ * Makefile.am (bin_SCRIPTS): Add gpgsm-gencert.sh
+
+ * gpgsm-gencert.sh: Fixed copyright; its part of GnuPG thus FSF.
+
2004-10-01 Werner Koch <wk at g10code.com>
* gpgconf-comp.c: Made all strings for --log-file read the same.
Index: gnupg/tools/Makefile.am
diff -u gnupg/tools/Makefile.am:1.31.2.8 gnupg/tools/Makefile.am:1.31.2.9
--- gnupg/tools/Makefile.am:1.31.2.8 Thu Sep 30 16:34:22 2004
+++ gnupg/tools/Makefile.am Fri Oct 22 14:31:04 2004
@@ -30,6 +30,8 @@
sbin_SCRIPTS = addgnupghome
+bin_SCRIPTS = gpgsm-gencert.sh
+
bin_PROGRAMS = gpgconf watchgnupg
gpgconf_SOURCES = gpgconf.c gpgconf.h gpgconf-comp.c no-libgcrypt.c
Index: gnupg/tools/gpgsm-gencert.sh
diff -u gnupg/tools/gpgsm-gencert.sh:1.1.2.1 gnupg/tools/gpgsm-gencert.sh:1.1.2.2
--- gnupg/tools/gpgsm-gencert.sh:1.1.2.1 Mon Aug 9 13:58:26 2004
+++ gnupg/tools/gpgsm-gencert.sh Fri Oct 22 14:31:04 2004
@@ -1,7 +1,7 @@
#!/bin/sh
-
-# gpgsm-gencert.c - Generate X.509 certificates through GPGSM.
-# Copyright (C) 2004 g10 Code GmbH
+# -*- sh -*-
+# gpgsm-gencert.c - Generate X.509 certificates through GPGSM.
+# Copyright (C) 2004 Free Software Foundation, Inc.
#
# This file is part of GnuPG.
#
@@ -37,8 +37,8 @@
{
message=$1; shift
- echo "$message"
- echo -n "> "
+ echo "$message" >&2
+ echo -n "> " >&2
read answer
ANSWER=$answer;
@@ -49,15 +49,15 @@
message=$1; shift
i=0
- echo "$message"
+ echo "$message" >&2
for choice in "$@"; do
i=$(expr $i + 1)
- echo " [$i] $choice"
+ echo " [$i] $choice" >&2
done
while true; do
j=1
- echo -n "Your selection: "
+ echo -n "Your selection: " >&2
read idx
while [ $j -lt $i -o $j -eq $i ]; do
@@ -81,7 +81,7 @@
shift
done
- echo "You selected: $ANSWER"
+ echo "You selected: $ANSWER" >&2
}
query_user_menu "Key type" "RSA"
@@ -90,7 +90,7 @@
query_user_menu "Key length" "1024" "2048"
KEY_LENGTH=$ANSWER
-query_user_menu "Key usage" "sign, encrypt"
+query_user_menu "Key usage" "sign, encrypt" "sign" "encrypt"
KEY_USAGE=$ANSWER
query_user "Name"
@@ -100,6 +100,7 @@
EMAIL_ADDRESS=$ANSWER
file_parameter=$(mktemp "/tmp/gpgsm.XXXXXX")
+outfile=$(mktemp "/tmp/gpgsm.XXXXXX")
cat > "$file_parameter" <<EOF
Key-Type: $KEY_TYPE
@@ -109,7 +110,10 @@
Name-Email: $EMAIL_ADDRESS
EOF
-echo -e "$ASSUAN_COMMANDS" | gpgsm --server 4< "$file_parameter" 5>&1
+echo -e "$ASSUAN_COMMANDS" | \
+ gpgsm --server 4< "$file_parameter" 5>"$outfile" >/dev/null
+
+cat "$outfile"
-rm "$file_parameter"
+rm "$file_parameter" "$outfile"
exit 0
More information about the Gnupg-commits
mailing list