aboutsummaryrefslogtreecommitdiff
path: root/src/lib/crypt_ops/crypto_init.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-07-11 13:44:35 -0400
committerNick Mathewson <nickm@torproject.org>2018-07-11 13:45:49 -0400
commit12a1ada15853f0cde2839921bf413ba24a741192 (patch)
tree7c65cff1ce333947a201e13c66ed33d5c965b223 /src/lib/crypt_ops/crypto_init.h
parent79267bad654ed39f13e6fb89a5468f23468c3169 (diff)
downloadtor-12a1ada15853f0cde2839921bf413ba24a741192.tar.gz
tor-12a1ada15853f0cde2839921bf413ba24a741192.zip
Move the initialization and cleanup parts of crypto.c
These are now part of crypto_init.c. The openssl-only parts now live in crypto_openssl_mgt.c. I recommend reviewing this patch with -b and --color-moved.
Diffstat (limited to 'src/lib/crypt_ops/crypto_init.h')
-rw-r--r--src/lib/crypt_ops/crypto_init.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/lib/crypt_ops/crypto_init.h b/src/lib/crypt_ops/crypto_init.h
new file mode 100644
index 0000000000..e450e2d894
--- /dev/null
+++ b/src/lib/crypt_ops/crypto_init.h
@@ -0,0 +1,28 @@
+/* Copyright (c) 2001, Matej Pfajfar.
+ * Copyright (c) 2001-2004, Roger Dingledine.
+ * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
+ * Copyright (c) 2007-2018, The Tor Project, Inc. */
+/* See LICENSE for licensing information */
+
+/**
+ * \file crypto_init.h
+ *
+ * \brief Headers for crypto_init.c
+ **/
+
+#ifndef TOR_CRYPTO_INIT_H
+#define TOR_CRYPTO_INIT_H
+
+#include "orconfig.h"
+#include "lib/cc/compat_compiler.h"
+
+int crypto_init_siphash_key(void);
+int crypto_early_init(void) ATTR_WUR;
+int crypto_global_init(int hardwareAccel,
+ const char *accelName,
+ const char *accelPath) ATTR_WUR;
+
+void crypto_thread_cleanup(void);
+int crypto_global_cleanup(void);
+
+#endif /* !defined(TOR_CRYPTO_H) */