reverted 4541, does not fix the problem

This commit is contained in:
Martin Willi 2008-11-03 09:44:20 +00:00
parent 9c33987471
commit d6dc9db5ef
1 changed files with 8 additions and 0 deletions

View File

@ -90,7 +90,15 @@ 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);
DBG1("%s sig: %B", valid ? "good" : "bad", &signature);
error:
if (key)