mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
Allow pkcs#10 creation directkly from a smart card
This commit is contained in:
parent
e0edd19f95
commit
43825e9dae
11 changed files with 211 additions and 39 deletions
|
@ -1,3 +1,7 @@
|
|||
2006-10-11 Werner Koch <wk@g10code.com>
|
||||
|
||||
* gpgsm-gencert.sh: Allow generation of card keys.
|
||||
|
||||
2006-10-08 Werner Koch <wk@g10code.com>
|
||||
|
||||
* Makefile.am (gpgkey2ssh_LDADD): Add LIBINTL. Suggested by
|
||||
|
|
|
@ -84,19 +84,27 @@ query_user_menu()
|
|||
echo "You selected: $ANSWER" >&2
|
||||
}
|
||||
|
||||
query_user_menu "Key type" "RSA" "existing key"
|
||||
if [ "$ANSWER" = "existing key" ]; then
|
||||
# User requested to use an existing key; need to set some dummy defaults
|
||||
KEY_TYPE=RSA
|
||||
KEY_LENGTH=1024
|
||||
query_user "Keygrip "
|
||||
KEY_GRIP=$ANSWER
|
||||
else
|
||||
KEY_TYPE=$ANSWER
|
||||
query_user_menu "Key length" "1024" "2048"
|
||||
KEY_LENGTH=$ANSWER
|
||||
KEY_GRIP=
|
||||
fi
|
||||
query_user_menu "Key type" "RSA" "existing key" "OPENPGP.1" "OPENPGP.3"
|
||||
case "$ANSWER" in
|
||||
RSA)
|
||||
KEY_TYPE=$ANSWER
|
||||
query_user_menu "Key length" "1024" "2048"
|
||||
KEY_LENGTH=$ANSWER
|
||||
KEY_GRIP=
|
||||
;;
|
||||
existing*)
|
||||
# User requested to use an existing key; need to set some dummy defaults
|
||||
KEY_TYPE=RSA
|
||||
KEY_LENGTH=1024
|
||||
query_user "Keygrip "
|
||||
KEY_GRIP=$ANSWER
|
||||
;;
|
||||
*)
|
||||
KEY_TYPE="card:$ANSWER"
|
||||
KEY_LENGTH=
|
||||
KEY_GRIP=
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
query_user_menu "Key usage" "sign, encrypt" "sign" "encrypt"
|
||||
|
@ -162,7 +170,7 @@ query_user_menu "Really create such a CSR?" "yes" "no"
|
|||
|
||||
|
||||
echo -e "$ASSUAN_COMMANDS" | \
|
||||
gpgsm --no-log-file --debug-level none --debug-none \
|
||||
gpgsm --no-log-file --debug-level none --debug-none \
|
||||
--server 4< "$file_parameter" 5>"$outfile" >/dev/null
|
||||
|
||||
cat "$outfile"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue