Skip to content
Merged
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
7 changes: 6 additions & 1 deletion src/servauth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,12 @@ impl ServAuth {
// Extract the signature separately. The message for the signature
// includes the auth packet without the signature part.
let (key, sig) = match &mut p.method {
AuthMethod::PubKey(m) => (&m.pubkey.0, m.sig.take()),
AuthMethod::PubKey(m) => {
let sig = m.sig.take();
// When we have a signature, we need to set force_sig=true so that the encoded message for verification has the boolean set correctly
m.force_sig = sig.is_some();
(&m.pubkey.0, sig)
}
_ => return Err(Error::bug()),
};

Expand Down
Loading