assume that voipPassword contains an HA1
authorLuca Filipozzi <lfilipoz@emyr.net>
Tue, 14 Jan 2014 01:23:21 +0000 (01:23 +0000)
committerLuca Filipozzi <lfilipoz@emyr.net>
Tue, 14 Jan 2014 01:23:21 +0000 (01:23 +0000)
ud-generate

index 64c462e..cfd3f2a 100755 (executable)
@@ -422,12 +422,7 @@ def GenVoipPassword(accounts, File):
          if not 'voipPassword' in a: continue
          if not a.pw_active(): continue
 
-         Pass = str(a['voipPassword'])
-         realm = 'sip.debian.org'
-
-         A1 = "%s:%s:%s" % (a['uid'], realm, Pass)
-         HA1 = hashlib.md5(A1).hexdigest()
-         Line = "%s:%s:%s:AUTHORIZED" % (a['uid'], HA1, realm)
+         Line = "%s@debian.org:%s:sip.debian.org:AUTHORIZED" % (a['uid'], str(a['voipPassword']))
          Line = Sanitize(Line) + "\n"
          F.write("%s" % (Line))