aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/cert/x509
diff options
context:
space:
mode:
authorlloyd <[email protected]>2014-02-10 22:50:33 +0000
committerlloyd <[email protected]>2014-02-10 22:50:33 +0000
commitb9667fcae203a960e5cb55cb8285a5d1b8db65c9 (patch)
tree2946e29427831761fb400a96b2a84121b549c494 /src/lib/cert/x509
parent07c80ecfccb9cd594993be001a46a087e70269ed (diff)
Check the feature macro before assuming boost.filesystem
Diffstat (limited to 'src/lib/cert/x509')
-rw-r--r--src/lib/cert/x509/certstor.cpp7
1 files changed, 7 insertions, 0 deletions
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 <botan/certstor.h>
+
+#if defined(BOTAN_HAS_BOOST_FILESYSTEM)
#include <boost/filesystem.hpp>
+#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*