libpv: Fix condition in pv_BIO_reset()

pv_BIO_reset() wrongfully handled the BIO_reset() rc for non-file-backed BIOs.
This is currently not an issue as the only non-file BIO used cannot fail
at BIO_reset()

Fixes: 3ab06d77fb ("pvattest: Create, perform, and verify attestation measurements")
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Reviewed-by: Steffen Eiden <seiden@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Marc Hartmayer
2022-07-21 11:43:55 +02:00
committed by Jan Höppner
parent f42250ca9b
commit c3d179f06e

View File

@@ -41,7 +41,7 @@ int pv_BIO_reset(BIO *b)
{
int rc = BIO_reset(b);
if (rc != 1 && (BIO_method_type(b) == BIO_TYPE_FILE && rc != 0))
if (rc != 1 && !(BIO_method_type(b) == BIO_TYPE_FILE && rc == 0))
return -1;
return 1;
}