X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=ud-mailgate;h=fb5b7ba88a60bd05695422242f196b8e56190e7d;hb=ff8414ee178cde843c3174e481b6c19d6f7bf116;hp=36f1cc3d0e787383a1d58a78727cd6dbef558a95;hpb=eed30e7939bd5f051ff7af072b802925d663641d;p=mirror%2Fuserdir-ldap.git diff --git a/ud-mailgate b/ud-mailgate index 36f1cc3..fb5b7ba 100755 --- a/ud-mailgate +++ b/ud-mailgate @@ -8,10 +8,7 @@ import userdir_gpg, userdir_ldap, sys, traceback, time, ldap, os, commands import pwd, tempfile import hmac -try: - import hashlib -except ImportError: - import sha as sha1_module +import sha as sha1_module from userdir_gpg import * from userdir_ldap import * @@ -100,10 +97,10 @@ DelItems = {"c": None, def make_hmac(str): F = open(PassDir+"/key-hmac","r"); - key = F.readline() + key = F.readline().strip() F.close(); - return hmac.new(key, str, sha1_module).hexdigest + return hmac.new(key, str, sha1_module).hexdigest()