summaryrefslogtreecommitdiff
path: root/src/pubkey.h
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2020-03-14 21:14:52 +0100
committerRoman Smrž <roman.smrz@seznam.cz>2020-03-14 21:14:52 +0100
commit3357cbc91e7ff4d0d455c88785fc455067b34820 (patch)
treec1a39e4e55c3bcc03461838b4d8220c3e5a30987 /src/pubkey.h
parent9076a13c78cf64a6afafe98817aed31feda568b1 (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.h6
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);