mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2026-11-19 06:26:14 -05:00
refactor: replace OpenSSL transports and certificate imports
This commit is contained in:
59 files changed
+1072
-1151
No files matched your search
@@ -0,0 +1,23 @@
|
||||
fn main() {
|
||||
println!("cargo:rerun-if-changed=src/utils/certificate/gnutls.c");
|
||||
let target = std::env::var("CARGO_CFG_TARGET_OS").unwrap();
|
||||
if !matches!(target.as_str(), "macos" | "linux" | "freebsd" | "openbsd") {
|
||||
return;
|
||||
}
|
||||
let mut package = pkg_config::Config::new();
|
||||
package.atleast_version("3.6").cargo_metadata(false);
|
||||
let library = package
|
||||
.probe("gnutls")
|
||||
.expect("GnuTLS development files are required for desktop certificate import");
|
||||
let mut build = cc::Build::new();
|
||||
build.file("src/utils/certificate/gnutls.c");
|
||||
for include in library.include_paths {
|
||||
build.include(include);
|
||||
}
|
||||
build.compile("gp_certificate_import");
|
||||
// GNU linkers must see the shim before its GnuTLS dependency (--as-needed).
|
||||
package
|
||||
.cargo_metadata(true)
|
||||
.probe("gnutls")
|
||||
.expect("GnuTLS was probed above");
|
||||
}
|
||||
Reference in new issue
Block a user