1
0
Fork 0
mirror of git://git.psyced.org/git/psyced synced 2024-08-15 03:25:10 +00:00

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")))); try, sha1(salt + v("password"))));
rc = try == sha1(salt + v("password")); rc = try == sha1(salt + v("password"));
ARETURN(rc) 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 #else
# echo Driver is missing SHA1 support (needed for jabber) # echo Driver is missing SHA1 support (needed for jabber)
#endif #endif