11use crate :: crypto:: merkle:: { MerkleProofVerifier , Rfc6269Default } ;
22use crate :: crypto:: { CosignVerificationKey , Signature } ;
33use crate :: errors:: SigstoreError ;
4- use crate :: errors:: SigstoreError :: { ConsistencyProofError , UnexpectedError } ;
4+ use crate :: errors:: SigstoreError :: ConsistencyProofError ;
55use crate :: rekor:: models:: checkpoint:: ParseCheckpointError :: * ;
66use base64:: prelude:: BASE64_STANDARD ;
77use base64:: Engine ;
@@ -158,7 +158,7 @@ impl SignedCheckpoint {
158158 }
159159
160160 /// Checks if the checkpoint and inclusion proof are valid together.
161- pub ( crate ) fn valid_consistency_proof (
161+ pub ( crate ) fn is_valid_for_proof (
162162 & self ,
163163 proof_root_hash : & Output < Rfc6269Default > ,
164164 proof_tree_size : u64 ,
@@ -173,18 +173,6 @@ impl SignedCheckpoint {
173173 )
174174 . map_err ( ConsistencyProofError )
175175 }
176-
177- /// Verifies that the checkpoint can be used for an inclusion proof with this root hash.
178- pub ( crate ) fn valid_inclusion_proof (
179- & self ,
180- proof_root_hash : & Output < Rfc6269Default > ,
181- ) -> Result < ( ) , SigstoreError > {
182- Rfc6269Default :: verify_match ( proof_root_hash, & self . note . hash . into ( ) ) . map_err ( |_| {
183- UnexpectedError (
184- "consistency proof root hash does not match checkpoint root hash" . to_string ( ) ,
185- )
186- } )
187- }
188176}
189177
190178impl Serialize for SignedCheckpoint {
0 commit comments