Skip to content
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

Openssl feature pulls in boringssl #557

Closed
Ten0 opened this issue Feb 11, 2022 · 6 comments · Fixed by #558
Closed

Openssl feature pulls in boringssl #557

Ten0 opened this issue Feb 11, 2022 · 6 comments · Fixed by #558

Comments

@Ten0
Copy link
Contributor

Ten0 commented Feb 11, 2022

Describe the bug
Enabling the openssl feature pulls in 10MB of boringssl-src.
This is due to:

secure = ["boringssl-src"]
openssl = ["secure"]

Expected behavior
IIUC BoringSSL is not required since we're using openssl instead, so that should not be added as a dependency.

@BusyJay
Copy link
Member

BusyJay commented Feb 11, 2022

Agree. How about adding a private feature name "secure_openssl" which acts the same as secure except depending on boringssl-src.

@Ten0
Copy link
Contributor Author

Ten0 commented Feb 11, 2022

wouldn't that already be the openssl feature? Does this mean we should just remove the dependency on secure in openssl and just update the cfg flags?

@BusyJay
Copy link
Member

BusyJay commented Feb 11, 2022

Using openssl is OK too, but when checking whether secure features are enabled, it has to be written as cfg!(features = "openssl") || cfg!(features = "secure"). If using a private features, then it can be defined as:

secure = ["boringssl-src", "_secure_enabled"]
openssl = ["_secure_enabled"]

So the check can be written as cfg!(features = "_secure_enabled").

@Ten0
Copy link
Contributor Author

Ten0 commented Feb 11, 2022

With regards to always writing an or on these cfg clauses or factoring them as a private feature I have no particular opinion 🙂

Naming seems good.

@BusyJay
Copy link
Member

BusyJay commented Feb 11, 2022

Do you want to contribute this improvement?

@Ten0
Copy link
Contributor Author

Ten0 commented Feb 11, 2022

Do you want to contribute this improvement?

I'm afraid I don't have time for this at the moment 😞

BusyJay added a commit that referenced this issue Feb 28, 2022
This PR also uses the same bindings for both (x86_64|aarch64)_(macos|linux).
CI will check if it's OK to do so. This should make maintenance easier.

Changes from #539 is also included in this PR.

Features use-bindgen is removed as it can be detected during compile time now.

This PR also rename the secure features to boringssl for better understanding.
And now only enabling openssl features will not download boringssl anymore.

Close #557.
Close #539.

Signed-off-by: Jay Lee <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants