aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--extension/opensslmanager.cpp20
-rw-r--r--extension/opensslthread.cpp6
2 files changed, 7 insertions, 19 deletions
diff --git a/extension/opensslmanager.cpp b/extension/opensslmanager.cpp
index d97ea2c..db30886 100644
--- a/extension/opensslmanager.cpp
+++ b/extension/opensslmanager.cpp
@@ -134,7 +134,7 @@ static void SHA512_File(FILE *file, unsigned char **output, int *outlength)
SHA512_CTX c;
int i;
unsigned char buf[SHA512_FILE_BUFFER_SIZE];
-
+
SHA512_Init(&c);
for (;;)
{
@@ -230,20 +230,6 @@ bool OpensslManager::HashString(Openssl_Hash algorithm, unsigned char *input, in
MD5(input, size, output);
*outlength = MD5_DIGEST_LENGTH;
return true;
- case Openssl_Hash_MD4:
- MD4(input, size, output);
- *outlength = MD4_DIGEST_LENGTH;
- return true;
- //case Openssl_Hash_MD2:
- // MD2(input, size, output);
- // *outlength = MD2_DIGEST_LENGTH;
- // return true;
- return false;
- //case Openssl_Hash_SHA:
- // SHA(input, size, output);
- // *outlength = SHA_DIGEST_LENGTH;
- // return true;
- return false;
case Openssl_Hash_SHA1:
SHA1(input, size, output);
*outlength = SHA_DIGEST_LENGTH;
@@ -264,10 +250,6 @@ bool OpensslManager::HashString(Openssl_Hash algorithm, unsigned char *input, in
SHA512(input, size, output);
*outlength = SHA512_DIGEST_LENGTH;
return true;
- case Openssl_Hash_RIPEMD160:
- RIPEMD160(input, size, output);
- *outlength = RIPEMD160_DIGEST_LENGTH;
- return true;
}
return false;
diff --git a/extension/opensslthread.cpp b/extension/opensslthread.cpp
index 84e2286..e735b93 100644
--- a/extension/opensslthread.cpp
+++ b/extension/opensslthread.cpp
@@ -1,5 +1,11 @@
#include "opensslthread.h"
+// Yes. I know. I will make this not use fopen. Shut up.
+#ifdef _WIN32
+#pragma warning(disable:4996)
+#define _CRT_SECURE_NO_WARNINGS 1
+#define CRT_SECURE_NO_WARNINGS 1
+#endif
OpensslThread::OpensslThread(void *_data, OpensslThread_Type _type):
type(_type),data(_data)