diff options
| author | tb <> | 2023-08-11 04:52:08 +0000 |
|---|---|---|
| committer | tb <> | 2023-08-11 04:52:08 +0000 |
| commit | 26e17c246c08a4ed6ef78ed3841fb88f6678a823 (patch) | |
| tree | 4d8a861f979442d82157bd13de09981b6841d4d2 | |
| parent | ee70e07b7195b179ba73fc468125496608d8e72d (diff) | |
| download | openbsd-26e17c246c08a4ed6ef78ed3841fb88f6678a823.tar.gz openbsd-26e17c246c08a4ed6ef78ed3841fb88f6678a823.tar.bz2 openbsd-26e17c246c08a4ed6ef78ed3841fb88f6678a823.zip | |
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
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/hkdf/hkdf.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/libcrypto/hkdf/hkdf.h b/src/lib/libcrypto/hkdf/hkdf.h index 34450f9dd7..6cec526e3e 100644 --- a/src/lib/libcrypto/hkdf/hkdf.h +++ b/src/lib/libcrypto/hkdf/hkdf.h | |||
| @@ -1,4 +1,4 @@ | |||
| 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 | /* Copyright (c) 2014, Google Inc. | 2 | /* Copyright (c) 2014, Google Inc. |
| 3 | * | 3 | * |
| 4 | * Permission to use, copy, modify, and/or distribute this software for any | 4 | * Permission to use, copy, modify, and/or distribute this software for any |
| @@ -33,7 +33,7 @@ extern "C" { | |||
| 33 | * a key from a password. | 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 | const uint8_t *secret, size_t secret_len, const uint8_t *salt, | 37 | const uint8_t *secret, size_t secret_len, const uint8_t *salt, |
| 38 | size_t salt_len, const uint8_t *info, size_t info_len); | 38 | size_t salt_len, const uint8_t *info, size_t info_len); |
| 39 | 39 | ||
| @@ -43,9 +43,9 @@ int HKDF(uint8_t *out_key, size_t out_len, const struct env_md_st *digest, | |||
| 43 | * and outputs |out_len| bytes to |out_key|. The maximum output size | 43 | * and outputs |out_len| bytes to |out_key|. The maximum output size |
| 44 | * is |EVP_MAX_MD_SIZE|. It returns one on success and zero on error. | 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, | 46 | int HKDF_extract(uint8_t *out_key, size_t *out_len, const EVP_MD *digest, |
| 47 | const struct env_md_st *digest, const uint8_t *secret, | 47 | const uint8_t *secret, size_t secret_len, |
| 48 | size_t secret_len, const uint8_t *salt, size_t salt_len); | 48 | const uint8_t *salt, size_t salt_len); |
| 49 | 49 | ||
| 50 | /* | 50 | /* |
| 51 | * HKDF_expand computes a HKDF OKM (as specified by RFC 5869) of | 51 | * HKDF_expand computes a HKDF OKM (as specified by RFC 5869) of |
