Skip to content

Commit

Permalink
Merge pull request #1939 from alex/der-dsa
Browse files Browse the repository at this point in the history
Added DER serialization for `DSAPrivateKey`
  • Loading branch information
sfackler authored May 28, 2023
2 parents c9ce286 + b3cdda0 commit 8f72f7b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions openssl/src/dsa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,13 @@ where
ffi::PEM_write_bio_DSAPrivateKey
}

to_der! {
/// Serializes the private_key to a DER-encoded `DSAPrivateKey` structure.
#[corresponds(i2d_DSAPrivateKey)]
private_key_to_der,
ffi::i2d_DSAPrivateKey
}

/// Returns a reference to the private key component of `self`.
#[corresponds(DSA_get0_key)]
pub fn priv_key(&self) -> &BigNumRef {
Expand Down

0 comments on commit 8f72f7b

Please sign in to comment.