1 --- net-snmp-5.9.4/snmplib/scapi.c.orig
2 +++ net-snmp-5.9.4/snmplib/scapi.c
4 #ifdef NETSNMP_USE_OPENSSL
6 void EVP_hmac(const EVP_MD *evp_md, const void *key,
7 - const unsigned char *msg, unsigned char *md,
9 + const unsigned char *msg, u_int msglen,
10 + unsigned char *md, size_t *md_len);
12 int EVP_decrypt(const EVP_CIPHER *type, u_char * key,
13 u_int keylen, u_char * iv, u_char * ciphertext,
16 #ifndef NETSNMP_DISABLE_MD5
17 if (auth_type == NETSNMP_USMAUTH_HMACMD5)
18 - EVP_hmac(hashfn, key, message, buf, &buf_len);
19 + EVP_hmac(hashfn, key, message, msglen, buf, &buf_len);
22 HMAC(hashfn, key, keylen, message, msglen, buf, &buf_len);
24 #ifdef NETSNMP_USE_OPENSSL
26 void EVP_hmac(const EVP_MD *evp_md, const void *key,
27 - const unsigned char *msg, unsigned char *md,
29 + const unsigned char *msg, u_int msglen,
30 + unsigned char *md, size_t *md_len)
32 EVP_MD_CTX* mdctx = NULL;
33 EVP_PKEY *pkey = NULL;
38 - if(EVP_DigestSignUpdate(mdctx, msg, strlen(msg)) != 1) {
39 + if(EVP_DigestSignUpdate(mdctx, msg, msglen) != 1) {
40 snmp_log(LOG_ERR, "EVP_DigestSignUpdate failure.\n");
41 EVP_MD_CTX_destroy(mdctx);