Fix sigcheck pgp/mime processing with gnupg 2
[mirror/userdir-ldap.git] / userdir_gpg.py
index c70b5c1..1b9732c 100644 (file)
@@ -119,7 +119,7 @@ def GetClearSig(Msg, Paranoid = 0, lax_multipart = False):
       Output = "-----BEGIN PGP SIGNED MESSAGE-----\r\n";
       # Semi-evil hack to get the proper hash type inserted in the message
       if Msg.get_param('micalg') != None:
-          Output = Output + "Hash: MD5,SHA1,%s\r\n"%(Msg.get_param('micalg')[4:].upper())
+          Output = Output + "Hash: SHA1,%s\r\n"%(Msg.get_param('micalg')[4:].upper())
       Output = Output + "\r\n";
       Output = Output + Signed.as_string().replace("\n-","\n- -") + "\n" + Signature.get_payload(decode=True)
       return (Output,1);