diff options
author | Magnus Ahltorp <map@kth.se> | 2017-07-28 13:38:43 +0200 |
---|---|---|
committer | Magnus Ahltorp <map@kth.se> | 2017-07-28 13:38:43 +0200 |
commit | 11e0bdd000dad72ed4c46d419e253ee0caefbc2b (patch) | |
tree | 3c886c080433ce70bd23d682c730d232f2e87a3b /src/plop.erl | |
parent | 489df8ecaf16ca7429eb15b31ffbe6f686f5b0d1 (diff) |
Still WIPmergefetch
Diffstat (limited to 'src/plop.erl')
-rw-r--r-- | src/plop.erl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/plop.erl b/src/plop.erl index 7c7ded7..770c494 100644 --- a/src/plop.erl +++ b/src/plop.erl @@ -29,7 +29,7 @@ consistency/2, inclusion/2, inclusion_and_entry/2]). -export([generate_timestamp/0, save_sth/1, verify_sth/4]). -export([get_by_leaf_hash/1, entry_for_leafhash/1, spt_data_from_entry/1, - get_spt_sig/1, add_spt_sig/2]). + get_spt_sig/1, add_spt_sig/2, verify_entry/1]). %% API for tests. -export([testing_get_pubkey/0]). @@ -360,6 +360,12 @@ entry_for_leafhash(LeafHash) -> unwrap_entry(Entry) end. +verify_entry(Entry) -> + UnwrappedEntry = unwrap_entry(Entry), + {ok, {Module, Function}} = application:get_env(plop, verify_entry), + Module:Function(UnwrappedEntry). + + fill_in_entry({_Index, LeafHash, notfetched}) -> get_by_leaf_hash(LeafHash). |