diff options
author | lloyd <[email protected]> | 2008-11-06 21:48:13 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-11-06 21:48:13 +0000 |
commit | 94fe0194bbe5d9d5be9b1104cc81825a05e996e5 (patch) | |
tree | c16d586f1415f625e272cf2210b5b70f728adf5c /src/cms/cms_comp.cpp | |
parent | f79a43bbee2977c5ed67f9a6e7d9242aff07964b (diff) |
Fix zlib macro check
Diffstat (limited to 'src/cms/cms_comp.cpp')
-rw-r--r-- | src/cms/cms_comp.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/cms/cms_comp.cpp b/src/cms/cms_comp.cpp index 0d75dae76..60477e8ac 100644 --- a/src/cms/cms_comp.cpp +++ b/src/cms/cms_comp.cpp @@ -10,11 +10,8 @@ #include <botan/oids.h> #include <botan/pipe.h> -#if defined(BOTAN_EXT_COMPRESSOR_ZLIB) +#if defined(BOTAN_HAS_COMPRESSOR_ZLIB) #include <botan/zlib.h> - #define HAVE_ZLIB 1 -#else - #define HAVE_ZLIB 0 #endif namespace Botan { @@ -29,7 +26,7 @@ void CMS_Encoder::compress(const std::string& algo) Filter* compressor = 0; -#if HAVE_ZLIB +#if defined(BOTAN_HAS_COMPRESSOR_ZLIB) if(algo == "Zlib") compressor = new Zlib_Compression; #endif @@ -56,8 +53,11 @@ void CMS_Encoder::compress(const std::string& algo) *************************************************/ bool CMS_Encoder::can_compress_with(const std::string& algo) { - if(HAVE_ZLIB && algo == "Zlib") +#if defined(BOTAN_HAS_COMPRESSOR_ZLIB) + if(algo == "Zlib") return true; +#endif + return false; } @@ -83,7 +83,7 @@ void CMS_Decoder::decompress(BER_Decoder& decoder) info = comp_algo.oid.as_string(); -#if HAVE_ZLIB +#if defined(BOTAN_HAS_COMPRESSOR_ZLIB) if(comp_algo.oid == OIDS::lookup("Compression.Zlib")) { decompressor = new Zlib_Decompression; |