diff options
author | Jack Lloyd <[email protected]> | 2016-10-10 01:50:46 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-10-10 01:50:46 -0400 |
commit | 227d59d886418ace13aa91c1b0dc5fea91efbb4a (patch) | |
tree | bdf9579874d66acac518ac53ce1ddcde6fb4d719 /src/lib/pubkey | |
parent | 35657e0f76931f0d3a333610e7065c81c35e9f1e (diff) |
Add IncludeOS target. Make filesystem support optional.
Diffstat (limited to 'src/lib/pubkey')
-rw-r--r-- | src/lib/pubkey/pkcs8.cpp | 3 | ||||
-rw-r--r-- | src/lib/pubkey/pkcs8.h | 2 | ||||
-rw-r--r-- | src/lib/pubkey/x509_key.cpp | 2 | ||||
-rw-r--r-- | src/lib/pubkey/x509_key.h | 2 |
4 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/pubkey/pkcs8.cpp b/src/lib/pubkey/pkcs8.cpp index ddf9be2f0..96dfd5e44 100644 --- a/src/lib/pubkey/pkcs8.cpp +++ b/src/lib/pubkey/pkcs8.cpp @@ -262,6 +262,8 @@ Private_Key* load_key(DataSource& source, throw PKCS8_Exception( "Internal error: Attempt to read password for unencrypted key" );}, false); } +#if defined(BOTAN_TARGET_OS_HAS_FILESYSTEM) + /* * Extract an encrypted private key and return it */ @@ -293,6 +295,7 @@ Private_Key* load_key(const std::string& fsname, return load_key(source, rng, []() -> std::string { throw PKCS8_Exception( "Internal error: Attempt to read password for unencrypted key" );}, false); } +#endif /* * Make a copy of this private key diff --git a/src/lib/pubkey/pkcs8.h b/src/lib/pubkey/pkcs8.h index 791a612df..9cc350285 100644 --- a/src/lib/pubkey/pkcs8.h +++ b/src/lib/pubkey/pkcs8.h @@ -108,6 +108,7 @@ BOTAN_DLL Private_Key* load_key(DataSource& source, BOTAN_DLL Private_Key* load_key(DataSource& source, RandomNumberGenerator& rng); +#if defined(BOTAN_TARGET_OS_HAS_FILESYSTEM) /** * Load an encrypted key from a file. * @param filename the path to the file containing the encoded key @@ -136,6 +137,7 @@ BOTAN_DLL Private_Key* load_key(const std::string& filename, */ BOTAN_DLL Private_Key* load_key(const std::string& filename, RandomNumberGenerator& rng); +#endif /** * Copy an existing encoded key object. diff --git a/src/lib/pubkey/x509_key.cpp b/src/lib/pubkey/x509_key.cpp index ccb94cea7..08e17bfed 100644 --- a/src/lib/pubkey/x509_key.cpp +++ b/src/lib/pubkey/x509_key.cpp @@ -78,6 +78,7 @@ Public_Key* load_key(DataSource& source) } } +#if defined(BOTAN_TARGET_OS_HAS_FILESYSTEM) /* * Extract a public key and return it */ @@ -86,6 +87,7 @@ Public_Key* load_key(const std::string& fsname) DataSource_Stream source(fsname, true); return X509::load_key(source); } +#endif /* * Extract a public key and return it diff --git a/src/lib/pubkey/x509_key.h b/src/lib/pubkey/x509_key.h index cbb0412d2..7162b338e 100644 --- a/src/lib/pubkey/x509_key.h +++ b/src/lib/pubkey/x509_key.h @@ -46,12 +46,14 @@ BOTAN_DLL std::string PEM_encode(const Public_Key& key); */ BOTAN_DLL Public_Key* load_key(DataSource& source); +#if defined(BOTAN_TARGET_OS_HAS_FILESYSTEM) /** * Create a public key from a file * @param filename pathname to the file to load * @return new public key object */ BOTAN_DLL Public_Key* load_key(const std::string& filename); +#endif /** * Create a public key from a memory region. |