summaryrefslogtreecommitdiffstats
path: root/lib/isccc
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lib/isccc/Makefile.in2
-rw-r--r--lib/isccc/cc.c18
2 files changed, 9 insertions, 11 deletions
diff --git a/lib/isccc/Makefile.in b/lib/isccc/Makefile.in
index 3fee7ca..2a8d865 100644
--- a/lib/isccc/Makefile.in
+++ b/lib/isccc/Makefile.in
@@ -104,11 +104,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_compile_flag.m4 \
$(top_srcdir)/m4/ax_gcc_func_attribute.m4 \
$(top_srcdir)/m4/ax_jemalloc.m4 \
$(top_srcdir)/m4/ax_lib_lmdb.m4 \
- $(top_srcdir)/m4/ax_perl_module.m4 \
$(top_srcdir)/m4/ax_posix_shell.m4 \
$(top_srcdir)/m4/ax_prog_cc_for_build.m4 \
$(top_srcdir)/m4/ax_pthread.m4 \
- $(top_srcdir)/m4/ax_python_module.m4 \
$(top_srcdir)/m4/ax_restore_flags.m4 \
$(top_srcdir)/m4/ax_save_flags.m4 $(top_srcdir)/m4/ax_tls.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
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