quinn-rs / quinn

Async-friendly QUIC implementation in Rust
Apache License 2.0
3.85k stars 394 forks source link

Doc errors: rustls doesn't take PEM certs/keys directly #1367

Closed Banyc closed 2 years ago

Banyc commented 2 years ago

Documentation here

https://quinn-rs.github.io/quinn/quinn/certificate.html#:~:text=certificate%20to%20cert.-,pem,-and%20the%20private

is incorrect since rustls::Certificate

The certificate must be DER-encoded X.509.

The rustls-pemfile crate can be used to parse a PEM file.

and rustls::PrivateKey

The private key must be DER-encoded ASN.1 in either PKCS#8 or PKCS#1 format.

The rustls-pemfile crate can be used to extract private keys from a PEM file in these formats.

Banyc commented 2 years ago

Pull request is merged