Skip to content

Commit ac291e8

Browse files
committed
Fix hmac_memory_multi() invocation
It expects a pair of type `(unsigned char*,unsigned long)` and not `(unsigned char*,unsigned int)`. Fixes: 46fa363 ("Finish up RFC6979 ECDSA keygen") Reported-via: #699 (comment) ff. Signed-off-by: Steffen Jaeckel <[email protected]>
1 parent c9259ff commit ac291e8

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/mac/hmac/hmac_memory_multi.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
@param outlen [in/out] Max size and resulting size of authentication tag
1919
@param in The data to HMAC
2020
@param inlen The length of the data to HMAC (octets)
21-
@param ... tuples of (data,len) pairs to HMAC, terminated with a (NULL,x) (x=don't care)
21+
@param ... tuples of (data,len) pairs of type (unsigned char*,unsigned long) to HMAC,
22+
terminated with a (NULL,x) (x=don't care)
2223
@return CRYPT_OK if successful
2324
*/
2425
int hmac_memory_multi(int hash,

src/pk/ecc/ecc_rfc6979_key.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ int ecc_rfc6979_key(const ecc_key *priv, const unsigned char *in, unsigned long
6868
k, hashsize,
6969
k, &klen,
7070
v, hashsize,
71-
sep, 1,
71+
sep, 1uL,
7272
buffer, zero_extend,
7373
privkey, qlen - zero_extend,
7474
buffer, len_diff,
@@ -86,7 +86,7 @@ int ecc_rfc6979_key(const ecc_key *priv, const unsigned char *in, unsigned long
8686
k, klen,
8787
k, &klen,
8888
v, hashsize,
89-
sep, 1,
89+
sep, 1uL,
9090
buffer, zero_extend,
9191
privkey, qlen - zero_extend,
9292
buffer, len_diff,

0 commit comments

Comments
 (0)