@@ -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