rusticata / x509-parser

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

Why does X509CertificationRequest::verify_signature take a parameter #66

Closed est31 closed 3 years ago

est31 commented 3 years ago

In reviewing https://github.com/est31/rcgen/pull/41 I saw that the verify_signature function on CSRs taking a parameter, with None being passed in the PR. Fearing that the API witholding some feature that upstream provides, I checked the function definition. Apparently it's only to pass an optional public key to use for verification. For certificates, such a param makes sense, as they might be signed by other entities, but CSRs are always self-signed, no? What about removing the parameter from the API before a crates.io release?

cc @djc

djc commented 3 years ago

Probably just my mistake in blindly copying the Certificate verification code. I'll fix it up.

djc commented 3 years ago

See #67.