-
-
Notifications
You must be signed in to change notification settings - Fork 770
Detect boringssl in expando.c? #1768
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
Comments
Yep, agree that we should detect boring and fail the build if it's not done explicitly in boring mode. |
@sfackler do you think the 2nd part makes sense as a follow-up -- provided BoringSSL is interested in it of course. |
Yeah I would definitely love to auto-detect bssl-sys - it was discussed on the initial BoringSSL support PR but seemed like it'd be tricky for some reason I've forgotten. For now we should just do the detection bit IMO. |
SGTM. Shall I prep a PR for the first piece? |
👍 |
The answer to why its hard seems to be: #1649 (comment) I'm trying to think if there's a better way to make auto-detection Just Work than by requesting a new cargo feature... |
Refs #1768 -- reject boringssl if unstable_boringssl feature isn't specified
Thanks for fixing this so quickly, by the time I went to look at doing it y'all already had a PR up to fix it. |
No problem -- the first part was the easy part :-) The hard part is figuring out if there's a way to make it work by default. To get started with this, I figured it'd make sense to get started by listing the design constraints on any potential solution: BoringSSL constraints:
pyca/cryptography constraints:
rust-openssl constraints:
So where does this leave us?
This means either: a) BoringSSL's bindings shouldn't be published as a crate, instead they should be a single Rust source file that can be The blockers to (a) are 1) the C wrapper functions, 2) the link directives in A design to make (b) work would be something: A I think either of these designs can work. (a) is a bit simpler, but ultimately less flexible. I'd appreciate any thoughts from everyone on whether I missed any considerations, or if they have a preferred solution! Happy Holidays ❄️ ❄️ ❄️ |
Hi all, hope folks had good holidays which were free from build system horrors. I wanted to re-up this and see if folks had views: most importantly on if I have the constraints right? But also if there's a preference on what a solution might look like. I'm enthusiastic to get to working on this. For myself, I think (a) will be easier, so all other things being equal I'd probably do that. |
…e naturally This PR uses the in-development bindgen support for static inline functions (rust-lang/rust-bindgen#2335) + an in-development boringssl patch (https://boringssl-review.googlesource.com/c/boringssl/+/56505) to allow using boringssl with rust-openssl without needing a .cargo/config override
…e naturally This PR uses the in-development bindgen support for static inline functions (rust-lang/rust-bindgen#2335) + an in-development boringssl patch (https://boringssl-review.googlesource.com/c/boringssl/+/56505) to allow using boringssl with rust-openssl without needing a .cargo/config override
…e naturally This PR uses the in-development bindgen support for static inline functions (rust-lang/rust-bindgen#2335) + an in-development boringssl patch (https://boringssl-review.googlesource.com/c/boringssl/+/56505) to allow using boringssl with rust-openssl without needing a .cargo/config override
…e naturally This PR uses the in-development bindgen support for static inline functions (rust-lang/rust-bindgen#2335) + an in-development boringssl patch (https://boringssl-review.googlesource.com/c/boringssl/+/56505) to allow using boringssl with rust-openssl without needing a .cargo/config override
This allows building it without the bssl-sys crate. This is an alternative approach to fixing sfackler#1768 (in contrast to sfackler#1806). This maintains support for using the bssl-sys crate.
This allows building it without the bssl-sys crate. This is an alternative approach to fixing sfackler#1768 (in contrast to sfackler#1806). This maintains support for using the bssl-sys crate.
This allows building it without the bssl-sys crate. This is an alternative approach to fixing sfackler#1768 (in contrast to sfackler#1806). This maintains support for using the bssl-sys crate.
This allows building it without the bssl-sys crate. This is an alternative approach to fixing sfackler#1768 (in contrast to sfackler#1806). This maintains support for using the bssl-sys crate.
This allows building it without the bssl-sys crate. This is an alternative approach to fixing sfackler#1768 (in contrast to sfackler#1806). This maintains support for using the bssl-sys crate.
This allows building it without the bssl-sys crate. This is an alternative approach to fixing sfackler#1768 (in contrast to sfackler#1806). This maintains support for using the bssl-sys crate.
This allows building it without the bssl-sys crate. This is an alternative approach to fixing sfackler#1768 (in contrast to sfackler#1806). This maintains support for using the bssl-sys crate.
This allows building it without the bssl-sys crate. This is an alternative approach to fixing sfackler#1768 (in contrast to sfackler#1806). This maintains support for using the bssl-sys crate.
This allows building it without the bssl-sys crate. This is an alternative approach to fixing sfackler#1768 (in contrast to sfackler#1806). This maintains support for using the bssl-sys crate.
resolved by #1831 |
Right now if you compile against BoringSSL (i.e., point
OPENSSL_DIR
at it), but don't specifyunstable_boringssl
it will silently build, but many things won't work (e.g. pyca/cryptography#7933 (comment)).At a minimum, would it make sense to detect this situation with
expando.c
and fail the build, rather than silently proceeding?Even better would be if it could detect this and work -- perhaps by BoringSSL putting the generated
bssl-sys
crate somewhere that could be detected.cc: @davidben, @maurer, @benbrittain, @durin42
The text was updated successfully, but these errors were encountered: