-
-
Notifications
You must be signed in to change notification settings - Fork 325
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
Work around Security Framework failing to import PKCS12 from OpenSSL 3 #693
Conversation
|
Signed-off-by: kazk <[email protected]>
Ah, looks like OpenSSL 3 can't load Maybe we can do |
Is there anything blocking us from promoting OpenSSL everywhere? If Security.Framework is this broken then I'd rather steer people away from it than default to bad crypto. Besides, at least for controllers this'd be more representative of the actual target environment anyway. |
Okay.. after reading through this again then it looks like it's not a huge issue since it's only for adapting the cert in-memory at runtime, since they don't support direct loading from PEM? If so then I'd rather apply the workaround globally but slap a warning on the function that the PKCS12 bundles it generates shouldn't be transmitted anywhere. |
Yeah, PKCS#12 is necessary because I've picked up the old PR to add PKCS#8 support, and working with them to get that merged (sfackler/rust-native-tls#209). |
We can add another TLS feature flag
Yeah, that's fine.
We can add it, but I don't see the point of the warning. PKCS#12 with legacy algorithm has been the default and will continue to be more common for a long time. It's a legacy format anyway.
It's also obviously insecure because Hopefully PKCS#8 support gets merged soon, and we don't need to workaround. |
Doesn't rustc typically depend on the native C toolchain's linker anyway, so I'm not sure we're really saving that much trouble here? Although this may have changed since the last time I looked at it, I remember that there were some experiments around migrating to bunding LLVM's lld instead.
100%
There's a difference between "this use of this function is obviously insecure" and "this function is inherently insecure, no matter how you use it". |
I don't know how frustrating things are on macOS or Windows or anything else, but setting up OpenSSL on Windows for CI was a huge pain. I've read devs on Windows having trouble with OpenSSL multiple times, too. The |
Hmm, maybe the only reason we have
|
Until PKCS8 is supported by |
Should be a workaround for #691.
OpenSSL 3 made the following breaking changes for PKCS#12:
Security Framework used by
native_tls
on macOS and iOS fails to import PKCS#12 with modern cyphers.Work around this by using the legacy algorithms on macOS.
I don't know if Windows is affected, we can just change the
#[cfg]
if it is.@danni-m
Can you try this branch?