diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2020-03-14 21:14:52 +0100 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2020-03-14 21:14:52 +0100 |
commit | 3357cbc91e7ff4d0d455c88785fc455067b34820 (patch) | |
tree | c1a39e4e55c3bcc03461838b4d8220c3e5a30987 /src/pubkey.cpp | |
parent | 9076a13c78cf64a6afafe98817aed31feda568b1 (diff) |
Storage: filter ancestors and overwritable Ref and Stored
Simple but slow implementation of the filtering for now.
Diffstat (limited to 'src/pubkey.cpp')
-rw-r--r-- | src/pubkey.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pubkey.cpp b/src/pubkey.cpp index 6f6c1e7..0e83136 100644 --- a/src/pubkey.cpp +++ b/src/pubkey.cpp @@ -68,14 +68,14 @@ SecretKey SecretKey::generate(const Storage & st) EVP_PKEY_get_raw_private_key(seckey.get(), nullptr, &keyLen); keyData.resize(keyLen); EVP_PKEY_get_raw_private_key(seckey.get(), keyData.data(), &keyLen); - st.storeKey(pubkey.ref, keyData); + st.storeKey(pubkey.ref(), keyData); return SecretKey(std::move(seckey), pubkey); } optional<SecretKey> SecretKey::load(const Stored<PublicKey> & pub) { - auto keyData = pub.ref.storage().loadKey(pub.ref); + auto keyData = pub.ref().storage().loadKey(pub.ref()); if (!keyData) return nullopt; @@ -211,14 +211,14 @@ SecretKexKey SecretKexKey::generate(const Storage & st) EVP_PKEY_get_raw_private_key(seckey.get(), nullptr, &keyLen); keyData.resize(keyLen); EVP_PKEY_get_raw_private_key(seckey.get(), keyData.data(), &keyLen); - st.storeKey(pubkey.ref, keyData); + st.storeKey(pubkey.ref(), keyData); return SecretKexKey(std::move(seckey), pubkey); } optional<SecretKexKey> SecretKexKey::load(const Stored<PublicKexKey> & pub) { - auto keyData = pub.ref.storage().loadKey(pub.ref); + auto keyData = pub.ref().storage().loadKey(pub.ref()); if (!keyData) return nullopt; |