Skip to content

Commit 9075491

Browse files
committed
Shorten cryptoki pin debug display placeholder
Signed-off-by: Marcel Guzik <marcel.guzik@cumulocity.com>
1 parent 42bf3a1 commit 9075491

File tree

1 file changed

+11
-1
lines changed
  • crates/extensions/tedge-p11-server/src

1 file changed

+11
-1
lines changed

crates/extensions/tedge-p11-server/src/pkcs11.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,23 @@ use std::sync::Mutex;
2929
use tracing::debug;
3030
use tracing::warn;
3131

32-
#[derive(Debug, Clone)]
32+
#[derive(Clone)]
3333
pub struct CryptokiConfigDirect {
3434
pub module_path: Utf8PathBuf,
3535
pub pin: AuthPin,
3636
pub serial: Option<Arc<str>>,
3737
}
3838

39+
impl Debug for CryptokiConfigDirect {
40+
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
41+
f.debug_struct("CryptokiConfigDirect")
42+
.field("module_path", &self.module_path)
43+
.field("pin", &"[REDACTED]")
44+
.field("serial", &self.serial)
45+
.finish()
46+
}
47+
}
48+
3949
#[derive(Debug)]
4050
pub enum Pkcs11SigningKey {
4151
Rsa(RSASigningKey),

0 commit comments

Comments
 (0)