From: tb Date: Fri, 11 Aug 2023 04:52:08 +0000 (+0000) Subject: Use EVP_MD in HKDF() and HKDF_extract() prototypes X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=aa42de4717fd8df13aeb685263cf463f79b0cd8a;p=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 --- diff --git a/lib/libcrypto/hkdf/hkdf.h b/lib/libcrypto/hkdf/hkdf.h index 34450f9dd7f..6cec526e3e3 100644 --- a/lib/libcrypto/hkdf/hkdf.h +++ b/lib/libcrypto/hkdf/hkdf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: hkdf.h,v 1.2 2018/04/03 13:33:53 tb Exp $ */ +/* $OpenBSD: hkdf.h,v 1.3 2023/08/11 04:52:08 tb Exp $ */ /* Copyright (c) 2014, Google Inc. * * Permission to use, copy, modify, and/or distribute this software for any @@ -33,7 +33,7 @@ extern "C" { * a key from a password. */ -int HKDF(uint8_t *out_key, size_t out_len, const struct env_md_st *digest, +int HKDF(uint8_t *out_key, size_t out_len, const EVP_MD *digest, const uint8_t *secret, size_t secret_len, const uint8_t *salt, size_t salt_len, const uint8_t *info, size_t info_len); @@ -43,9 +43,9 @@ int HKDF(uint8_t *out_key, size_t out_len, const struct env_md_st *digest, * and outputs |out_len| bytes to |out_key|. The maximum output size * is |EVP_MAX_MD_SIZE|. It returns one on success and zero on error. */ -int HKDF_extract(uint8_t *out_key, size_t *out_len, - const struct env_md_st *digest, const uint8_t *secret, - size_t secret_len, const uint8_t *salt, size_t salt_len); +int HKDF_extract(uint8_t *out_key, size_t *out_len, const EVP_MD *digest, + const uint8_t *secret, size_t secret_len, + const uint8_t *salt, size_t salt_len); /* * HKDF_expand computes a HKDF OKM (as specified by RFC 5869) of