aboutsummaryrefslogtreecommitdiffstats
path: root/doc/examples/encrypt.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-09-24 11:54:00 +0000
committerlloyd <[email protected]>2008-09-24 11:54:00 +0000
commit6620327c8c79c8bcf897500ce12021285017ac5a (patch)
treeac14a3fb8e8ea576692f607c4415155f1ca28848 /doc/examples/encrypt.cpp
parentcaebef52b255130a3d7fa88e312b2d0891b90a45 (diff)
If the Zlib module is not compiled in, don't #error and abort the whole
compile, just skip adding a Zlib filter into the Pipe.
Diffstat (limited to 'doc/examples/encrypt.cpp')
-rw-r--r--doc/examples/encrypt.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/doc/examples/encrypt.cpp b/doc/examples/encrypt.cpp
index e5245cd5d..7c8649004 100644
--- a/doc/examples/encrypt.cpp
+++ b/doc/examples/encrypt.cpp
@@ -28,8 +28,6 @@ This file is in the public domain
#if defined(BOTAN_EXT_COMPRESSOR_ZLIB)
#include <botan/zlib.h>
-#else
- #error "You didn't compile the zlib module into Botan"
#endif
using namespace Botan;
@@ -141,7 +139,10 @@ int main(int argc, char* argv[])
new Chain(new MAC_Filter("HMAC(SHA-1)", mac_key),
new Base64_Encoder
),
- new Chain(new Zlib_Compression,
+ new Chain(
+#ifdef BOTAN_EXT_COMPRESSOR_ZLIB
+ new Zlib_Compression,
+#endif
get_cipher(algo + "/CBC", bc_key, iv, ENCRYPTION),
new Base64_Encoder(true)
)