"cmdarg-key-fd",
"cmdarg-pwd-fd",
"nvram-backend-dir",
+ "nvram-backend-file",
"tpm-send-command-header",
"flags-opt-startup",
"rsa-keysize-1024",
const char *with_tpm1 = "";
const char *with_tpm2 = "";
char *keysizecaps = NULL;
- const char *nvram_backend_dir = "\"nvram-backend-dir\"";
+ const char *nvram_backend_dir = "\"nvram-backend-dir\", ";
+ const char *nvram_backend_file = "\"nvram-backend-file\"";
ret = get_rsa_keysize_caps(&keysizecaps);
if (ret < 0)
"{ "
"\"type\": \"swtpm\", "
"\"features\": [ "
- "%s%s%s%s%s%s%s%s%s"
+ "%s%s%s%s%s%s%s%s%s%s"
" ], "
"\"version\": \"" VERSION "\" "
"}",
true ? "\"cmdarg-key-fd\", " : "",
true ? "\"cmdarg-pwd-fd\", " : "",
nvram_backend_dir,
+ nvram_backend_file,
keysizecaps ? keysizecaps : ""
);
noncuse='"tpm-send-command-header", "flags-opt-startup", '
fi
-exp='\{ "type": "swtpm", "features": \[ "tpm-1.2",( "tpm-2.0",)? '${noncuse}${seccomp}'"cmdarg-key-fd", "cmdarg-pwd-fd", "nvram-backend-dir" \], "version": "[^"]*" \}'
+exp='\{ "type": "swtpm", "features": \[ "tpm-1.2",( "tpm-2.0",)? '${noncuse}${seccomp}'"cmdarg-key-fd", "cmdarg-pwd-fd", "nvram-backend-dir", "nvram-backend-file" \], "version": "[^"]*" \}'
if ! [[ ${msg} =~ ${exp} ]]; then
echo "Unexpected response from ${SWTPM_IFACE} TPM to --print-capabilities:"
echo "Actual : ${msg}"
fi
# The rsa key size reporting is variable, so use a regex
-exp='\{ "type": "swtpm", "features": \[( "tpm-1.2",)? "tpm-2.0", '${noncuse}${seccomp}'"cmdarg-key-fd", "cmdarg-pwd-fd", "nvram-backend-dir"(, "rsa-keysize-1024")?(, "rsa-keysize-2048")?(, "rsa-keysize-3072")? \], "version": "[^"]*" \}'
+exp='\{ "type": "swtpm", "features": \[( "tpm-1.2",)? "tpm-2.0", '${noncuse}${seccomp}'"cmdarg-key-fd", "cmdarg-pwd-fd", "nvram-backend-dir", "nvram-backend-file"(, "rsa-keysize-1024")?(, "rsa-keysize-2048")?(, "rsa-keysize-3072")? \], "version": "[^"]*" \}'
if ! [[ ${msg} =~ ${exp} ]]; then
echo "Unexpected response from ${SWTPM_IFACE} TPM to --print-capabilities:"
echo "Actual : ${msg}"