remove code that I did not test yet
[mirror/userdir-ldap.git] / ud-mailgate
index 36f1cc3..29a2873 100755 (executable)
@@ -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,7 +97,7 @@ 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