+15
−9
Loading
Occasionally DHVLEN sent by nvme_auth_send_reply() is incorrect. By NVMe spec "DHVLEN shall be a multiple of 4", but spdk_nvme_dhchap_dhkey_get_pubkey() sometimes returns key length 1023 where expected is 1024, 511 instead of 512 etc. Issue occurs because BN_num_bytes() doesn't count for unsignificant bits. The solution is to use EVP_PKEY_get_bits() to get key length. Fixes #3400 Change-Id: I0222f9e78310c92e05e9e1de1b976a5af83913ac Signed-off-by:Marcin Galecki <marcin.galecki@dell.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/23562 Reviewed-by:
Jim Harris <jim.harris@samsung.com> Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Reviewed-by:
Konrad Sztyber <konrad.sztyber@intel.com>