33 lines
880 B
Rust
33 lines
880 B
Rust
#[cfg(windows)]
|
|
#[path = "../../agent/src/https_channel.rs"]
|
|
mod https_channel;
|
|
#[cfg(windows)]
|
|
mod runtime;
|
|
#[cfg(windows)]
|
|
#[path = "../../agent/src/transport.rs"]
|
|
mod transport;
|
|
#[cfg(windows)]
|
|
#[path = "../../agent/src/wire_channel.rs"]
|
|
mod wire_channel;
|
|
#[cfg(windows)]
|
|
mod certificate_rotation {
|
|
// Shared transport input only. Windows certificate rotation is not yet a
|
|
// capability: this first slice refuses expired TLS identities normally.
|
|
pub struct DeviceIdentity {
|
|
pub certificate_pem: Vec<u8>,
|
|
pub private_key_pem: Vec<u8>,
|
|
}
|
|
}
|
|
#[cfg(windows)]
|
|
fn main() {
|
|
if runtime::main().is_err() {
|
|
eprintln!("Windows passive agent stopped: INITIALIZATION_OR_TRANSPORT_FAILURE");
|
|
std::process::exit(1);
|
|
}
|
|
}
|
|
#[cfg(not(windows))]
|
|
fn main() {
|
|
eprintln!("This binary requires native Windows.");
|
|
std::process::exit(1);
|
|
}
|