libnvme/0001-linux-fix-derive_psk_digest-OpenSSL-1.1-version.patch
Daniel Wagner 35463ffb80 - Update to version 1.11:
* prefix: Use Request or Response Length in DLEN and DOFF for MI
  * types: Add ETPVDS and SSI fields of sanitize status log
  * json: do not escape strings when printing the configuration
  * tree: do no export tls keys when not provided by user
  * types: add struct nvme_id_ctrl_nvm ver and lbamqf member variables
  * types: add NVMe 2.1 get log page LIDs
  * type: Added enums for ANSAN and RGCNS bit of OAES field
  * linux: fixup PSK HMAC type '0' handling
  * util: added error code for ENOKEY
  * fabrics: fix map error level in __nvmf_add_ctrl
  * fabrics: add ctrl connect interface
  * fabrics: use hex numbers when generating command line options
  * fabrics: rename first argument for argument macros
  * linux: handle key import correctly
  * linux: export keys to config
  * tree: read tls_configured_key and tls_keyring from sysfs
  * tree: move dhchap and tls sysfs parser into separate functions
  * json: move keystore operations out of the JSON parser
  * tree: add getter/setters for TLS PSK
  * linux: add import/export function for TLS pre-shared keys
  * linux: only return the description of a key
  * linux: use ssize_t as return type for nvme_identity_len
  * linux: reorder variable declarations
  * types: Added enum for SMVES event of PEL log
  * libnvme: add lockdown log page support(LID : 0x14)
  * libnvme: add EMVS support to sanitize command
  * types: Add TP4159 PCIe Infrastructure for Live Migration definitions
  * types: add NVME_CTRL_OAES get macro definitions
  * types: add NVME_CTRL_OAES_TTHR definition

OBS-URL: https://build.opensuse.org/package/show/Base:System/libnvme?expand=0&rev=61
2024-10-31 15:26:10 +00:00

40 lines
1.2 KiB
Diff

From 81073a178c198a1b7f08964300905cbec595c14e Mon Sep 17 00:00:00 2001
From: Daniel Wagner <wagi@kernel.org>
Date: Thu, 31 Oct 2024 14:54:21 +0100
Subject: [PATCH] linux: fix derive_psk_digest OpenSSL 1.1 version
The reordering of the variables broke derive_psk_digest OpenSSL 1.1
version.
Fixes: 4cc727d19221 ("linux: reorder variable declarations")
Signed-off-by: Daniel Wagner <wagi@kernel.org>
---
src/nvme/linux.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/nvme/linux.c b/src/nvme/linux.c
index e74fac20ba18..0d48792431d0 100644
--- a/src/nvme/linux.c
+++ b/src/nvme/linux.c
@@ -881,14 +881,14 @@ int nvme_gen_dhchap_key(char *hostnqn, enum nvme_hmac_alg hmac,
}
static int derive_psk_digest(const char *hostnqn, const char *subsysnqn,
- int version, int hmac,
+ int version, int cipher,
unsigned char *retained, size_t key_len,
char *digest, size_t digest_len)
{
static const char hmac_seed[] = "NVMe-over-Fabrics";
- const EVP_MD *md = select_hmac(hmac, &hmac_len);
_cleanup_hmac_ctx_ HMAC_CTX *hmac_ctx = NULL;
_cleanup_free_ unsigned char *psk_ctx = NULL;
+ const EVP_MD *md;
size_t hmac_len;
size_t len;
--
2.47.0