Module: kamailio
Branch: master
Commit: 363d39f6f7fa032ea420678f7975e22ee8ce9564
URL: 
https://github.com/kamailio/kamailio/commit/363d39f6f7fa032ea420678f7975e22ee8ce9564

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date: 2025-10-08T13:01:36+02:00

auth: mod init updated to for sha512

---

Modified: src/modules/auth/auth_mod.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/363d39f6f7fa032ea420678f7975e22ee8ce9564.diff
Patch: 
https://github.com/kamailio/kamailio/commit/363d39f6f7fa032ea420678f7975e22ee8ce9564.patch

---

diff --git a/src/modules/auth/auth_mod.c b/src/modules/auth/auth_mod.c
index df1cfcb0af4..30081386490 100644
--- a/src/modules/auth/auth_mod.c
+++ b/src/modules/auth/auth_mod.c
@@ -397,6 +397,11 @@ static int mod_init(void)
                hash_hex_len = HASHHEXLEN_SHA256;
                calc_HA1 = calc_HA1_sha256;
                calc_response = calc_response_sha256;
+       } else if(strcmp(auth_algorithm.s, "SHA-512") == 0) {
+               auth_algorithm = auth_algorithm_list[AUTH_ALG_SHA512_IDX];
+               hash_hex_len = HASHHEXLEN_SHA512;
+               calc_HA1 = calc_HA1_sha512;
+               calc_response = calc_response_sha512;
        } else {
                LM_ERR("Invalid algorithm provided."
                           " Possible values are \"\", \"MD5\" or 
\"SHA-256\"\n");

_______________________________________________
Kamailio - Development Mailing List -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to