summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-01-29 21:25:51 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-01-29 21:25:51 -0500
commit43b1b48d0265b03b2a8ce20e2d2df39d5197b9ee (patch)
tree2d9ef68cb613c31954101dbac56c8ebc1c937c74
parenta999ab544012cdc2616686f278b8de92e829f9f6 (diff)
parentf4f158c3868c1770cb7d4f800881803e7250c27b (diff)
Merge branch 'archweb-generic'
-rw-r--r--main/templatetags/pgp.py6
-rw-r--r--settings.py3
2 files changed, 6 insertions, 3 deletions
diff --git a/main/templatetags/pgp.py b/main/templatetags/pgp.py
index 455e8f9c..16b63232 100644
--- a/main/templatetags/pgp.py
+++ b/main/templatetags/pgp.py
@@ -36,8 +36,10 @@ def pgp_key_link(key_id, link_text=None):
pgp_server = getattr(settings, 'PGP_SERVER', None)
if not pgp_server:
return format_key(key_id)
- url = 'http://%s/pks/lookup?op=vindex&amp;fingerprint=on&amp;exact=on&amp;search=0x%s' % \
- (pgp_server, key_id)
+ pgp_server_secure = getattr(settings, 'PGP_SERVER_SECURE', False)
+ scheme = 'https' if pgp_server_secure else 'http'
+ url = '%s://%s/pks/lookup?op=vindex&amp;fingerprint=on&amp;exact=on&amp;search=0x%s' % \
+ (scheme, pgp_server, key_id)
if link_text is None:
link_text = '0x%s' % key_id[-8:]
values = (url, format_key(key_id), link_text)
diff --git a/settings.py b/settings.py
index 70da44b8..071735cf 100644
--- a/settings.py
+++ b/settings.py
@@ -157,7 +157,8 @@ LOGGING = {
}
## Server used for linking to PGP keysearch results
-PGP_SERVER = 'pgp.mit.edu:11371'
+PGP_SERVER = 'pgp.mit.edu'
+PGP_SERVER_SECURE = True
# URL to fetch a current list of available ISOs
ISO_LIST_URL = 'https://repo.parabola.nu/iso/'