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.h | |
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.h')
-rw-r--r-- | src/pubkey.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pubkey.h b/src/pubkey.h index 607352d..c922dc7 100644 --- a/src/pubkey.h +++ b/src/pubkey.h @@ -84,8 +84,8 @@ private: template<class T> Stored<Signed<T>> SecretKey::sign(const Stored<T> & val) const { - auto st = val.ref.storage(); - auto sig = st.store(Signature(pub(), sign(val.ref.digest()))); + auto st = val.ref().storage(); + auto sig = st.store(Signature(pub(), sign(val.ref().digest()))); return st.store(Signed(val, { sig })); } @@ -103,7 +103,7 @@ optional<Signed<T>> Signed<T>::load(const Ref & ref) vector<Stored<Signature>> sigs; for (auto item : rec->items("sig")) if (auto sig = item.as<Signature>()) - if (sig.value()->verify(data.value().ref)) + if (sig.value()->verify(data.value().ref())) sigs.push_back(sig.value()); return Signed(*data, sigs); |