make-rules: implement Python Dependency Groups (PEP 735) using pyproject_installer
[oi-userland.git] / components / sysutils / net-snmp / patches / 070.28626839.scapi_md5.patch
blob5abac48b4b2ed1192a41a628dc89798522008b97
1 --- net-snmp-5.9.4/snmplib/scapi.c.orig
2 +++ net-snmp-5.9.4/snmplib/scapi.c
3 @@ -208,8 +208,8 @@
4 #ifdef NETSNMP_USE_OPENSSL
5 static
6 void EVP_hmac(const EVP_MD *evp_md, const void *key,
7 - const unsigned char *msg, unsigned char *md,
8 - size_t *md_len);
9 + const unsigned char *msg, u_int msglen,
10 + unsigned char *md, size_t *md_len);
11 static
12 int EVP_decrypt(const EVP_CIPHER *type, u_char * key,
13 u_int keylen, u_char * iv, u_char * ciphertext,
14 @@ -797,7 +797,7 @@
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);
20 else
21 #endif
22 HMAC(hashfn, key, keylen, message, msglen, buf, &buf_len);
23 @@ -1837,8 +1837,8 @@
24 #ifdef NETSNMP_USE_OPENSSL
25 static
26 void EVP_hmac(const EVP_MD *evp_md, const void *key,
27 - const unsigned char *msg, unsigned char *md,
28 - size_t *md_len)
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;
34 @@ -1862,7 +1862,7 @@
35 EVP_PKEY_free(pkey);
36 return;
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);
42 EVP_PKEY_free(pkey);