88use crate :: ffi;
99use foreign_types:: { ForeignType , ForeignTypeRef } ;
1010use libc:: c_uint;
11+ use openssl_macros:: corresponds;
1112use std:: fmt;
1213use std:: mem;
1314use std:: ptr;
@@ -84,20 +85,14 @@ where
8485 /// Serialies the public key into a PEM-encoded SubjectPublicKeyInfo structure.
8586 ///
8687 /// The output will have a header of `-----BEGIN PUBLIC KEY-----`.
87- ///
88- /// This corresponds to [`PEM_write_bio_DSA_PUBKEY`].
89- ///
90- /// [`PEM_write_bio_DSA_PUBKEY`]: https://www.openssl.org/docs/man1.1.0/crypto/PEM_write_bio_DSA_PUBKEY.html
88+ #[ corresponds( PEM_write_bio_DSA_PUBKEY ) ]
9189 public_key_to_pem,
9290 ffi:: PEM_write_bio_DSA_PUBKEY
9391 }
9492
9593 to_der ! {
9694 /// Serializes the public key into a DER-encoded SubjectPublicKeyInfo structure.
97- ///
98- /// This corresponds to [`i2d_DSA_PUBKEY`].
99- ///
100- /// [`i2d_DSA_PUBKEY`]: https://www.openssl.org/docs/man1.1.0/crypto/i2d_DSA_PUBKEY.html
95+ #[ corresponds( i2d_DSA_PUBKEY) ]
10196 public_key_to_der,
10297 ffi:: i2d_DSA_PUBKEY
10398 }
@@ -120,18 +115,12 @@ where
120115 /// Serializes the private key to a PEM-encoded DSAPrivateKey structure.
121116 ///
122117 /// The output will have a header of `-----BEGIN DSA PRIVATE KEY-----`.
123- ///
124- /// This corresponds to [`PEM_write_bio_DSAPrivateKey`].
125- ///
126- /// [`PEM_write_bio_DSAPrivateKey`]: https://www.openssl.org/docs/man1.1.0/crypto/PEM_write_bio_DSAPrivateKey.html
118+ #[ corresponds( PEM_write_bio_DSAPrivateKey ) ]
127119 private_key_to_pem,
128120 /// Serializes the private key to a PEM-encoded encrypted DSAPrivateKey structure.
129121 ///
130122 /// The output will have a header of `-----BEGIN DSA PRIVATE KEY-----`.
131- ///
132- /// This corresponds to [`PEM_write_bio_DSAPrivateKey`].
133- ///
134- /// [`PEM_write_bio_DSAPrivateKey`]: https://www.openssl.org/docs/man1.1.0/crypto/PEM_write_bio_DSAPrivateKey.html
123+ #[ corresponds( PEM_write_bio_DSAPrivateKey ) ]
135124 private_key_to_pem_passphrase,
136125 ffi:: PEM_write_bio_DSAPrivateKey
137126 }
@@ -151,10 +140,7 @@ where
151140 T : HasParams ,
152141{
153142 /// Returns the maximum size of the signature output by `self` in bytes.
154- ///
155- /// OpenSSL documentation at [`DSA_size`]
156- ///
157- /// [`DSA_size`]: https://www.openssl.org/docs/man1.1.0/crypto/DSA_size.html
143+ #[ corresponds( DSA_size ) ]
158144 pub fn size ( & self ) -> u32 {
159145 unsafe { ffi:: DSA_size ( self . as_ptr ( ) ) as u32 }
160146 }
@@ -244,21 +230,15 @@ impl Dsa<Public> {
244230 /// Decodes a PEM-encoded SubjectPublicKeyInfo structure containing a DSA key.
245231 ///
246232 /// The input should have a header of `-----BEGIN PUBLIC KEY-----`.
247- ///
248- /// This corresponds to [`PEM_read_bio_DSA_PUBKEY`].
249- ///
250- /// [`PEM_read_bio_DSA_PUBKEY`]: https://www.openssl.org/docs/man1.0.2/crypto/PEM_read_bio_DSA_PUBKEY.html
233+ #[ corresponds( PEM_read_bio_DSA_PUBKEY ) ]
251234 public_key_from_pem,
252235 Dsa <Public >,
253236 ffi:: PEM_read_bio_DSA_PUBKEY
254237 }
255238
256239 from_der ! {
257240 /// Decodes a DER-encoded SubjectPublicKeyInfo structure containing a DSA key.
258- ///
259- /// This corresponds to [`d2i_DSA_PUBKEY`].
260- ///
261- /// [`d2i_DSA_PUBKEY`]: https://www.openssl.org/docs/man1.0.2/crypto/d2i_DSA_PUBKEY.html
241+ #[ corresponds( d2i_DSA_PUBKEY) ]
262242 public_key_from_der,
263243 Dsa <Public >,
264244 ffi:: d2i_DSA_PUBKEY,
0 commit comments