Skip to content
This repository was archived by the owner on Feb 11, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/invoice/signature.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ impl KeyEntry {
}
Some(txt) => {
let decoded_txt = base64::decode(txt)?;
let sig = EdSignature::from_bytes(decoded_txt.as_slice())?;
let sig = EdSignature::try_from(decoded_txt.as_slice())?;
key.verify_strict(self.label.as_bytes(), &sig)?;
Ok(())
}
Expand Down
2 changes: 1 addition & 1 deletion src/invoice/verification.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ impl VerificationStrategy {

let pubkey =
PublicKey::from_bytes(&pk).map_err(|_| SignatureError::CorruptKey(sig.key.clone()))?;
let ed_sig = EdSignature::from_bytes(sig_block.as_slice())
let ed_sig = EdSignature::try_from(sig_block.as_slice())
.map_err(|_| SignatureError::CorruptSignature(sig.key.clone()))?;
pubkey
.verify_strict(cleartext, &ed_sig)
Expand Down