Skip to content
Snippets Groups Projects
Commit 9445a2f1 authored by Matt Johnston's avatar Matt Johnston
Browse files

Disable sign_parts()/verify_parts() for now

This needs to go upstream as a crate dependency
parent 47c2684f
No related merge requests found
...@@ -68,10 +68,11 @@ impl SigType { ...@@ -68,10 +68,11 @@ impl SigType {
let k: salty::PublicKey = k.try_into().map_err(|_| Error::BadKey)?; let k: salty::PublicKey = k.try_into().map_err(|_| Error::BadKey)?;
let s: &[u8; 64] = s.sig.0.try_into().map_err(|_| Error::BadSig)?; let s: &[u8; 64] = s.sig.0.try_into().map_err(|_| Error::BadSig)?;
let s: salty::Signature = s.into(); let s: salty::Signature = s.into();
k.verify_parts(&s, |h| { todo!("get verify_parts upstream");
sshwire::hash_ser(h, msg, None).map_err(|_| salty::Error::ContextTooLong) // k.verify_parts(&s, |h| {
}) // sshwire::hash_ser(h, msg, None).map_err(|_| salty::Error::ContextTooLong)
.map_err(|_| Error::BadSig) // })
// .map_err(|_| Error::BadSig)
} }
(SigType::RSA256, PubKey::RSA(_k), Signature::RSA256(_s)) => { (SigType::RSA256, PubKey::RSA(_k), Signature::RSA256(_s)) => {
...@@ -151,11 +152,12 @@ impl SignKey { ...@@ -151,11 +152,12 @@ impl SignKey {
pub(crate) fn sign(&self, msg: &impl SSHEncode, parse_ctx: Option<&ParseContext>) -> Result<OwnedSig> { pub(crate) fn sign(&self, msg: &impl SSHEncode, parse_ctx: Option<&ParseContext>) -> Result<OwnedSig> {
match self { match self {
SignKey::Ed25519(k) => { SignKey::Ed25519(k) => {
k.sign_parts(|h| { todo!("get sign_parts upstream");
sshwire::hash_ser(h, msg, parse_ctx).map_err(|_| salty::Error::ContextTooLong) // k.sign_parts(|h| {
}) // sshwire::hash_ser(h, msg, parse_ctx).map_err(|_| salty::Error::ContextTooLong)
.trap() // })
.map(|s| s.into()) // .trap()
// .map(|s| s.into())
} }
} }
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment