Skip to content

Commit 82a6c52

Browse files
committed
Include additional logs for troubleshooting
Signed-off-by: Sergio Arroutbi <[email protected]>
1 parent ac8c5a9 commit 82a6c52

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

keylime-push-model-agent/src/main.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,11 +182,17 @@ async fn run(args: &Args) -> Result<()> {
182182
let client_cert = config.registrar_tls_client_cert();
183183
let client_key = config.registrar_tls_client_key();
184184

185+
info!("Registrar TLS enabled: true");
186+
debug!("Registrar CA certificate: {}", ca_cert);
187+
debug!("Registrar client certificate: {}", client_cert);
188+
debug!("Registrar client key: {}", client_key);
189+
185190
// Only use TLS if all certificate paths are provided
186191
if !ca_cert.is_empty()
187192
&& !client_cert.is_empty()
188193
&& !client_key.is_empty()
189194
{
195+
info!("Registrar TLS configuration complete - using HTTPS");
190196
Some(registration::RegistrarTlsConfig {
191197
ca_cert: Some(ca_cert.to_string()),
192198
client_cert: Some(client_cert.to_string()),
@@ -199,6 +205,7 @@ async fn run(args: &Args) -> Result<()> {
199205
None
200206
}
201207
} else {
208+
info!("Registrar TLS enabled: false - using plain HTTP");
202209
None
203210
};
204211

keylime/src/registrar_client.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,21 @@ impl RegistrarClientBuilder {
231231

232232
let scheme = if use_tls { "https" } else { "http" };
233233

234+
info!(
235+
"Building Registrar client: scheme={}, registrar={}:{}, TLS={}",
236+
scheme, registrar_ip, registrar_port, use_tls
237+
);
238+
239+
if use_tls {
240+
debug!(
241+
"TLS configuration: ca_cert={:?}, client_cert={:?}, client_key={:?}, insecure={:?}",
242+
self.ca_certificate,
243+
self.certificate,
244+
self.key,
245+
self.insecure
246+
);
247+
}
248+
234249
// Create the client (HTTPS or plain HTTP)
235250
let client = if use_tls {
236251
let args = ClientArgs {

0 commit comments

Comments
 (0)