hmac-sha1 auth

This commit is contained in:
Gabor Adam Toth 2011-07-26 01:07:04 +02:00
parent 00bdb487a5
commit 09aaafd679

View File

@ -768,6 +768,12 @@ case "sha1":
try, sha1(salt + v("password"))));
rc = try == sha1(salt + v("password"));
ARETURN(rc)
case "HMAC-SHA1":
case "hmac-sha1":
ARETURN(try == hmac(TLS_HASH_SHA1, v("password"), salt))
#ifdef AUTH_HMAC_SECRET
case "hmac-sha1-shared":
ARETURN(try == hmac(TLS_HASH_SHA1, AUTH_HMAC_SECRET, salt + MYNICK))
#else
# echo Driver is missing SHA1 support (needed for jabber)
#endif