diff options
author | Niels Möller <nisse@lysator.liu.se> | 2012-06-03 22:02:59 +0200 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2012-06-03 22:02:59 +0200 |
commit | adad6eaac2d03fba830eb1630b5458c1ac7f1907 (patch) | |
tree | ea02b675e2cf8f3c6584f35f9f73fd0d072b3428 /rsa-sha256-verify.c | |
parent | 0589865876f8c89047eaee1698071e31956b0480 (diff) | |
download | nettle-adad6eaac2d03fba830eb1630b5458c1ac7f1907.tar.gz |
Changes to pkcs1_signature_prefix interface.
Diffstat (limited to 'rsa-sha256-verify.c')
-rw-r--r-- | rsa-sha256-verify.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/rsa-sha256-verify.c b/rsa-sha256-verify.c index ed8f7d0c..cfb6afb4 100644 --- a/rsa-sha256-verify.c +++ b/rsa-sha256-verify.c @@ -42,10 +42,9 @@ rsa_sha256_verify(const struct rsa_public_key *key, int res; mpz_t m; - assert(key->size > 0); mpz_init(m); - res = (pkcs1_rsa_sha256_encode(m, key->size - 1, hash) + res = (pkcs1_rsa_sha256_encode(m, key->size, hash) &&_rsa_verify(key, m, s)); mpz_clear(m); @@ -61,10 +60,9 @@ rsa_sha256_verify_digest(const struct rsa_public_key *key, int res; mpz_t m; - assert(key->size > 0); mpz_init(m); - res = (pkcs1_rsa_sha256_encode_digest(m, key->size - 1, digest) + res = (pkcs1_rsa_sha256_encode_digest(m, key->size, digest) && _rsa_verify(key, m, s)); mpz_clear(m); |