We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7da5695 commit f08979cCopy full SHA for f08979c
agent-control/src/opamp/remote_config/validators/signature/public_key.rs
@@ -68,10 +68,12 @@ impl Verifier for PublicKey {
68
"The only supported algorithm is Ed25519".to_string(),
69
));
70
}
71
-
72
- self.public_key.verify(msg, signature).map_err(|_| {
73
- PubKeyError::ValidatingSignature("signature verification failed".to_string())
74
- })
+ let msg = ring::digest::digest(&ring::digest::SHA256, msg);
+ self.public_key
+ .verify(msg.as_ref(), signature)
+ .map_err(|_| {
75
+ PubKeyError::ValidatingSignature("signature verification failed".to_string())
76
+ })
77
78
79
fn key_id(&self) -> &str {
0 commit comments