Fix loading encryption keys from config file
This commit is contained in:
parent
8f7853f01a
commit
fa4e23ceb4
@ -56,6 +56,8 @@ CryDevice::Cipher::EncryptionKey CryDevice::GetOrCreateEncryptionKey(CryConfig *
|
||||
config->SetEncryptionKey(new_key.ToString());
|
||||
return new_key;
|
||||
}
|
||||
|
||||
return Cipher::EncryptionKey::FromString(encryption_key);
|
||||
}
|
||||
|
||||
Key CryDevice::CreateRootBlobAndReturnKey() {
|
||||
|
@ -5,6 +5,8 @@
|
||||
#include <messmer/blockstore/implementations/ondisk/OnDiskBlockStore.h>
|
||||
#include "../src/CryDevice.h"
|
||||
#include "../src/CryDir.h"
|
||||
#include "../src/CryFile.h"
|
||||
#include "../src/CryOpenFile.h"
|
||||
|
||||
//TODO (whole project) Make constructors explicit when implicit construction not needed
|
||||
|
||||
@ -28,8 +30,8 @@ public:
|
||||
TEST_F(CryFsTest, CreatedRootdirIsLoadableAfterClosing) {
|
||||
{
|
||||
CryDevice dev(make_unique<CryConfig>(config.path()), make_unique<OnDiskBlockStore>(rootdir.path()));
|
||||
dev.Load(bf::path("/"));
|
||||
}
|
||||
CryDevice dev(make_unique<CryConfig>(config.path()), make_unique<OnDiskBlockStore>(rootdir.path()));
|
||||
dev.Load(bf::path("/"));
|
||||
auto root = dev.Load(bf::path("/"));
|
||||
dynamic_pointer_move<CryDir>(root)->children();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user