mirror of
https://github.com/stefanberger/swtpm.git
synced 2026-02-05 05:59:18 +00:00
swtpm: Log an error if data encryption failed
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
This commit is contained in:
parent
73fb0412ea
commit
60afebf116
@ -382,6 +382,10 @@ SWTPM_NVRAM_StoreData_Intern(const unsigned char *data,
|
||||
if (rc == 0 && encrypt) {
|
||||
rc = SWTPM_NVRAM_EncryptData(&filekey, &encrypt_data, &encrypt_length,
|
||||
data, length);
|
||||
if (rc) {
|
||||
logprintf(STDERR_FILENO,
|
||||
"SWTPM_NVRAM_EncryptData failed: 0x%02x\n", rc);
|
||||
}
|
||||
if (encrypt_data) {
|
||||
TPM_DEBUG(" SWTPM_NVRAM_StoreData: Encrypted %u bytes before "
|
||||
"write, will write %u bytes\n", length, encrypt_length);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user