diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-08 16:41:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-08 16:41:28 +0000 |
commit | 14509ce60103dab695cef4d4f31321bab27ab967 (patch) | |
tree | 5959cfb9832b3af242a1ca45d4a1227acae67d87 /lib/isccc/cc.c | |
parent | Adding debian version 1:9.18.19-1~deb12u1. (diff) | |
download | bind9-14509ce60103dab695cef4d4f31321bab27ab967.tar.xz bind9-14509ce60103dab695cef4d4f31321bab27ab967.zip |
Merging upstream version 1:9.18.24.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lib/isccc/cc.c')
-rw-r--r-- | lib/isccc/cc.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/isccc/cc.c b/lib/isccc/cc.c index cbd9bad..71e5b14 100644 --- a/lib/isccc/cc.c +++ b/lib/isccc/cc.c @@ -255,7 +255,7 @@ list_towire(isccc_sexpr_t *list, isc_buffer_t **buffer) { } static isc_result_t -sign(unsigned char *data, unsigned int length, unsigned char *hmac, +sign(unsigned char *data, unsigned int length, unsigned char *out, uint32_t algorithm, isccc_region_t *secret) { const isc_md_type_t *md_type; isc_result_t result; @@ -304,9 +304,9 @@ sign(unsigned char *data, unsigned int length, unsigned char *hmac, return (result); } if (algorithm == ISCCC_ALG_HMACMD5) { - PUT_MEM(digestb64, HMD5_LENGTH, hmac); + PUT_MEM(digestb64, HMD5_LENGTH, out); } else { - PUT_MEM(digestb64, HSHA_LENGTH, hmac); + PUT_MEM(digestb64, HSHA_LENGTH, out); } return (ISC_R_SUCCESS); } @@ -382,7 +382,7 @@ verify(isccc_sexpr_t *alist, unsigned char *data, unsigned int length, isccc_region_t source; isccc_region_t target; isc_result_t result; - isccc_sexpr_t *_auth, *hmac; + isccc_sexpr_t *_auth, *hmacvalue; unsigned char digest[ISC_MAX_MD_SIZE]; unsigned int digestlen = sizeof(digest); unsigned char digestb64[HSHA_LENGTH * 4]; @@ -395,11 +395,11 @@ verify(isccc_sexpr_t *alist, unsigned char *data, unsigned int length, return (ISC_R_FAILURE); } if (algorithm == ISCCC_ALG_HMACMD5) { - hmac = isccc_alist_lookup(_auth, "hmd5"); + hmacvalue = isccc_alist_lookup(_auth, "hmd5"); } else { - hmac = isccc_alist_lookup(_auth, "hsha"); + hmacvalue = isccc_alist_lookup(_auth, "hsha"); } - if (!isccc_sexpr_binaryp(hmac)) { + if (!isccc_sexpr_binaryp(hmacvalue)) { return (ISC_R_FAILURE); } /* @@ -452,7 +452,7 @@ verify(isccc_sexpr_t *alist, unsigned char *data, unsigned int length, isccc_region_t *region; unsigned char *value; - region = isccc_sexpr_tobinary(hmac); + region = isccc_sexpr_tobinary(hmacvalue); if ((region->rend - region->rstart) != HMD5_LENGTH) { return (ISCCC_R_BADAUTH); } @@ -465,7 +465,7 @@ verify(isccc_sexpr_t *alist, unsigned char *data, unsigned int length, unsigned char *value; uint32_t valalg; - region = isccc_sexpr_tobinary(hmac); + region = isccc_sexpr_tobinary(hmacvalue); /* * Note: with non-MD5 algorithms, there's an extra octet |