refactor protocol extensions

This commit is contained in:
Toshit Chawda 2024-10-24 19:47:38 -07:00
parent 1ae3986a82
commit 36fddc8943
No known key found for this signature in database
GPG key ID: 91480ED99E2B3D9D
10 changed files with 289 additions and 190 deletions

View file

@ -139,7 +139,7 @@ async fn main() -> Result<(), Box<dyn Error + Send + Sync>> {
let split: Vec<_> = auth.split(':').collect();
let username = split[0].to_string();
let password = split[1..].join(":");
PasswordProtocolExtensionBuilder::new_client(username, password)
PasswordProtocolExtensionBuilder::new_client(Some((username, password)))
});
println!(
@ -188,7 +188,7 @@ async fn main() -> Result<(), Box<dyn Error + Send + Sync>> {
}
if let Some(certauth) = opts.certauth {
let key = get_cert(certauth).await?;
let extension = CertAuthProtocolExtensionBuilder::new_client(key);
let extension = CertAuthProtocolExtensionBuilder::new_client(Some(key));
extensions.push(AnyProtocolExtensionBuilder::new(extension));
extension_ids.push(CertAuthProtocolExtension::ID);
}