summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJameson Graef Rollins <jrollins@phys.columbia.edu>2008-08-15 15:04:53 -0700
committerJameson Graef Rollins <jrollins@phys.columbia.edu>2008-08-15 15:10:02 -0700
commit46586fc0f24e24166a52c2a0efb3e2ab838eea81 (patch)
tree4e1986278410f4e90e3a5ec70b11b10b14d67220 /src
parentcb05f332e617e346aa533d6dde02fb11c6148799 (diff)
parentc9acc1237d8e21d74fe7070af1b061c888664e8b (diff)
Merge commit 'dkg/master'
Conflicts: debian/changelog
Diffstat (limited to 'src')
-rwxr-xr-xsrc/monkeysphere14
-rwxr-xr-xsrc/monkeysphere-server2
2 files changed, 13 insertions, 3 deletions
diff --git a/src/monkeysphere b/src/monkeysphere
index 6d9e6c3..57597e2 100755
--- a/src/monkeysphere
+++ b/src/monkeysphere
@@ -48,7 +48,6 @@ EOF
}
# generate a subkey with the 'a' usage flags set
-# FIXME: this needs some tweaking to clean it up
gen_subkey(){
local keyLength
local keyExpire
@@ -163,7 +162,18 @@ EOF
)
log "generating subkey..."
- echo "$editCommands" | gpg --expert --command-fd 0 --edit-key "$keyID"
+ fifoDir=$(mktemp -d)
+ (umask 077 && mkfifo "$fifoDir/pass")
+ echo "$editCommands" | gpg --passphrase-fd 3 3< "$fifoDir/pass" --expert --command-fd 0 --edit-key "$keyID" &
+
+ if [ "$DISPLAY" ] && which ssh-askpass >/dev/null; then
+ ssh-askpass "Please enter your passphrase for $keyID: " > "$fifoDir/pass"
+ else
+ read -s -p "Please enter your passphrase for $keyID: " PASS
+ echo "$PASS" > "$fifoDir/pass"
+ fi
+ rm -rf "$fifoDir"
+ wait
log "done."
}
diff --git a/src/monkeysphere-server b/src/monkeysphere-server
index 4fb8265..69395a4 100755
--- a/src/monkeysphere-server
+++ b/src/monkeysphere-server
@@ -732,7 +732,7 @@ EOF
)
# ltsign the key
- echo "$ltsignCommand" | gpg_host --quiet --command-fd 0 --edit-key "$fingerprint"
+ echo "$ltsignCommand" | gpg_host --quiet --command-fd 0 --edit-key "0x${fingerprint}"\!
# update the trustdb for the authentication keyring
gpg_authentication "--check-trustdb"