diff options
-rw-r--r-- | src/catlfish.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/catlfish.erl b/src/catlfish.erl index 3ca190a..98ec4dd 100644 --- a/src/catlfish.erl +++ b/src/catlfish.erl @@ -71,7 +71,7 @@ build_mtl(Timestamp, LeafCert) -> -spec add_chain(binary(), [binary()]) -> nonempty_string(). add_chain(LeafCert, CertChain) -> - EntryHash = crypto:hash(sha256, LeafCert), + EntryHash = crypto:hash(sha256, [LeafCert | CertChain]), TimestampedEntry = case plop:get(EntryHash) of notfound -> @@ -85,7 +85,7 @@ add_chain(LeafCert, CertChain) -> ok = plop:add( serialise_logentry(Timestamp, LeafCert, CertChain), ht:leaf_hash(serialise(MTL)), - crypto:hash(sha256, LeafCert)), + EntryHash), TSE; {_Index, _MTLHash, Entry} -> <<Timestamp:64, _LogEntry/binary>> = Entry, |