@@ -9181,7 +9181,7 @@ static int gen_tls_key(int argc, char **argv, struct command *command, struct pl
91819181 const char * secret =
91829182 "Optional secret (in hexadecimal characters) to be used for the TLS key." ;
91839183 const char * hmac = "HMAC function to use for the retained key (1 = SHA-256, 2 = SHA-384)." ;
9184- const char * identity = "TLS identity version to use (0 = NVMe TCP 1.0c, 1 = NVMe TCP 2.0" ;
9184+ const char * version = "TLS identity version to use (0 = NVMe TCP 1.0c, 1 = NVMe TCP 2.0" ;
91859185 const char * hostnqn = "Host NQN for the retained key." ;
91869186 const char * subsysnqn = "Subsystem NQN for the retained key." ;
91879187 const char * keyring = "Keyring for the retained key." ;
@@ -9202,7 +9202,7 @@ static int gen_tls_key(int argc, char **argv, struct command *command, struct pl
92029202 char * subsysnqn ;
92039203 char * secret ;
92049204 unsigned char hmac ;
9205- unsigned char identity ;
9205+ unsigned char version ;
92069206 bool insert ;
92079207 };
92089208
@@ -9213,7 +9213,7 @@ static int gen_tls_key(int argc, char **argv, struct command *command, struct pl
92139213 .subsysnqn = NULL ,
92149214 .secret = NULL ,
92159215 .hmac = 1 ,
9216- .identity = 0 ,
9216+ .version = 0 ,
92179217 .insert = false,
92189218 };
92199219
@@ -9224,7 +9224,7 @@ static int gen_tls_key(int argc, char **argv, struct command *command, struct pl
92249224 OPT_STR ("subsysnqn" , 'c' , & cfg .subsysnqn , subsysnqn ),
92259225 OPT_STR ("secret" , 's' , & cfg .secret , secret ),
92269226 OPT_BYTE ("hmac" , 'm' , & cfg .hmac , hmac ),
9227- OPT_BYTE ("identity" , 'I' , & cfg .identity , identity ),
9227+ OPT_BYTE ("identity" , 'I' , & cfg .version , version ),
92289228 OPT_FLAG ("insert" , 'i' , & cfg .insert , insert ));
92299229
92309230 err = parse_args (argc , argv , desc , opts );
@@ -9234,9 +9234,9 @@ static int gen_tls_key(int argc, char **argv, struct command *command, struct pl
92349234 nvme_show_error ("Invalid HMAC identifier %u" , cfg .hmac );
92359235 return - EINVAL ;
92369236 }
9237- if (cfg .identity > 1 ) {
9237+ if (cfg .version > 1 ) {
92389238 nvme_show_error ("Invalid TLS identity version %u" ,
9239- cfg .identity );
9239+ cfg .version );
92409240 return - EINVAL ;
92419241 }
92429242 if (cfg .insert ) {
@@ -9288,7 +9288,7 @@ static int gen_tls_key(int argc, char **argv, struct command *command, struct pl
92889288 if (cfg .insert ) {
92899289 tls_key = nvme_insert_tls_key_versioned (cfg .keyring ,
92909290 cfg .keytype , cfg .hostnqn ,
9291- cfg .subsysnqn , cfg .identity ,
9291+ cfg .subsysnqn , cfg .version ,
92929292 cfg .hmac , raw_secret , key_len );
92939293 if (tls_key <= 0 ) {
92949294 nvme_show_error ("Failed to insert key, error %d" , errno );
0 commit comments