summaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2013-09-16 13:57:57 -0400
committerAdam Ierymenko <adam.ierymenko@gmail.com>2013-09-16 13:57:57 -0400
commite376c6f6a989d99d873918b349405302b62403a5 (patch)
tree446962e3a4d17a6d6aaa2976c2da156f5a5e2a03 /main.cpp
parentceb024ab03a114c8dadbbd393032231069981c45 (diff)
downloadinfinitytier-e376c6f6a989d99d873918b349405302b62403a5.tar.gz
infinitytier-e376c6f6a989d99d873918b349405302b62403a5.zip
New crypto integrated -- going to be testing new identity address generation algo a bit more before finalizing.
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp34
1 files changed, 0 insertions, 34 deletions
diff --git a/main.cpp b/main.cpp
index 41380a2f..a6b684b9 100644
--- a/main.cpp
+++ b/main.cpp
@@ -49,8 +49,6 @@
#include <signal.h>
#endif
-#include <openssl/rand.h>
-
#include "node/Constants.hpp"
#include "node/Defaults.hpp"
#include "node/Utils.hpp"
@@ -58,36 +56,6 @@
using namespace ZeroTier;
-// ---------------------------------------------------------------------------
-// Override libcrypto default RAND_ with Utils::getSecureRandom(), which uses
-// a system strong random source. This is because OpenSSL libcrypto's default
-// RAND_ implementation uses uninitialized memory as one of its entropy
-// sources, which plays havoc with all kinds of debuggers and auditing tools.
-
-static void _zeroTier_rand_cleanup() {}
-static void _zeroTier_rand_add(const void *buf, int num, double add_entropy) {}
-static int _zeroTier_rand_status() { return 1; }
-static void _zeroTier_rand_seed(const void *buf, int num) {}
-static int _zeroTier_rand_bytes(unsigned char *buf, int num)
-{
- Utils::getSecureRandom(buf,num);
- return 1;
-}
-static RAND_METHOD _zeroTierRandMethod = {
- _zeroTier_rand_seed,
- _zeroTier_rand_bytes,
- _zeroTier_rand_cleanup,
- _zeroTier_rand_add,
- _zeroTier_rand_bytes,
- _zeroTier_rand_status
-};
-static void _initLibCrypto()
-{
- RAND_set_rand_method(&_zeroTierRandMethod);
-}
-
-// ---------------------------------------------------------------------------
-
static Node *node = (Node *)0;
static void printHelp(const char *cn,FILE *out)
@@ -145,8 +113,6 @@ int main(int argc,char **argv)
SetConsoleCtrlHandler(&_handlerRoutine,TRUE);
#endif
- _initLibCrypto();
-
const char *homeDir = (const char *)0;
for(int i=1;i<argc;++i) {
if (argv[i][0] == '-') {