jcs's openbsd hax
openbsd

Use EVP_MD in HKDF() and HKDF_extract() prototypes

Switch these prototypes to be like all other code and use the EVP_MD type
rather than the internal name of the struct. This also makes the function
definitions match the prototypes.

ok jsing

tb aa42de47 502e0f15

+5 -5
+5 -5
lib/libcrypto/hkdf/hkdf.h
··· 1 - /* $OpenBSD: hkdf.h,v 1.2 2018/04/03 13:33:53 tb Exp $ */ 1 + /* $OpenBSD: hkdf.h,v 1.3 2023/08/11 04:52:08 tb Exp $ */ 2 2 /* Copyright (c) 2014, Google Inc. 3 3 * 4 4 * Permission to use, copy, modify, and/or distribute this software for any ··· 33 33 * a key from a password. 34 34 */ 35 35 36 - int HKDF(uint8_t *out_key, size_t out_len, const struct env_md_st *digest, 36 + int HKDF(uint8_t *out_key, size_t out_len, const EVP_MD *digest, 37 37 const uint8_t *secret, size_t secret_len, const uint8_t *salt, 38 38 size_t salt_len, const uint8_t *info, size_t info_len); 39 39 ··· 43 43 * and outputs |out_len| bytes to |out_key|. The maximum output size 44 44 * is |EVP_MAX_MD_SIZE|. It returns one on success and zero on error. 45 45 */ 46 - int HKDF_extract(uint8_t *out_key, size_t *out_len, 47 - const struct env_md_st *digest, const uint8_t *secret, 48 - size_t secret_len, const uint8_t *salt, size_t salt_len); 46 + int HKDF_extract(uint8_t *out_key, size_t *out_len, const EVP_MD *digest, 47 + const uint8_t *secret, size_t secret_len, 48 + const uint8_t *salt, size_t salt_len); 49 49 50 50 /* 51 51 * HKDF_expand computes a HKDF OKM (as specified by RFC 5869) of