aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/cert/x509/certstor.cpp2
-rw-r--r--src/lib/cert/x509/pkcs10.h2
-rw-r--r--src/lib/cert/x509/x509_crl.h2
-rw-r--r--src/lib/cert/x509/x509cert.h2
-rw-r--r--src/lib/ffi/ffi.cpp4
5 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/cert/x509/certstor.cpp b/src/lib/cert/x509/certstor.cpp
index 28b46ef1a..24cd84de7 100644
--- a/src/lib/cert/x509/certstor.cpp
+++ b/src/lib/cert/x509/certstor.cpp
@@ -114,6 +114,7 @@ Certificate_Store_In_Memory::Certificate_Store_In_Memory(const X509_Certificate&
add_certificate(cert);
}
+#if defined(BOTAN_TARGET_OS_HAS_FILESYSTEM)
Certificate_Store_In_Memory::Certificate_Store_In_Memory(const std::string& dir)
{
if(dir.empty())
@@ -131,6 +132,7 @@ Certificate_Store_In_Memory::Certificate_Store_In_Memory(const std::string& dir)
}
}
}
+#endif
std::shared_ptr<const X509_Certificate>
Certificate_Store_Overlay::find_cert(const X509_DN& subject_dn,
diff --git a/src/lib/cert/x509/pkcs10.h b/src/lib/cert/x509/pkcs10.h
index 8c9f49d84..c7a9ec300 100644
--- a/src/lib/cert/x509/pkcs10.h
+++ b/src/lib/cert/x509/pkcs10.h
@@ -86,12 +86,14 @@ class BOTAN_DLL PKCS10_Request final : public X509_Object
*/
explicit PKCS10_Request(DataSource& source);
+#if defined(BOTAN_TARGET_OS_HAS_FILESYSTEM)
/**
* Create a PKCS#10 Request from a file.
* @param filename the name of the file containing the DER or PEM
* encoded request file
*/
explicit PKCS10_Request(const std::string& filename);
+#endif
/**
* Create a PKCS#10 Request from binary data.
diff --git a/src/lib/cert/x509/x509_crl.h b/src/lib/cert/x509/x509_crl.h
index 2e05f98fb..25749acf1 100644
--- a/src/lib/cert/x509/x509_crl.h
+++ b/src/lib/cert/x509/x509_crl.h
@@ -82,6 +82,7 @@ class BOTAN_DLL X509_CRL final : public X509_Object
*/
X509_CRL(DataSource& source, bool throw_on_unknown_critical = false);
+#if defined(BOTAN_TARGET_OS_HAS_FILESYSTEM)
/**
* Construct a CRL from a file containing the DER or PEM encoded CRL.
* @param filename the name of the CRL file
@@ -90,6 +91,7 @@ class BOTAN_DLL X509_CRL final : public X509_Object
*/
X509_CRL(const std::string& filename,
bool throw_on_unknown_critical = false);
+#endif
/**
* Construct a CRL from a binary vector
diff --git a/src/lib/cert/x509/x509cert.h b/src/lib/cert/x509/x509cert.h
index d64d8fd2b..c7ce8aaa1 100644
--- a/src/lib/cert/x509/x509cert.h
+++ b/src/lib/cert/x509/x509cert.h
@@ -265,12 +265,14 @@ class BOTAN_DLL X509_Certificate : public X509_Object
*/
explicit X509_Certificate(DataSource& source);
+#if defined(BOTAN_TARGET_OS_HAS_FILESYSTEM)
/**
* Create a certificate from a file containing the DER or PEM
* encoded certificate.
* @param filename the name of the certificate file
*/
explicit X509_Certificate(const std::string& filename);
+#endif
explicit X509_Certificate(const std::vector<byte>& in);
diff --git a/src/lib/ffi/ffi.cpp b/src/lib/ffi/ffi.cpp
index e8df51fec..492565129 100644
--- a/src/lib/ffi/ffi.cpp
+++ b/src/lib/ffi/ffi.cpp
@@ -1211,6 +1211,7 @@ int botan_x509_cert_load_file(botan_x509_cert_t* cert_obj, const char* cert_path
if(!cert_obj || !cert_path)
return -1;
+#if defined(BOTAN_TARGET_OS_HAS_FILESYSTEM)
std::unique_ptr<Botan::X509_Certificate> c(new Botan::X509_Certificate(cert_path));
if(c)
@@ -1218,6 +1219,9 @@ int botan_x509_cert_load_file(botan_x509_cert_t* cert_obj, const char* cert_path
*cert_obj = new botan_x509_cert_struct(c.release());
return 0;
}
+#else
+ return BOTAN_FFI_ERROR_NOT_IMPLEMENTED;
+#endif
}
catch(std::exception& e)
{