diff options
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). |