During nvme gen-tls-key generation, the permitted hmac options is 1
for SHA-256 & 2 for SHA-384 respectively for the retained key. But
nvme-cli mistakenly permits an additional option 3 too which defaults
to SHA-256 itself. Rectify this.
Signed-off-by: Martin George <marting@netapp.com>
err = argconfig_parse(argc, argv, desc, opts);
if (err)
return err;
- if (cfg.hmac < 1 || cfg.hmac > 3) {
+ if (cfg.hmac < 1 || cfg.hmac > 2) {
nvme_show_error("Invalid HMAC identifier %u", cfg.hmac);
return -EINVAL;
}