Browse code

auth_xkeys: proper debug log messages on valid match

Daniel-Constantin Mierla authored on 09/01/2020 16:43:38
Showing 1 changed files
... ...
@@ -352,7 +352,7 @@ int auth_xkeys_check(sip_msg_t* msg, str *hdr, str *key,
352 352
 			}
353 353
 			compute_sha256(xout, (u_int8_t*)xdata.s, xdata.len);
354 354
 			if(strncasecmp(xout, hbody.s, hbody.len)==0) {
355
-				LM_DBG("no digest sha256 matched for key [%.*s:%.*s]\n",
355
+				LM_DBG("digest sha256 matched for key [%.*s:%.*s]\n",
356 356
 						key->len, key->s, itc->kname.len, itc->kname.s);
357 357
 				return 0;
358 358
 			}
... ...
@@ -364,7 +364,7 @@ int auth_xkeys_check(sip_msg_t* msg, str *hdr, str *key,
364 364
 			}
365 365
 			compute_sha384(xout, (u_int8_t*)xdata.s, xdata.len);
366 366
 			if(strncasecmp(xout, hbody.s, hbody.len)==0) {
367
-				LM_DBG("no digest sha384 matched for key [%.*s:%.*s]\n",
367
+				LM_DBG("digest sha384 matched for key [%.*s:%.*s]\n",
368 368
 						key->len, key->s, itc->kname.len, itc->kname.s);
369 369
 				return 0;
370 370
 			}
... ...
@@ -376,7 +376,7 @@ int auth_xkeys_check(sip_msg_t* msg, str *hdr, str *key,
376 376
 			}
377 377
 			compute_sha512(xout, (u_int8_t*)xdata.s, xdata.len);
378 378
 			if(strncasecmp(xout, hbody.s, hbody.len)==0) {
379
-				LM_DBG("no digest sha512 matched for key [%.*s:%.*s]\n",
379
+				LM_DBG("digest sha512 matched for key [%.*s:%.*s]\n",
380 380
 						key->len, key->s, itc->kname.len, itc->kname.s);
381 381
 				return 0;
382 382
 			}