@@ -564,8 +564,6 @@ impl CertificateParams {
564
564
/// Parses a ca certificate from the ASCII PEM format for signing
565
565
///
566
566
/// 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*
569
567
#[ cfg( all( feature = "pem" , feature = "x509-parser" ) ) ]
570
568
pub fn from_ca_cert_pem ( pem_str : & str , key_pair : KeyPair ) -> Result < Self , RcgenError > {
571
569
let certificate = pem:: parse ( pem_str) . or ( Err ( RcgenError :: CouldNotParseCertificate ) ) ?;
@@ -585,8 +583,6 @@ impl CertificateParams {
585
583
/// and left to defaults.
586
584
///
587
585
/// 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*
590
586
#[ cfg( feature = "x509-parser" ) ]
591
587
pub fn from_ca_cert_der ( ca_cert : & [ u8 ] , key_pair : KeyPair ) -> Result < Self , RcgenError > {
592
588
let ( _remainder, x509) = x509_parser:: parse_x509_certificate ( ca_cert)
@@ -1544,26 +1540,20 @@ impl Certificate {
1544
1540
& self . key_pair
1545
1541
}
1546
1542
/// Serializes the certificate to the ASCII PEM format
1547
- ///
1548
- /// *This function is only available if rcgen is built with the "pem" feature*
1549
1543
#[ cfg( feature = "pem" ) ]
1550
1544
pub fn serialize_pem ( & self ) -> Result < String , RcgenError > {
1551
1545
let contents = self . serialize_der ( ) ?;
1552
1546
let p = Pem :: new ( "CERTIFICATE" , contents) ;
1553
1547
Ok ( pem:: encode_config ( & p, ENCODE_CONFIG ) )
1554
1548
}
1555
1549
/// 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*
1558
1550
#[ cfg( feature = "pem" ) ]
1559
1551
pub fn serialize_pem_with_signer ( & self , ca : & Certificate ) -> Result < String , RcgenError > {
1560
1552
let contents = self . serialize_der_with_signer ( ca) ?;
1561
1553
let p = Pem :: new ( "CERTIFICATE" , contents) ;
1562
1554
Ok ( pem:: encode_config ( & p, ENCODE_CONFIG ) )
1563
1555
}
1564
1556
/// 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*
1567
1557
#[ cfg( feature = "pem" ) ]
1568
1558
pub fn serialize_request_pem ( & self ) -> Result < String , RcgenError > {
1569
1559
let contents = self . serialize_request_der ( ) ?;
@@ -1579,8 +1569,6 @@ impl Certificate {
1579
1569
/// Serializes the private key in PEM format
1580
1570
///
1581
1571
/// Panics if called on a remote key pair.
1582
- ///
1583
- /// *This function is only available if rcgen is built with the "pem" feature*
1584
1572
#[ cfg( feature = "pem" ) ]
1585
1573
pub fn serialize_private_key_pem ( & self ) -> String {
1586
1574
self . key_pair . serialize_pem ( )
0 commit comments