From 9445a2f1df4e6a1d9121a69219ab941ef51739f2 Mon Sep 17 00:00:00 2001
From: Matt Johnston <matt@ucc.asn.au>
Date: Fri, 23 Sep 2022 00:24:58 +0800
Subject: [PATCH] Disable sign_parts()/verify_parts() for now

This needs to go upstream as a crate dependency
---
 src/sign.rs | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/src/sign.rs b/src/sign.rs
index 44b54bb..e8afa7f 100644
--- a/src/sign.rs
+++ b/src/sign.rs
@@ -68,10 +68,11 @@ impl SigType {
                 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: salty::Signature = s.into();
-                k.verify_parts(&s, |h| {
-                    sshwire::hash_ser(h, msg, None).map_err(|_| salty::Error::ContextTooLong)
-                })
-                .map_err(|_| Error::BadSig)
+                todo!("get verify_parts upstream");
+                // k.verify_parts(&s, |h| {
+                //     sshwire::hash_ser(h, msg, None).map_err(|_| salty::Error::ContextTooLong)
+                // })
+                // .map_err(|_| Error::BadSig)
             }
 
             (SigType::RSA256, PubKey::RSA(_k), Signature::RSA256(_s)) => {
@@ -151,11 +152,12 @@ impl SignKey {
     pub(crate) fn sign(&self, msg: &impl SSHEncode, parse_ctx: Option<&ParseContext>) -> Result<OwnedSig> {
         match self {
             SignKey::Ed25519(k) => {
-                k.sign_parts(|h| {
-                    sshwire::hash_ser(h, msg, parse_ctx).map_err(|_| salty::Error::ContextTooLong)
-                })
-                .trap()
-                .map(|s| s.into())
+                todo!("get sign_parts upstream");
+                // k.sign_parts(|h| {
+                //     sshwire::hash_ser(h, msg, parse_ctx).map_err(|_| salty::Error::ContextTooLong)
+                // })
+                // .trap()
+                // .map(|s| s.into())
             }
         }
     }
-- 
GitLab