aboutsummaryrefslogtreecommitdiff
path: root/src/common/Cryptography
diff options
context:
space:
mode:
authorNaios <naios-dev@live.de>2016-03-22 19:58:32 +0100
committerNaios <naios-dev@live.de>2016-03-24 01:28:58 +0100
commit501fd9b50232ca3ae3623877c3e521c9c1f894be (patch)
tree073a16994f31aa1ebc28e87b0e9427540f48340a /src/common/Cryptography
parent183f97005573f499d486613119e7bbb3d5d5318b (diff)
Core/Common: Converted the common library to a shared library.
* There is still the possibility to static link against common.
Diffstat (limited to 'src/common/Cryptography')
-rw-r--r--src/common/Cryptography/ARC4.h2
-rw-r--r--src/common/Cryptography/Authentication/PacketCrypt.h2
-rw-r--r--src/common/Cryptography/Authentication/WorldPacketCrypt.h2
-rw-r--r--src/common/Cryptography/BigNumber.h2
-rw-r--r--src/common/Cryptography/HmacHash.cpp4
-rw-r--r--src/common/Cryptography/HmacHash.h2
-rw-r--r--src/common/Cryptography/OpenSSLCrypto.h8
-rw-r--r--src/common/Cryptography/SHA1.h2
-rw-r--r--src/common/Cryptography/SHA256.h2
9 files changed, 14 insertions, 12 deletions
diff --git a/src/common/Cryptography/ARC4.h b/src/common/Cryptography/ARC4.h
index 5b5fbf4a020..df412944ef6 100644
--- a/src/common/Cryptography/ARC4.h
+++ b/src/common/Cryptography/ARC4.h
@@ -22,7 +22,7 @@
#include <openssl/evp.h>
#include "Define.h"
-class ARC4
+class TC_COMMON_API ARC4
{
public:
ARC4(uint32 len);
diff --git a/src/common/Cryptography/Authentication/PacketCrypt.h b/src/common/Cryptography/Authentication/PacketCrypt.h
index 9e13cb02529..8af6c7ae926 100644
--- a/src/common/Cryptography/Authentication/PacketCrypt.h
+++ b/src/common/Cryptography/Authentication/PacketCrypt.h
@@ -22,7 +22,7 @@
class BigNumber;
-class PacketCrypt
+class TC_COMMON_API PacketCrypt
{
public:
PacketCrypt(uint32 rc4InitSize);
diff --git a/src/common/Cryptography/Authentication/WorldPacketCrypt.h b/src/common/Cryptography/Authentication/WorldPacketCrypt.h
index 2b19fb54188..d296b049af2 100644
--- a/src/common/Cryptography/Authentication/WorldPacketCrypt.h
+++ b/src/common/Cryptography/Authentication/WorldPacketCrypt.h
@@ -23,7 +23,7 @@
class BigNumber;
-class WorldPacketCrypt : public PacketCrypt
+class TC_COMMON_API WorldPacketCrypt : public PacketCrypt
{
public:
WorldPacketCrypt();
diff --git a/src/common/Cryptography/BigNumber.h b/src/common/Cryptography/BigNumber.h
index 56fc2196fde..baf338552d0 100644
--- a/src/common/Cryptography/BigNumber.h
+++ b/src/common/Cryptography/BigNumber.h
@@ -25,7 +25,7 @@
struct bignum_st;
-class BigNumber
+class TC_COMMON_API BigNumber
{
public:
BigNumber();
diff --git a/src/common/Cryptography/HmacHash.cpp b/src/common/Cryptography/HmacHash.cpp
index d9bb28d3e0b..bd50a2fc708 100644
--- a/src/common/Cryptography/HmacHash.cpp
+++ b/src/common/Cryptography/HmacHash.cpp
@@ -62,5 +62,5 @@ uint8* HmacHash<HashCreator, DigestLength>::ComputeHash(BigNumber* bn)
return _digest;
}
-template class HmacHash<EVP_sha1, SHA_DIGEST_LENGTH>;
-template class HmacHash<EVP_sha256, SHA256_DIGEST_LENGTH>;
+template class TC_COMMON_API HmacHash<EVP_sha1, SHA_DIGEST_LENGTH>;
+template class TC_COMMON_API HmacHash<EVP_sha256, SHA256_DIGEST_LENGTH>;
diff --git a/src/common/Cryptography/HmacHash.h b/src/common/Cryptography/HmacHash.h
index f61bf251abc..5156d03a18a 100644
--- a/src/common/Cryptography/HmacHash.h
+++ b/src/common/Cryptography/HmacHash.h
@@ -31,7 +31,7 @@ class BigNumber;
typedef EVP_MD const* (*HashCreateFn)();
template<HashCreateFn HashCreator, uint32 DigestLength>
-class HmacHash
+class TC_COMMON_API HmacHash
{
public:
HmacHash(uint32 len, uint8 const* seed);
diff --git a/src/common/Cryptography/OpenSSLCrypto.h b/src/common/Cryptography/OpenSSLCrypto.h
index df1b14b5eda..65155df9af8 100644
--- a/src/common/Cryptography/OpenSSLCrypto.h
+++ b/src/common/Cryptography/OpenSSLCrypto.h
@@ -18,6 +18,8 @@
#ifndef OPENSSL_CRYPTO_H
#define OPENSSL_CRYPTO_H
+#include "Define.h"
+
/**
* A group of functions which setup openssl crypto module to work properly in multithreaded enviroment
* If not setup properly - it will crash
@@ -25,9 +27,9 @@
namespace OpenSSLCrypto
{
/// Needs to be called before threads using openssl are spawned
- void threadsSetup();
+ TC_COMMON_API void threadsSetup();
/// Needs to be called after threads using openssl are despawned
- void threadsCleanup();
+ TC_COMMON_API void threadsCleanup();
}
-#endif \ No newline at end of file
+#endif
diff --git a/src/common/Cryptography/SHA1.h b/src/common/Cryptography/SHA1.h
index 944350265f4..f943e1d2de8 100644
--- a/src/common/Cryptography/SHA1.h
+++ b/src/common/Cryptography/SHA1.h
@@ -26,7 +26,7 @@
class BigNumber;
-class SHA1Hash
+class TC_COMMON_API SHA1Hash
{
public:
typedef std::integral_constant<uint32, SHA_DIGEST_LENGTH> DigestLength;
diff --git a/src/common/Cryptography/SHA256.h b/src/common/Cryptography/SHA256.h
index 33f23f639a4..22d8a9870cf 100644
--- a/src/common/Cryptography/SHA256.h
+++ b/src/common/Cryptography/SHA256.h
@@ -25,7 +25,7 @@
class BigNumber;
-class SHA256Hash
+class TC_COMMON_API SHA256Hash
{
public:
typedef std::integral_constant<uint32, SHA256_DIGEST_LENGTH> DigestLength;