[PATCH blktests 06/10] common/nvme: add '--tls' argument to _nvme_connect_subsys()

Shin'ichiro Kawasaki shinichiro.kawasaki at wdc.com
Wed Apr 2 00:09:02 PDT 2025


From: Hannes Reinecke <hare at suse.de>

To start TLS-encrypted connections.

Signed-off-by: Hannes Reinecke <hare at suse.de>
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki at wdc.com>
---
 common/nvme | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/common/nvme b/common/nvme
index 3761329..9327dff 100644
--- a/common/nvme
+++ b/common/nvme
@@ -274,6 +274,7 @@ _nvme_connect_subsys() {
 	local no_wait=false
 	local hdr_digest=false
 	local data_digest=false
+	local tls=false
 	local port
 	local i
 	local -a ARGS
@@ -340,6 +341,10 @@ _nvme_connect_subsys() {
 				data_digest=true
 				shift 1
 				;;
+			--tls)
+				tls=true
+				shift 1
+				;;
 			*)
 				echo "WARNING: unknown argument: $1"
 				shift
@@ -397,6 +402,9 @@ _nvme_connect_subsys() {
 	if [[ ${data_digest} = true ]]; then
 		ARGS+=(--data-digest)
 	fi
+	if [[ ${tls} = true ]]; then
+		ARGS+=(--tls)
+	fi
 	ARGS+=(-o json)
 	connect=$(nvme connect "${ARGS[@]}" 2> /dev/null)
 
-- 
2.49.0




More information about the Linux-nvme mailing list