From 90224856d6cc454eba6d5eacf4439b2d732acd65 Mon Sep 17 00:00:00 2001 From: lloyd Date: Mon, 21 Apr 2008 15:53:32 +0000 Subject: Add BOTAN_DLL macro in all needed spots for working DLL export. Based on a patch from Joel Low for MSVC, modified and tested with GCC using -fvisibility=hidden and the visibility attribute. Getting this working completely requires making the shared object and static lib builds completely distinct (which is also a win since it allows avoiding -fPIC usage, etc in the static lib). Currently too many things are being exported, though it is an improvement as internal-only code like the bigint_* functions are hidden. --- include/look_pk.h | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) (limited to 'include/look_pk.h') diff --git a/include/look_pk.h b/include/look_pk.h index 3255bfd86..63756ad22 100644 --- a/include/look_pk.h +++ b/include/look_pk.h @@ -13,20 +13,25 @@ namespace Botan { /************************************************* * Get an PK algorithm object * *************************************************/ -PK_Encryptor* get_pk_encryptor(const PK_Encrypting_Key&, const std::string&); -PK_Decryptor* get_pk_decryptor(const PK_Decrypting_Key&, const std::string&); +BOTAN_DLL PK_Encryptor* get_pk_encryptor(const PK_Encrypting_Key&, + const std::string&); -PK_Signer* get_pk_signer(const PK_Signing_Key&, const std::string&, - Signature_Format = IEEE_1363); +BOTAN_DLL PK_Decryptor* get_pk_decryptor(const PK_Decrypting_Key&, + const std::string&); -PK_Verifier* get_pk_verifier(const PK_Verifying_with_MR_Key&, - const std::string&, - Signature_Format = IEEE_1363); -PK_Verifier* get_pk_verifier(const PK_Verifying_wo_MR_Key&, - const std::string&, - Signature_Format = IEEE_1363); +BOTAN_DLL PK_Signer* get_pk_signer(const PK_Signing_Key&, + const std::string&, + Signature_Format = IEEE_1363); -PK_Key_Agreement* get_pk_kas(const PK_Key_Agreement_Key&, const std::string&); +BOTAN_DLL PK_Verifier* get_pk_verifier(const PK_Verifying_with_MR_Key&, + const std::string&, + Signature_Format = IEEE_1363); +BOTAN_DLL PK_Verifier* get_pk_verifier(const PK_Verifying_wo_MR_Key&, + const std::string&, + Signature_Format = IEEE_1363); + +BOTAN_DLL PK_Key_Agreement* get_pk_kas(const PK_Key_Agreement_Key&, + const std::string&); } -- cgit v1.2.3