genprotimg: add missing return values

Fixes: 65b9fc442c ("genprotimg: introduce new tool for the creation of PV images")
Reviewed-by: Patrick Steuer <patrick.steuer@de.ibm.com>
Reviewed-by: Bjoern Walk <bwalk@linux.ibm.com>
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Marc Hartmayer
2021-06-23 13:13:47 +00:00
committed by Jan Höppner
parent d2611b472b
commit 71a667fbf0
3 changed files with 6 additions and 0 deletions
+2
View File
@@ -1847,6 +1847,7 @@ static gint __encrypt_decrypt_bio(const struct cipher_parms *parms, BIO *b_in,
g_set_error(err, PV_CRYPTO_ERROR,
PV_CRYPTO_ERROR_INTERNAL,
_("BN_add_word failed"));
return -1;
}
g_assert(BN_num_bytes(tweak_num) > 0);
g_assert(BN_num_bytes(tweak_num) <= tweak_size);
@@ -1855,6 +1856,7 @@ static gint __encrypt_decrypt_bio(const struct cipher_parms *parms, BIO *b_in,
g_set_error(err, PV_CRYPTO_ERROR,
PV_CRYPTO_ERROR_INTERNAL,
_("BN_bn2binpad failed"));
return -1;
};
/* set new tweak */