summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog3
-rwxr-xr-xsrc/monkeysphere11
-rw-r--r--website/bugs/monkeysphere-should-respect-keyserver-settings-in-gpg.mdwn4
3 files changed, 16 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog
index 160d1d6..e80e48a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,8 +12,9 @@ monkeysphere (0.8-1) UNRELEASED; urgency=low
keys. This will prevent malicious bad keys from causing good keys to
be removed from key files.
* enabled host key publication.
+ * added checking of gpg.conf for keyserver
- -- Jameson Graef Rollins <jrollins@phys.columbia.edu> Fri, 15 Aug 2008 00:48:22 -0700
+ -- Jameson Graef Rollins <jrollins@phys.columbia.edu> Fri, 15 Aug 2008 10:46:23 -0700
monkeysphere (0.7-1) experimental; urgency=low
diff --git a/src/monkeysphere b/src/monkeysphere
index 8ddfe7f..6d9e6c3 100755
--- a/src/monkeysphere
+++ b/src/monkeysphere
@@ -191,7 +191,16 @@ mkdir -p -m 0700 "$MONKEYSPHERE_HOME"
# set empty config variables with ones from the environment, or from
# config file, or with defaults
GNUPGHOME=${MONKEYSPHERE_GNUPGHOME:=${GNUPGHOME:="${HOME}/.gnupg"}}
-KEYSERVER=${MONKEYSPHERE_KEYSERVER:=${KEYSERVER:="subkeys.pgp.net"}}
+KEYSERVER=${MONKEYSPHERE_KEYSERVER:="$KEYSERVER"}
+# if keyserver not specified in env or monkeysphere.conf,
+# look in gpg.conf
+if [ -z "$KEYSERVER" ] ; then
+ if [ -f "${GNUPGHOME}/gpg.conf" ] ; then
+ KEYSERVER=$(grep -e "^[[:space:]]*keyserver " "${GNUPGHOME}/gpg.conf" | tail -1 | awk '{ print $2 }')
+ fi
+fi
+# if it's still not specified, use the default
+KEYSERVER=${KEYSERVER:="subkeys.pgp.net"}
CHECK_KEYSERVER=${MONKEYSPHERE_CHECK_KEYSERVER:=${CHECK_KEYSERVER:="true"}}
KNOWN_HOSTS=${MONKEYSPHERE_KNOWN_HOSTS:=${KNOWN_HOSTS:="${HOME}/.ssh/known_hosts"}}
HASH_KNOWN_HOSTS=${MONKEYSPHERE_HASH_KNOWN_HOSTS:=${HASH_KNOWN_HOSTS:="true"}}
diff --git a/website/bugs/monkeysphere-should-respect-keyserver-settings-in-gpg.mdwn b/website/bugs/monkeysphere-should-respect-keyserver-settings-in-gpg.mdwn
index 3fbf19f..85f79f1 100644
--- a/website/bugs/monkeysphere-should-respect-keyserver-settings-in-gpg.mdwn
+++ b/website/bugs/monkeysphere-should-respect-keyserver-settings-in-gpg.mdwn
@@ -16,3 +16,7 @@ following order instead:
* default value of subkeys.pgp.net
-- Sir Jam Jam
+
+---
+
+[[bugs/done]] 2008-08-15 in ab5cfab5be64cfb5e01c2b660587da43b3097cad