Module: kamailio
Branch: master
Commit: 39802fd2efad4b710072244f360741312a7164f2
URL: 
https://github.com/kamailio/kamailio/commit/39802fd2efad4b710072244f360741312a7164f2

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date: 2020-01-09T17:43:38+01:00

auth_xkeys: proper debug log messages on valid match

---

Modified: src/modules/auth_xkeys/auth_xkeys.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/39802fd2efad4b710072244f360741312a7164f2.diff
Patch: 
https://github.com/kamailio/kamailio/commit/39802fd2efad4b710072244f360741312a7164f2.patch

---

diff --git a/src/modules/auth_xkeys/auth_xkeys.c 
b/src/modules/auth_xkeys/auth_xkeys.c
index f7dc58906b..6963d4e313 100644
--- a/src/modules/auth_xkeys/auth_xkeys.c
+++ b/src/modules/auth_xkeys/auth_xkeys.c
@@ -352,7 +352,7 @@ int auth_xkeys_check(sip_msg_t* msg, str *hdr, str *key,
                        }
                        compute_sha256(xout, (u_int8_t*)xdata.s, xdata.len);
                        if(strncasecmp(xout, hbody.s, hbody.len)==0) {
-                               LM_DBG("no digest sha256 matched for key 
[%.*s:%.*s]\n",
+                               LM_DBG("digest sha256 matched for key 
[%.*s:%.*s]\n",
                                                key->len, key->s, 
itc->kname.len, itc->kname.s);
                                return 0;
                        }
@@ -364,7 +364,7 @@ int auth_xkeys_check(sip_msg_t* msg, str *hdr, str *key,
                        }
                        compute_sha384(xout, (u_int8_t*)xdata.s, xdata.len);
                        if(strncasecmp(xout, hbody.s, hbody.len)==0) {
-                               LM_DBG("no digest sha384 matched for key 
[%.*s:%.*s]\n",
+                               LM_DBG("digest sha384 matched for key 
[%.*s:%.*s]\n",
                                                key->len, key->s, 
itc->kname.len, itc->kname.s);
                                return 0;
                        }
@@ -376,7 +376,7 @@ int auth_xkeys_check(sip_msg_t* msg, str *hdr, str *key,
                        }
                        compute_sha512(xout, (u_int8_t*)xdata.s, xdata.len);
                        if(strncasecmp(xout, hbody.s, hbody.len)==0) {
-                               LM_DBG("no digest sha512 matched for key 
[%.*s:%.*s]\n",
+                               LM_DBG("digest sha512 matched for key 
[%.*s:%.*s]\n",
                                                key->len, key->s, 
itc->kname.len, itc->kname.s);
                                return 0;
                        }


_______________________________________________
Kamailio (SER) - Development Mailing List
[email protected]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to