-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update outdated OpenSSL vendoring doc #416
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather the feature be called openssl-vendored
just from a naming convention thing... <target>-<modifier>
.
@micolous should check this too IMO. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no reason to include this in webauthn-rs
, because of Cargo feature unification.
If you would like to use vendoring, then your binary target should add a dependency on openssl
with that feature.
Also, in order to make this work "as expected", we will need to bump our version of the openssl
dependency to one which vendors against OpenSSL 3.x.
OpenSSL vendoring has a lot of caveats (on technical, certification and licensing grounds), so saying "you can use it" is not sufficient.
That makes sense about feature unification. I still think the docs should be changed, although if "you can use" is not sufficient for you, I'm not sure exactly what you want — I would hope that people using this library understand their constraints well enough to know whether vendoring OpenSSL is a good choice for them. |
While this isn't necessary to allow vendoring, I've written #418 which will explicitly fail the build on OpenSSL 1.x (vendored or not) for all of
We're a big fan of making it hard to shoot yourself in the foot, and vendoring through feature flags is a great way to shoot yourself in the foot – and worse is that it's not immediately obvious. 😄 While vendoring has some legitimate use cases, they need to be carefully managed, especially for a security-critical library like OpenSSL, which also sits outside the Rust ecosystem. When vendoring for redistributable binaries, it is disingenuous to suggest that simply "enabling" a feature flag to get vendoring is the end of the story - when you start shipping others' software as dependencies of your own, you need to manage the software supply chain. Handling that properly means you're either:
By contrast, a This brings me to the other major use case I've seen for vendoring – it's for developers who haven't set up their build environment properly, and they were unable (or unwilling) to actually fix the issue properly, so that technical debt has been outsourced to the maintainers of those bindings. While I acknowledge that in OpenSSL's case it isn't the easiest thing to get going (especially for a novice), that's really a problem for Unfortunately, this also means the priority for a At the end of the day, these are all issues for the There are wider issues with vendoring in the Rust ecosystem (especially silent auto-vendoring), but thankfully PS: Bringing in that flag to |
As a shorter response, I think that vendoring is up to the leaf-binary, not a library. As @micolous has pointed out, you don't need webauthn-rs to have a vendoring flag due to https://doc.rust-lang.org/cargo/reference/features.html#feature-unification . So I don't think we need to add our own vendor flag when there are already ways for you to enable this externally. The bar to clear here is "how is webauthn-rs having a vendor flag, superior to cargo's existing feature unification options". |
I've changed this PR to simply remove the outdated comment in Personally, I think it'd be good to add a note in that file that the |
I'm okay with a readme/doc note about the topic |
Updated this PR with a note about the minimum required |
Yup, that seems reasonable, thanks! |
The upstream
openssl-src
crate now supports v3, so this works correctly.Fixes #