mirror of
https://seed.radicle.dev/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5.git
synced 2026-11-29 14:00:31 +08:00
node: Propagate refs update
Signed-off-by: Alexis Sellier <self@cloudhead.io>
This commit is contained in:
@@ -178,9 +178,7 @@ impl SignedRefs<Unverified> {
|
||||
}
|
||||
|
||||
pub fn verified(self, signer: &PublicKey) -> Result<SignedRefs<Verified>, crypto::Error> {
|
||||
let canonical = self.refs.canonical();
|
||||
|
||||
match signer.verify(&self.signature, &canonical) {
|
||||
match self.verify(signer) {
|
||||
Ok(()) => Ok(SignedRefs {
|
||||
refs: self.refs,
|
||||
signature: self.signature,
|
||||
@@ -189,6 +187,15 @@ impl SignedRefs<Unverified> {
|
||||
Err(e) => Err(e),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn verify(&self, signer: &PublicKey) -> Result<(), crypto::Error> {
|
||||
let canonical = self.refs.canonical();
|
||||
|
||||
match signer.verify(&self.signature, &canonical) {
|
||||
Ok(()) => Ok(()),
|
||||
Err(e) => Err(e),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl SignedRefs<Verified> {
|
||||
|
||||
Reference in New Issue
Block a user