Skip to content

Commit 716f756

Browse files
Add server_pubkey field to YAML config
- Added optional server_pubkey field at root level of YamlConfig - Field is emitted as IMIX_SERVER_PUBKEY environment variable when present - Maintains backward compatibility with existing configs Co-authored-by: Hulto <hulto@users.noreply.github.com>
1 parent 5f8e5c5 commit 716f756

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

implants/lib/pb/build.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ struct TransportConfig {
1818
#[derive(Debug, Deserialize)]
1919
struct YamlConfig {
2020
transports: Vec<TransportConfig>,
21+
#[serde(default)]
22+
server_pubkey: Option<String>,
2123
}
2224

2325
fn parse_yaml_config() -> Result<bool, Box<dyn std::error::Error>> {
@@ -129,6 +131,13 @@ fn parse_yaml_config() -> Result<bool, Box<dyn std::error::Error>> {
129131

130132
// Emit the DSN configuration
131133
println!("cargo:rustc-env=IMIX_CALLBACK_URI={}", dsn);
134+
135+
// Emit server_pubkey if present
136+
if let Some(ref pubkey) = config.server_pubkey {
137+
println!("cargo:rustc-env=IMIX_SERVER_PUBKEY={}", pubkey);
138+
println!("cargo:warning=Using server_pubkey from YAML config");
139+
}
140+
132141
println!("cargo:warning=Successfully parsed YAML config with {} transport(s)", config.transports.len());
133142

134143
Ok(true)

0 commit comments

Comments
 (0)