X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=userdir_gpg.py;h=21bc1387dbf32975fd979fdbbf7714a1ec9bf925;hb=37b0b5875ff83d8e9a9e8ca918d42fc32b720f06;hp=39667d2c1f8ae25db0976eaaab8fc1650608a153;hpb=a86d975ac15e074f142c75ba5c74596be92e740d;p=mirror%2Fuserdir-ldap.git diff --git a/userdir_gpg.py b/userdir_gpg.py index 39667d2..21bc138 100644 --- a/userdir_gpg.py +++ b/userdir_gpg.py @@ -83,7 +83,12 @@ def GetClearSig(Msg): # Append the PGP boundary header and the signature text to re-form the # original signed block [needs to convert to \r\n] - Output = "-----BEGIN PGP SIGNED MESSAGE-----\r\n\r\n" + Signed.getvalue() + Signature; + Output = "-----BEGIN PGP SIGNED MESSAGE-----\r\n"; + # Semi-evil hack to get the proper hash type inserted in the message + if Msg.getparam('micalg') != None: + Output = Output + "Hash: %s\r\n"%(string.upper(Msg.getparam('micalg')[4:])); + Output = Output + "\r\n"; + Output = Output + Signed.getvalue() + Signature; return (Output,1); else: # Just return the message body