rusticata / x509-parser

X.509 parser written in pure Rust. Fast, zero-copy, safe.
Other
206 stars 67 forks source link

Switch base64 decoding to `data-encoding` crate #136

Closed sdroege closed 1 year ago

sdroege commented 1 year ago

It was already previously used elsewhere in this crate and depending on two base64 implementations doesn't seem ideal.


Also fixes https://github.com/rusticata/x509-parser/pull/134

chifflier commented 1 year ago

Oh, I missed this when merging #138

This looks interesting, but we'd need to ensure that the features provided are really similar. Do you think this is the case? If yes, could you rebase and resubmit? Thanks!

sdroege commented 1 year ago

It's the same base64 variant, if that's your question :)

https://docs.rs/data-encoding/latest/data_encoding/ has a comparison between data-encoding, base64 and GNU base64 for some other properties.

If this sounds good to you I'll rebase the PR.

chifflier commented 1 year ago

Yes, in the past I encountered some weird base 64 variants (some remove the trailing ==, others are said web-safe, etc) and I did not check the RFC to find which is used in certificates. It does not seem to be an exotic one. I'm fine switching crates, so please go ahead

sdroege commented 1 year ago

Ok, I've rebased this now. Let me know if this look ok to you :)

chifflier commented 1 year ago

Merged, thanks!