summaryrefslogtreecommitdiffstats
path: root/crypto.h
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2008-11-18 01:25:05 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2008-11-18 01:25:05 +0000
commit03bfb228ffd95c37e135bb9a5a37160c247e28a9 (patch)
tree62fe17de8cce142be0749cf4a07509246b02f48b /crypto.h
parentf158465dadea526e3184deccf6f520eab44501fa (diff)
downloadopenvpn-03bfb228ffd95c37e135bb9a5a37160c247e28a9.tar.gz
openvpn-03bfb228ffd95c37e135bb9a5a37160c247e28a9.tar.xz
openvpn-03bfb228ffd95c37e135bb9a5a37160c247e28a9.zip
Added --prng option to control PRNG (pseudo-random
number generator) parameters. In previous OpenVPN versions, the PRNG was hardcoded to use the SHA1 hash. Now any OpenSSL hash may be used. This is part of an effort to remove hardcoded references to a specific cipher or cryptographic hash algorithm. git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@3503 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'crypto.h')
-rw-r--r--crypto.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/crypto.h b/crypto.h
index 448e8ad..9a677d0 100644
--- a/crypto.h
+++ b/crypto.h
@@ -329,8 +329,11 @@ void crypto_adjust_frame_parameters(struct frame *frame,
bool packet_id,
bool packet_id_long_form);
-void prng_init (void);
+#define NONCE_SECRET_LEN_MIN 16
+#define NONCE_SECRET_LEN_MAX 64
+void prng_init (const char *md_name, const int nonce_secret_len_parm);
void prng_bytes (uint8_t *output, int len);
+void prng_uninit ();
void test_crypto (const struct crypto_options *co, struct frame* f);