aboutsummaryrefslogtreecommitdiff
path: root/src/common/crypto.h
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@gmail.com>2011-11-24 00:22:31 +0100
committerGeorge Kadianakis <desnacked@gmail.com>2011-11-24 22:13:44 +0100
commit8a726dd0dd28c4550a7f6f7d9aa5f72507d4716b (patch)
treeaff61b52c21fb9bcd8faa1bd5242cbb09f060a13 /src/common/crypto.h
parent42bda231ee10db0136cf2ffb56a38ce290891794 (diff)
downloadtor-8a726dd0dd28c4550a7f6f7d9aa5f72507d4716b.tar
tor-8a726dd0dd28c4550a7f6f7d9aa5f72507d4716b.tar.gz
Implement dynamic prime reading and storing to disk.
Diffstat (limited to 'src/common/crypto.h')
-rw-r--r--src/common/crypto.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/common/crypto.h b/src/common/crypto.h
index b759459d4..5b753b83d 100644
--- a/src/common/crypto.h
+++ b/src/common/crypto.h
@@ -16,6 +16,8 @@
#include <stdio.h>
#include "torint.h"
+#include <openssl/bn.h>
+
/** Length of the output of our message digest. */
#define DIGEST_LEN 20
/** Length of the output of our second (improved) message digests. (For now
@@ -93,6 +95,10 @@ int crypto_global_cleanup(void);
crypto_pk_env_t *crypto_new_pk_env(void);
void crypto_free_pk_env(crypto_pk_env_t *env);
+void crypto_set_tls_dh_prime(int use_dynamic_primes,
+ BIGNUM *stored_dynamic_prime);
+BIGNUM * crypto_get_tls_dh_prime(void);
+
/* convenience function: wraps crypto_create_crypto_env, set_key, and init. */
crypto_cipher_env_t *crypto_create_init_cipher(const char *key,
int encrypt_mode);