diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-12-13 20:22:34 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-01-30 08:37:22 -0500 |
commit | e2aeaeb76c2fd04a8b5934b7682823d77dc6f064 (patch) | |
tree | 3317493ff9a96506017bf4122cf2aaf55f57b120 /src/common/crypto.h | |
parent | 60769e710f1099168f7508fe6834e458ce435ad9 (diff) | |
download | tor-e2aeaeb76c2fd04a8b5934b7682823d77dc6f064.tar.gz tor-e2aeaeb76c2fd04a8b5934b7682823d77dc6f064.zip |
Make a bunch of signature/digest-checking functions mockable
Diffstat (limited to 'src/common/crypto.h')
-rw-r--r-- | src/common/crypto.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/common/crypto.h b/src/common/crypto.h index bf2fa06aaa..43328f5bce 100644 --- a/src/common/crypto.h +++ b/src/common/crypto.h @@ -178,10 +178,12 @@ int crypto_pk_public_encrypt(crypto_pk_t *env, char *to, size_t tolen, int crypto_pk_private_decrypt(crypto_pk_t *env, char *to, size_t tolen, const char *from, size_t fromlen, int padding, int warnOnFailure); -int crypto_pk_public_checksig(const crypto_pk_t *env, char *to, size_t tolen, - const char *from, size_t fromlen); -int crypto_pk_public_checksig_digest(crypto_pk_t *env, const char *data, - size_t datalen, const char *sig, size_t siglen); +MOCK_DECL(int, crypto_pk_public_checksig,(const crypto_pk_t *env, + char *to, size_t tolen, + const char *from, size_t fromlen)); +MOCK_DECL(int, crypto_pk_public_checksig_digest,(crypto_pk_t *env, + const char *data, size_t datalen, + const char *sig, size_t siglen)); int crypto_pk_private_sign(const crypto_pk_t *env, char *to, size_t tolen, const char *from, size_t fromlen); int crypto_pk_private_sign_digest(crypto_pk_t *env, char *to, size_t tolen, |