-
Notifications
You must be signed in to change notification settings - Fork 50
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
Make use of sha1 crate an optional feature #577
Conversation
I will run this change through our CI and deployment and also figure out github |
I think we should separate the idea of win crypto vs openssl and this. The Ultimately the features would be like this:
Then the internal check will be that we at least have something provides
|
Ok I think I see what you mean, let me try add that. |
So I enabled the sha1 by default so there should be no changes for current users. (except the ones that disables all features) I think we can add the base_crypto check and features once we add the cng crate. |
2ae8892
to
9a4bb48
Compare
9a4bb48
to
c64bee5
Compare
@algesten ok I tested it in our repo and end2end and seem to work fine. So ready for merge unless more comments. |
@thomaseizinger you might need to add "feature["sha1"]" on your side after this change. |
That is a semver-breaking change then. Is the plan to make the corresponding version bump too? |
FWIW, changing code paths with features can be problematic because features get aggregated by cargo. As a rule of thumb, features should only add new APIs, not modify existing code paths. To select a "backend" for a certain functionality, I'd recommend to use regular |
cfg feels a little bit much in this case, but whatever @algesten see fit. |
I tend to agree. The risk is more on your end because there is no way to disable the |
Yeah, let's bump to 0.7.0.
I hear ya. Got very deep into this problem in ureq wrt crypto provider. There I decided to require both a feature flag and a configuration change to enable another crypto backend. However for str0m/sha1 I reason like this:
|
Just testing to see if the asm feature works on windows now. |
All sounds very reasonable to me! |
6e7dbd6
to
51697ee
Compare
The asm feature is still not working. |
Yes, the prod build pipelines have checks that are injected. But I also added cargo tree | grep sha1 check in our own gate as well. Thanks for quick review! |
For security reasons rust crypto might need to be disabled and one would want use pure OpenSSL.
This change adds a feature flag for sha1 crate.