summaryrefslogtreecommitdiff
path: root/src/common/crypto.h
diff options
context:
space:
mode:
authorOla Bini <ola@olabini.se>2015-09-15 17:09:18 +0200
committerOla Bini <ola@olabini.se>2015-09-15 17:09:18 +0200
commit94e5db3dca3abfc93a57287516177f14d395ae3f (patch)
tree5196bb43edf39b9c55b1213c7640b59db7218ea3 /src/common/crypto.h
parenta444b11323799536b4cd7902e29f711b0806293a (diff)
downloadtor-94e5db3dca3abfc93a57287516177f14d395ae3f.tar.gz
tor-94e5db3dca3abfc93a57287516177f14d395ae3f.zip
Add tests for tortls.c
Diffstat (limited to 'src/common/crypto.h')
-rw-r--r--src/common/crypto.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/common/crypto.h b/src/common/crypto.h
index 6256f7346b..ede7d5b0d6 100644
--- a/src/common/crypto.h
+++ b/src/common/crypto.h
@@ -119,7 +119,7 @@ void crypto_thread_cleanup(void);
int crypto_global_cleanup(void);
/* environment setup */
-crypto_pk_t *crypto_pk_new(void);
+MOCK_DECL(crypto_pk_t *,crypto_pk_new,(void));
void crypto_pk_free(crypto_pk_t *env);
void crypto_set_tls_dh_prime(void);
@@ -128,7 +128,7 @@ crypto_cipher_t *crypto_cipher_new_with_iv(const char *key, const char *iv);
void crypto_cipher_free(crypto_cipher_t *env);
/* public key crypto */
-int crypto_pk_generate_key_with_bits(crypto_pk_t *env, int bits);
+MOCK_DECL(int, crypto_pk_generate_key_with_bits,(crypto_pk_t *env, int bits));
#define crypto_pk_generate_key(env) \
crypto_pk_generate_key_with_bits((env), (PK_BYTES*8))
@@ -289,11 +289,10 @@ struct evp_pkey_st;
struct dh_st;
struct rsa_st *crypto_pk_get_rsa_(crypto_pk_t *env);
crypto_pk_t *crypto_new_pk_from_rsa_(struct rsa_st *rsa);
-struct evp_pkey_st *crypto_pk_get_evp_pkey_(crypto_pk_t *env,
- int private);
+MOCK_DECL(struct evp_pkey_st *, crypto_pk_get_evp_pkey_,(crypto_pk_t *env,
+ int private));
struct dh_st *crypto_dh_get_dh_(crypto_dh_t *dh);
void crypto_add_spaces_to_fp(char *out, size_t outlen, const char *in);
#endif
-