Skip to content

Commit

Permalink
Make PublicKeyData public
Browse files Browse the repository at this point in the history
  • Loading branch information
djc committed Sep 24, 2024
1 parent 6557c5e commit c3e516f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion rcgen/src/key_pair.rs
Original file line number Diff line number Diff line change
Expand Up @@ -690,9 +690,12 @@ impl<T> ExternalError<T> for Result<T, pem::PemError> {
}
}

pub(crate) trait PublicKeyData {
/// The public key data of a key pair
pub trait PublicKeyData {
/// The public key in DER format
fn der_bytes(&self) -> &[u8];

/// The algorithm used by the key pair
fn algorithm(&self) -> &SignatureAlgorithm;
}

Expand Down
2 changes: 1 addition & 1 deletion rcgen/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ pub use crl::{
};
pub use csr::{CertificateSigningRequest, CertificateSigningRequestParams, PublicKey};
pub use error::{Error, InvalidAsn1String};
use key_pair::PublicKeyData;
pub use key_pair::PublicKeyData;
#[cfg(all(feature = "crypto", feature = "aws_lc_rs"))]
pub use key_pair::RsaKeySize;
pub use key_pair::{KeyPair, RemoteKeyPair};
Expand Down

0 comments on commit c3e516f

Please sign in to comment.