You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pemfile: also trim leading contiguous content whitespace
RFC 7468 §2[0] says:
> parsers SHOULD ignore whitespace
Previously we only stripped the trailing whitespace from the base64
content lines within the PEM section boundaries. This branch updates our
processing to additionally trim leading contiguous whitespace. This felt
more sensible than outright ignoring whitespace (e.g. from the middle of
content) and will be sufficient to resolve the real world PEM files
we've seen with leading whitespace.
We base our implementation on the stdlib's unstable `[u8]::trim_ascii`
fn, which we can't (yet) use directly due to our MSRV/stable rust
requirements. A TODO is left for future cleanup.
[0]: https://www.rfc-editor.org/rfc/rfc7468#section-2
0 commit comments