summaryrefslogtreecommitdiffstats
path: root/src/libktorrent
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2025-05-25 10:14:14 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2025-06-30 16:08:12 +0900
commit7e90bb1967477b331f134e27d6f0ea4cc69ffb0a (patch)
treed84a9a28035f9d9f86a76dfdb41e7a35fe2ca381 /src/libktorrent
parentf95d80e61e0b55201184b844cbf059efc574c2f0 (diff)
downloadktorrent-7e90bb19.tar.gz
ktorrent-7e90bb19.zip
Add cmake rules for utests and fix tester program
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit edc958f6e74feb036c90bfa55f40df1c55c37153)
Diffstat (limited to 'src/libktorrent')
-rw-r--r--src/libktorrent/kademlia/rpcmsg.h3
-rw-r--r--src/libktorrent/mse/bigint.h3
-rw-r--r--src/libktorrent/mse/functions.h10
-rw-r--r--src/libktorrent/mse/rc4encryptor.h5
4 files changed, 13 insertions, 8 deletions
diff --git a/src/libktorrent/kademlia/rpcmsg.h b/src/libktorrent/kademlia/rpcmsg.h
index acdae14..be8f418 100644
--- a/src/libktorrent/kademlia/rpcmsg.h
+++ b/src/libktorrent/kademlia/rpcmsg.h
@@ -24,6 +24,7 @@
#include <util/constants.h>
#include "key.h"
#include "database.h"
+#include <libktorrent_export.h>
namespace bt
{
@@ -128,7 +129,7 @@ namespace dht
*/
MsgBase* MakeRPCMsg(bt::BDictNode* dict,RPCServer* srv);
- MsgBase* MakeRPCMsgTest(bt::BDictNode* dict,dht::Method req_method);
+ LIBKTORRENT_EXPORT MsgBase* MakeRPCMsgTest(bt::BDictNode* dict,dht::Method req_method);
class ErrMsg : public MsgBase
{
diff --git a/src/libktorrent/mse/bigint.h b/src/libktorrent/mse/bigint.h
index 39bb865..5cd1940 100644
--- a/src/libktorrent/mse/bigint.h
+++ b/src/libktorrent/mse/bigint.h
@@ -24,6 +24,7 @@
#include <util/constants.h>
#include <stdio.h>
#include <gmp.h>
+#include <libktorrent_export.h>
using bt::Uint8;
using bt::Uint16;
@@ -39,7 +40,7 @@ namespace mse
* Class which can hold an arbitrary large integer. This will be a very important part of our
* MSE implementation.
*/
- class BigInt
+ class LIBKTORRENT_EXPORT BigInt
{
public:
/**
diff --git a/src/libktorrent/mse/functions.h b/src/libktorrent/mse/functions.h
index 95e8e5d..a5e7cab 100644
--- a/src/libktorrent/mse/functions.h
+++ b/src/libktorrent/mse/functions.h
@@ -20,6 +20,8 @@
#ifndef MSEFUNCTIONS_H
#define MSEFUNCTIONS_H
+#include <libktorrent_export.h>
+
namespace bt
{
class SHA1Hash;
@@ -29,11 +31,11 @@ namespace mse
{
class BigInt;
- void GeneratePublicPrivateKey(BigInt & pub,BigInt & priv);
- BigInt DHSecret(const BigInt & our_priv,const BigInt & peer_pub);
- bt::SHA1Hash EncryptionKey(bool a,const BigInt & s,const bt::SHA1Hash & skey);
+ LIBKTORRENT_EXPORT void GeneratePublicPrivateKey(BigInt & pub,BigInt & priv);
+ LIBKTORRENT_EXPORT BigInt DHSecret(const BigInt & our_priv,const BigInt & peer_pub);
+ LIBKTORRENT_EXPORT bt::SHA1Hash EncryptionKey(bool a,const BigInt & s,const bt::SHA1Hash & skey);
- void DumpBigInt(const TQString & name,const BigInt & bi);
+ LIBKTORRENT_EXPORT void DumpBigInt(const TQString & name,const BigInt & bi);
}
#endif
diff --git a/src/libktorrent/mse/rc4encryptor.h b/src/libktorrent/mse/rc4encryptor.h
index 650b54e..c36b9c6 100644
--- a/src/libktorrent/mse/rc4encryptor.h
+++ b/src/libktorrent/mse/rc4encryptor.h
@@ -22,6 +22,7 @@
#include <util/sha1hash.h>
#include <util/constants.h>
+#include <libktorrent_export.h>
using bt::Uint8;
using bt::Uint32;
@@ -31,7 +32,7 @@ namespace mse
/**
* Helper class to do the actual encryption / decryption
*/
- class RC4
+ class LIBKTORRENT_EXPORT RC4
{
Uint8 i,j;
Uint8 s[256];
@@ -50,7 +51,7 @@ namespace mse
* This class has a static encryption buffer, which makes it not thread safe
* because the buffer is not protected by mutexes.
*/
- class RC4Encryptor
+ class LIBKTORRENT_EXPORT RC4Encryptor
{
RC4 enc,dec;
public: