refactor: replace OpenSSL transports and certificate imports

This commit is contained in:
Kevin Yue committed 2026-11-01 23:35:58 +08:00
1 parent 37c88c7adb
commit 14c4e24e0e
59 files changed
+1072 -1151

No files matched your search

+1 -21
View File
@@ -33,8 +33,6 @@ pub struct SamlAuthLauncher<'a> {
certificate: Option<&'a str>,
sslkey: Option<&'a str>,
key_password: Option<&'a str>,
#[cfg(not(target_os = "macos"))]
fix_openssl: bool,
ignore_tls_errors: bool,
#[cfg(feature = "webview-auth")]
hidpi: bool,
@@ -67,8 +65,6 @@ impl<'a> SamlAuthLauncher<'a> {
certificate: None,
sslkey: None,
key_password: None,
#[cfg(not(target_os = "macos"))]
fix_openssl: false,
ignore_tls_errors: false,
#[cfg(feature = "webview-auth")]
hidpi: false,
@@ -115,12 +111,6 @@ impl<'a> SamlAuthLauncher<'a> {
self
}
#[cfg(not(target_os = "macos"))]
pub fn fix_openssl(mut self, fix_openssl: bool) -> Self {
self.fix_openssl = fix_openssl;
self
}
pub fn ignore_tls_errors(mut self, ignore_tls_errors: bool) -> Self {
self.ignore_tls_errors = ignore_tls_errors;
self
@@ -229,11 +219,6 @@ impl<'a> SamlAuthLauncher<'a> {
auth_cmd.arg("--client-version").arg(client_version);
}
#[cfg(not(target_os = "macos"))]
if self.fix_openssl {
auth_cmd.arg("--fix-openssl");
}
if self.ignore_tls_errors {
auth_cmd.arg("--ignore-tls-errors");
}
@@ -419,13 +404,8 @@ mod tests {
#[test]
fn launches_with_platform_tls_options() {
let launcher = SamlAuthLauncher::new("vpn.example.com").ignore_tls_errors(true);
#[cfg(not(target_os = "macos"))]
let launcher = launcher.fix_openssl(true);
let args = child_args(launcher);
assert_eq!(
args.iter().any(|arg| arg == "--fix-openssl"),
!cfg!(target_os = "macos")
);
assert!(!args.iter().any(|arg| arg == "--fix-openssl"));
assert!(args.iter().any(|arg| arg == "--ignore-tls-errors"));
}