Skip to content

Commit 31403a4

Browse files
committed
docs: remove redundant doc comments about feature reqs
Now that we've enabled `doc_auto_cfg` these comments are redundant with the auto-generated `docs.rs` notes about required features.
1 parent c7d6fec commit 31403a4

File tree

5 files changed

+0
-26
lines changed

5 files changed

+0
-26
lines changed

src/crl.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,6 @@ impl CertificateRevocationList {
7676
}
7777
/// Serializes the certificate revocation list (CRL) in ASCII PEM format, signed with
7878
/// the issuing certificate authority's key.
79-
///
80-
/// *This function is only available if rcgen is built with the "pem" feature*
8179
#[cfg(feature = "pem")]
8280
pub fn serialize_pem_with_signer(&self, ca: &Certificate) -> Result<String, RcgenError> {
8381
let contents = self.serialize_der_with_signer(ca)?;

src/csr.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,6 @@ impl CertificateSigningRequest {
9898
self.params.serialize_der_with_signer(&self.public_key, ca)
9999
}
100100
/// Serializes the requested certificate, signed with another certificate's key, to the ASCII PEM format
101-
///
102-
/// *This function is only available if rcgen is built with the "pem" feature*
103101
#[cfg(feature = "pem")]
104102
pub fn serialize_pem_with_signer(&self, ca: &Certificate) -> Result<String, RcgenError> {
105103
let contents = self

src/error.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ pub enum RcgenError {
3535
Time,
3636
#[cfg(feature = "pem")]
3737
/// Error from the pem crate
38-
///
39-
/// *This variant is only available if rcgen is built with the "pem" feature*
4038
PemError(pem::PemError),
4139
/// Error generated by a remote key operation
4240
RemoteKeyError,

src/key_pair.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ impl KeyPair {
5757
Ok(der.try_into()?)
5858
}
5959
/// Parses the key pair from the ASCII PEM format
60-
///
61-
/// *This constructor is only available if rcgen is built with the "pem" feature*
6260
#[cfg(feature = "pem")]
6361
pub fn from_pem(pem_str: &str) -> Result<Self, RcgenError> {
6462
let private_key = pem::parse(pem_str)?;
@@ -79,8 +77,6 @@ impl KeyPair {
7977
/// using the specified [`SignatureAlgorithm`]
8078
///
8179
/// Same as [from_pem_and_sign_algo](Self::from_pem_and_sign_algo).
82-
///
83-
/// *This constructor is only available if rcgen is built with the "pem" feature*
8480
#[cfg(feature = "pem")]
8581
pub fn from_pem_and_sign_algo(
8682
pem_str: &str,
@@ -296,8 +292,6 @@ impl KeyPair {
296292
/// Return the key pair's public key in PEM format
297293
///
298294
/// The returned string can be interpreted with `openssl pkey --inform PEM -pubout -pubin -text`
299-
///
300-
/// *This function is only available if rcgen is built with the "pem" feature*
301295
#[cfg(feature = "pem")]
302296
pub fn public_key_pem(&self) -> String {
303297
let contents = self.public_key_der();
@@ -337,8 +331,6 @@ impl KeyPair {
337331
}
338332

339333
/// Serializes the key pair (including the private key) in PKCS#8 format in PEM
340-
///
341-
/// *This function is only available if rcgen is built with the "pem" feature*
342334
#[cfg(feature = "pem")]
343335
pub fn serialize_pem(&self) -> String {
344336
let contents = self.serialize_der();

src/lib.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -564,8 +564,6 @@ impl CertificateParams {
564564
/// Parses a ca certificate from the ASCII PEM format for signing
565565
///
566566
/// See [`from_ca_cert_der`](Self::from_ca_cert_der) for more details.
567-
///
568-
/// *This constructor is only available if rcgen is built with the "pem" and "x509-parser" features*
569567
#[cfg(all(feature = "pem", feature = "x509-parser"))]
570568
pub fn from_ca_cert_pem(pem_str: &str, key_pair: KeyPair) -> Result<Self, RcgenError> {
571569
let certificate = pem::parse(pem_str).or(Err(RcgenError::CouldNotParseCertificate))?;
@@ -585,8 +583,6 @@ impl CertificateParams {
585583
/// and left to defaults.
586584
///
587585
/// Will not check if certificate is a ca certificate!
588-
///
589-
/// *This constructor is only available if rcgen is built with the "x509-parser" feature*
590586
#[cfg(feature = "x509-parser")]
591587
pub fn from_ca_cert_der(ca_cert: &[u8], key_pair: KeyPair) -> Result<Self, RcgenError> {
592588
let (_remainder, x509) = x509_parser::parse_x509_certificate(ca_cert)
@@ -1544,26 +1540,20 @@ impl Certificate {
15441540
&self.key_pair
15451541
}
15461542
/// Serializes the certificate to the ASCII PEM format
1547-
///
1548-
/// *This function is only available if rcgen is built with the "pem" feature*
15491543
#[cfg(feature = "pem")]
15501544
pub fn serialize_pem(&self) -> Result<String, RcgenError> {
15511545
let contents = self.serialize_der()?;
15521546
let p = Pem::new("CERTIFICATE", contents);
15531547
Ok(pem::encode_config(&p, ENCODE_CONFIG))
15541548
}
15551549
/// Serializes the certificate, signed with another certificate's key, to the ASCII PEM format
1556-
///
1557-
/// *This function is only available if rcgen is built with the "pem" feature*
15581550
#[cfg(feature = "pem")]
15591551
pub fn serialize_pem_with_signer(&self, ca: &Certificate) -> Result<String, RcgenError> {
15601552
let contents = self.serialize_der_with_signer(ca)?;
15611553
let p = Pem::new("CERTIFICATE", contents);
15621554
Ok(pem::encode_config(&p, ENCODE_CONFIG))
15631555
}
15641556
/// Serializes the certificate signing request to the ASCII PEM format
1565-
///
1566-
/// *This function is only available if rcgen is built with the "pem" feature*
15671557
#[cfg(feature = "pem")]
15681558
pub fn serialize_request_pem(&self) -> Result<String, RcgenError> {
15691559
let contents = self.serialize_request_der()?;
@@ -1579,8 +1569,6 @@ impl Certificate {
15791569
/// Serializes the private key in PEM format
15801570
///
15811571
/// Panics if called on a remote key pair.
1582-
///
1583-
/// *This function is only available if rcgen is built with the "pem" feature*
15841572
#[cfg(feature = "pem")]
15851573
pub fn serialize_private_key_pem(&self) -> String {
15861574
self.key_pair.serialize_pem()

0 commit comments

Comments
 (0)