feat: Improve logging (#13)

Improves logs and reduces verbosity.

Fixes: #8

Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
This commit is contained in:
Jagoda Estera Ślązak
2026-08-18 12:21:27 +02:00
committed by missytake
parent 8ba2bc22c5
commit 44c8c1906f
5 changed files with 25 additions and 31 deletions
+2 -8
View File
@@ -71,20 +71,14 @@ fn check_openpgp_payload(payload: &[u8]) -> Result<bool, error::Error> {
// Symmetrically Encrypted and Integrity Protected Data Packet (SEIPD)
//
// This is the only place where this function may return `True`.
log::debug!(
"check_openpgp_payload: i={i} packat_type_id={}",
packet_type_id
);
log::debug!("check_openpgp_payload: i={i} packat_type_id={packet_type_id}");
return Ok(packet_type_id == 18);
} else if ![1, 3].contains(&packet_type_id) {
// All packets except the last one must be either
// Public-Key Encrypted Session Key Packet (PKESK)
// or
// Symmetric-Key Encrypted Session Key Packet (SKESK)
log::debug!(
"check_openpgp_payload: i={i} packet_type_id={}",
packet_type_id
);
log::debug!("check_openpgp_payload: i={i} packet_type_id={packet_type_id}");
return Ok(false);
}
}