summaryrefslogtreecommitdiffstats
path: root/libmincrypt/rsa.c
diff options
context:
space:
mode:
Diffstat (limited to 'libmincrypt/rsa.c')
-rw-r--r--libmincrypt/rsa.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/libmincrypt/rsa.c b/libmincrypt/rsa.c
index b4ee6af..0cdbaa2 100644
--- a/libmincrypt/rsa.c
+++ b/libmincrypt/rsa.c
@@ -30,23 +30,26 @@
int RSA_e_f4_verify(const RSAPublicKey* key,
const uint8_t* signature,
const int len,
- const uint8_t* sha);
+ const uint8_t* hash,
+ const int hash_len);
int RSA_e_3_verify(const RSAPublicKey *key,
const uint8_t *signature,
const int len,
- const uint8_t *sha);
+ const uint8_t *hash,
+ const int hash_len);
int RSA_verify(const RSAPublicKey *key,
const uint8_t *signature,
const int len,
- const uint8_t *sha) {
+ const uint8_t *hash,
+ const int hash_len) {
switch (key->exponent) {
case 3:
- return RSA_e_3_verify(key, signature, len, sha);
+ return RSA_e_3_verify(key, signature, len, hash, hash_len);
break;
case 65537:
- return RSA_e_f4_verify(key, signature, len, sha);
+ return RSA_e_f4_verify(key, signature, len, hash, hash_len);
break;
default:
return 0;