diff options
author | lloyd <[email protected]> | 2008-04-21 15:53:32 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-04-21 15:53:32 +0000 |
commit | 90224856d6cc454eba6d5eacf4439b2d732acd65 (patch) | |
tree | 284a7afe5ede70c79878dad222891fa155f60512 /src/engine.cpp | |
parent | 272a8523e3c19e1c297b335a316a335db6c7128d (diff) |
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.
Diffstat (limited to 'src/engine.cpp')
-rw-r--r-- | src/engine.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/engine.cpp b/src/engine.cpp index be2d516ec..ceda7e5aa 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -323,7 +323,8 @@ void add_algorithm(BlockCipherModePaddingMethod* algo) /************************************************* * Get a cipher object * *************************************************/ -Keyed_Filter* get_cipher(const std::string& algo_spec, Cipher_Dir direction) +BOTAN_DLL Keyed_Filter* get_cipher(const std::string& algo_spec, + Cipher_Dir direction) { Library_State::Engine_Iterator i(global_state()); @@ -340,8 +341,10 @@ Keyed_Filter* get_cipher(const std::string& algo_spec, Cipher_Dir direction) /************************************************* * Get a cipher object * *************************************************/ -Keyed_Filter* get_cipher(const std::string& algo_spec, const SymmetricKey& key, - const InitializationVector& iv, Cipher_Dir direction) +BOTAN_DLL Keyed_Filter* get_cipher(const std::string& algo_spec, + const SymmetricKey& key, + const InitializationVector& iv, + Cipher_Dir direction) { Keyed_Filter* cipher = get_cipher(algo_spec, direction); cipher->set_key(key); @@ -352,8 +355,9 @@ Keyed_Filter* get_cipher(const std::string& algo_spec, const SymmetricKey& key, /************************************************* * Get a cipher object * *************************************************/ -Keyed_Filter* get_cipher(const std::string& algo_spec, const SymmetricKey& key, - Cipher_Dir direction) +BOTAN_DLL Keyed_Filter* get_cipher(const std::string& algo_spec, + const SymmetricKey& key, + Cipher_Dir direction) { return get_cipher(algo_spec, key, InitializationVector(), direction); } |