Improve clarity of return type

This commit is contained in:
Kai A. Hiller
2025-08-08 12:04:56 +02:00
parent 968968bdbb
commit 3f816ba9c4

View File

@@ -191,7 +191,7 @@ impl PrivateKey {
/// # Errors
///
/// Errors if the DER representation of the public key cant be derived.
pub fn fingerprint(&self) -> Result<[u8; 32], pkcs8::Error> {
pub fn fingerprint(&self) -> pkcs8::spki::Result<[u8; 32]> {
let bytes = match self {
PrivateKey::Rsa(key) => key.to_public_key().to_public_key_der()?,
PrivateKey::EcP256(key) => key.public_key().to_public_key_der()?,