[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[Patch] Contact-Fingerprint



Hi,

I've patched tainaron as follow to publish the GPG admin key
fingerprint like described in the Directory Specification. If
something's broken now, blame me...

===== Beginn =====

--- ServerConfig.py (old)
+++ ServerConfig.py (new)
@@ -346,6 +346,7 @@
                      'Mode' : ('REQUIRE', "serverMode", "local"),
                      'Nickname': ('REQUIRE', "nickname", None),
                      'Contact-Email': ('REQUIRE', "email", None),
+                     'Contact-Fingerprint': ('ALLOW', None, None),
                      'Comments': ('ALLOW', None, None),
                      'ModulePath': ('ALLOW', None, None),
                      'Module': ('ALLOW*', None, None),

===== Ende =====
===== Beginn =====

--- ServerKeys.py (old)
+++ ServerKeys.py (new)
@@ -864,6 +864,8 @@
     if config_s['Contact-Email'] != info_s['Contact']:
         warn("Mismatched contacts: %s in configuration; %s published.",
              config_s['Contact-Email'], info_s['Contact'])
+    if config_s['Contact-Fingerprint'] != info_s['Contact-Fingerprint']:
+        warn("Mismatched contact fingerprints.")

     if info_s['Software'] and info_s['Software'] != (
         "Mixminion %s" % mixminion.__version__):
@@ -990,6 +992,7 @@
     # Now, we pull all the information we need from our configuration.
     nickname = config['Server']['Nickname']
     contact = config['Server']['Contact-Email']
+    fingerprint = config['Server']['Contact-Fingerprint']
     comments = config['Server']['Comments']
     if not now:
         now = time.time()
@@ -1090,6 +1093,8 @@
         """ % fields
     if insecurities:
         info += "Why-Insecure: %s\n"%(", ".join(insecurities))
+    if fingerprint:
+        info += "Contact-Fingerprint: %s\n"%fingerprint
     if comments:
         info += "Comments: %s\n"%comments

===== Ende =====

Ciao

Tobias
-- 
mbox:admin@tainaron

Attachment: pgpPmbxpMUNnC.pgp
Description: PGP signature