Change LIBSODIUM_ERROR to -1.

We only relied on success being 0 and our code was otherwise agnostic to the
actual return code in the event of failed signature verification, but this
change keeps the API consistent.
This commit is contained in:
Sean Bowe 2020-07-03 09:37:34 -06:00
parent 394947de3a
commit c3b3e07160
No known key found for this signature in database
GPG Key ID: 95684257D8F8B031
2 changed files with 2 additions and 2 deletions

View File

@ -48,7 +48,7 @@ void ZIP215Check(
}
if (!valid_zip215) {
expected_zip215 = 1;
expected_zip215 = -1;
}
EXPECT_EQ(

View File

@ -1345,7 +1345,7 @@ pub extern "system" fn librustzcash_mmr_hash_node(
// mimic the `crypto_sign_verify_detached` API in libsodium, but uses
// the ed25519-zebra crate internally instead.
const LIBSODIUM_OK: isize = 0;
const LIBSODIUM_ERROR: isize = 1;
const LIBSODIUM_ERROR: isize = -1;
#[no_mangle]
pub extern "system" fn librustzcash_zebra_crypto_sign_verify_detached(