From b9667fcae203a960e5cb55cb8285a5d1b8db65c9 Mon Sep 17 00:00:00 2001 From: lloyd Date: Mon, 10 Feb 2014 22:50:33 +0000 Subject: Check the feature macro before assuming boost.filesystem --- src/lib/cert/x509/certstor.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/lib/cert') diff --git a/src/lib/cert/x509/certstor.cpp b/src/lib/cert/x509/certstor.cpp index 7d708edd9..6bc322d4f 100644 --- a/src/lib/cert/x509/certstor.cpp +++ b/src/lib/cert/x509/certstor.cpp @@ -6,7 +6,10 @@ */ #include + +#if defined(BOTAN_HAS_BOOST_FILESYSTEM) #include +#endif namespace Botan { @@ -113,6 +116,7 @@ Certificate_Store_In_Memory::Certificate_Store_In_Memory(const std::string& dir) if(dir == "") return; +#if defined(BOTAN_HAS_BOOST) boost::filesystem::recursive_directory_iterator i(dir); boost::filesystem::recursive_directory_iterator end; @@ -128,6 +132,9 @@ Certificate_Store_In_Memory::Certificate_Store_In_Memory(const std::string& dir) } catch(...) {} } +#else + throw std::runtime_error("Certificate_Store_In_Memory: FS access disabled"); +#endif } const X509_Certificate* -- cgit v1.2.3