When serializing to PEM, rcgen simply calls pem::encode.
The pem package defaults to using CRLF. To use LF, one must instead call the encode_config, but as far as I can tell there's no way of doing this through rcgen. Instead I have pull in the pem crate manually and duplicate what serialize_pem does. Admittedly the workaround is pretty minor, but most of all it's unexpected to get a PEM with CRLF linebreaks when working on Linux.
Would it perhaps be possible to change the serialize_pem functions and the other variants of the function to attempt to determine linebreaks from the current OS, or would that be considered too breaking?
When serializing to PEM, rcgen simply calls pem::encode.
The
pempackage defaults to using CRLF. To use LF, one must instead call theencode_config, but as far as I can tell there's no way of doing this through rcgen. Instead I have pull in thepemcrate manually and duplicate whatserialize_pemdoes. Admittedly the workaround is pretty minor, but most of all it's unexpected to get a PEM with CRLF linebreaks when working on Linux.Would it perhaps be possible to change the serialize_pem functions and the other variants of the function to attempt to determine linebreaks from the current OS, or would that be considered too breaking?