Code is compatible with gcc 4.8
This commit is contained in:
parent
ef2ee74884
commit
529b888048
@ -83,7 +83,7 @@ const vector<shared_ptr<CryCipher>> CryCiphers::SUPPORTED_CIPHERS = {
|
|||||||
|
|
||||||
const CryCipher& CryCiphers::find(const string &cipherName) {
|
const CryCipher& CryCiphers::find(const string &cipherName) {
|
||||||
auto found = std::find_if(CryCiphers::SUPPORTED_CIPHERS.begin(), CryCiphers::SUPPORTED_CIPHERS.end(),
|
auto found = std::find_if(CryCiphers::SUPPORTED_CIPHERS.begin(), CryCiphers::SUPPORTED_CIPHERS.end(),
|
||||||
[cipherName] (const auto& element) {
|
[cipherName] (const std::shared_ptr<CryCipher>& element) {
|
||||||
return element->cipherName() == cipherName;
|
return element->cipherName() == cipherName;
|
||||||
});
|
});
|
||||||
ASSERT(found != CryCiphers::SUPPORTED_CIPHERS.end(), "Unknown Cipher: "+cipherName);
|
ASSERT(found != CryCiphers::SUPPORTED_CIPHERS.end(), "Unknown Cipher: "+cipherName);
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#include <messmer/cpp-utils/tempfile/TempFile.h>
|
#include <messmer/cpp-utils/tempfile/TempFile.h>
|
||||||
#include <messmer/cpp-utils/random/Random.h>
|
#include <messmer/cpp-utils/random/Random.h>
|
||||||
#include <messmer/cpp-utils/crypto/symmetric/ciphers.h>
|
#include <messmer/cpp-utils/crypto/symmetric/ciphers.h>
|
||||||
|
#include <boost/optional/optional_io.hpp>
|
||||||
|
|
||||||
using cpputils::unique_ref;
|
using cpputils::unique_ref;
|
||||||
using cpputils::make_unique_ref;
|
using cpputils::make_unique_ref;
|
||||||
@ -12,11 +13,19 @@ using cpputils::SCrypt;
|
|||||||
using boost::optional;
|
using boost::optional;
|
||||||
using boost::none;
|
using boost::none;
|
||||||
using std::string;
|
using std::string;
|
||||||
|
using std::ostream;
|
||||||
using ::testing::Return;
|
using ::testing::Return;
|
||||||
using ::testing::_;
|
using ::testing::_;
|
||||||
|
|
||||||
using namespace cryfs;
|
using namespace cryfs;
|
||||||
|
|
||||||
|
// This is needed for google test
|
||||||
|
namespace boost {
|
||||||
|
inline ostream &operator<<(ostream &stream, const CryConfigFile &) {
|
||||||
|
return stream << "CryConfigFile()";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//TODO Test loading with same/different --cipher argument
|
//TODO Test loading with same/different --cipher argument
|
||||||
|
|
||||||
class CryConfigLoaderTest: public ::testing::Test, public TestWithMockConsole {
|
class CryConfigLoaderTest: public ::testing::Test, public TestWithMockConsole {
|
||||||
|
Loading…
Reference in New Issue
Block a user