removed 0-byte truncation, fixes random Openssl RSA signature verification failures
This commit is contained in:
@@ -90,13 +90,6 @@ static bool verify_emsa_pkcs1_signature(private_openssl_rsa_public_key_t *this,
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* remove any preceding 0-bytes from signature */
|
||||
while (signature.len && *(signature.ptr) == 0x00)
|
||||
{
|
||||
signature.len -= 1;
|
||||
signature.ptr++;
|
||||
}
|
||||
|
||||
valid = (EVP_VerifyFinal(ctx, signature.ptr, signature.len, key) == 1);
|
||||
|
||||
error:
|
||||
|
||||
Reference in New Issue
Block a user