diff options
Diffstat (limited to 'usr.sbin/unbound/ldns/tsig.c')
-rw-r--r-- | usr.sbin/unbound/ldns/tsig.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/usr.sbin/unbound/ldns/tsig.c b/usr.sbin/unbound/ldns/tsig.c index 41693463df3..53aa85ecb46 100644 --- a/usr.sbin/unbound/ldns/tsig.c +++ b/usr.sbin/unbound/ldns/tsig.c @@ -51,7 +51,7 @@ ldns_tsig_keydata_clone(ldns_tsig_credentials *tc) /* * Makes an exact copy of the wire, but with the tsig rr removed */ -uint8_t * +static uint8_t * ldns_tsig_prepare_pkt_wire(uint8_t *wire, size_t wire_len, size_t *result_len) { uint8_t *wire2 = NULL; @@ -134,19 +134,15 @@ ldns_digest_function(char *name) { /* these are the mandatory algorithms from RFC4635 */ /* The optional algorithms are not yet implemented */ - if (strlen(name) == 12 - && strncasecmp(name, "hmac-sha256.", 11) == 0) { + if (strcasecmp(name, "hmac-sha256.") == 0) { #ifdef HAVE_EVP_SHA256 return EVP_sha256(); #else return NULL; #endif - } else if (strlen(name) == 10 - && strncasecmp(name, "hmac-sha1.", 9) == 0) { + } else if (strcasecmp(name, "hmac-sha1.") == 0) { return EVP_sha1(); - } else if (strlen(name) == 25 - && strncasecmp(name, "hmac-md5.sig-alg.reg.int.", 25) - == 0) { + } else if (strcasecmp(name, "hmac-md5.sig-alg.reg.int.") == 0) { return EVP_md5(); } else { return NULL; |