summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2022-05-05 11:26:37 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2022-05-05 11:26:37 +0000
commit6e5a6c0ef8787708c89bbf3d772a37c0647a1e1b (patch)
tree46ee55d6f5c98f09c3bfa4e621052f31c1b092e6 /lib
parent5b506acaf851b67b0a750a478321baa46eb94dff (diff)
Fix argument order in HKDF and HKDF_extract().
Diffstat (limited to 'lib')
-rw-r--r--lib/libcrypto/kdf/hkdf_evp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libcrypto/kdf/hkdf_evp.c b/lib/libcrypto/kdf/hkdf_evp.c
index 36eae19e2b6..a819e380812 100644
--- a/lib/libcrypto/kdf/hkdf_evp.c
+++ b/lib/libcrypto/kdf/hkdf_evp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hkdf_evp.c,v 1.14 2022/05/05 08:14:14 tb Exp $ */
+/* $OpenBSD: hkdf_evp.c,v 1.15 2022/05/05 11:26:36 tb Exp $ */
/* ====================================================================
* Copyright (c) 2016-2018 The OpenSSL Project. All rights reserved.
*
@@ -242,16 +242,16 @@ pkey_hkdf_derive(EVP_PKEY_CTX *ctx, unsigned char *key,
switch (kctx->mode) {
case EVP_PKEY_HKDEF_MODE_EXTRACT_AND_EXPAND:
- return HKDF(key, *keylen, kctx->md, kctx->salt, kctx->salt_len,
- kctx->key, kctx->key_len, kctx->info, kctx->info_len);
+ return HKDF(key, *keylen, kctx->md, kctx->key, kctx->key_len,
+ kctx->salt, kctx->salt_len, kctx->info, kctx->info_len);
case EVP_PKEY_HKDEF_MODE_EXTRACT_ONLY:
if (key == NULL) {
*keylen = EVP_MD_size(kctx->md);
return 1;
}
- return HKDF_extract(key, keylen, kctx->md, kctx->salt,
- kctx->salt_len, kctx->key, kctx->key_len);
+ return HKDF_extract(key, keylen, kctx->md, kctx->key,
+ kctx->key_len, kctx->salt, kctx->salt_len);
case EVP_PKEY_HKDEF_MODE_EXPAND_ONLY:
return HKDF_expand(key, *keylen, kctx->md, kctx->key,