+1
crates/jacquard-axum/Cargo.toml
+1
crates/jacquard-axum/Cargo.toml
+17
-3
crates/jacquard-axum/src/service_auth.rs
+17
-3
crates/jacquard-axum/src/service_auth.rs
···
572
572
573
573
match codec {
574
574
// p256-pub (0x1200)
575
-
[0x80, 0x24] => PublicKey::from_p256_bytes(key_material).ok(),
575
+
[0x80, 0x24] => PublicKey::from_p256_bytes(key_material)
576
+
.inspect_err(|_e| {
577
+
#[cfg(feature = "tracing")]
578
+
tracing::error!("Failed to parse p256 public key: {}", _e);
579
+
})
580
+
.ok(),
576
581
// secp256k1-pub (0xe7)
577
-
[0xe7, 0x01] => PublicKey::from_k256_bytes(key_material).ok(),
578
-
_ => None,
582
+
[0xe7, 0x01] => PublicKey::from_k256_bytes(key_material)
583
+
.inspect_err(|_e| {
584
+
#[cfg(feature = "tracing")]
585
+
tracing::error!("Failed to parse secp256k1 public key: {}", _e);
586
+
})
587
+
.ok(),
588
+
_ => {
589
+
#[cfg(feature = "tracing")]
590
+
tracing::error!("Unsupported public key multicodec: {:?}", codec);
591
+
None
592
+
}
579
593
}
580
594
}
581
595