-
Notifications
You must be signed in to change notification settings - Fork 603
Support loading custom OpenSSL provider #2357
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
base: master
Are you sure you want to change the base?
Conversation
When using OpenSSL, allow Squid to use a specific crypto provider named in ssl_provider. Replaces any system-wide configuration specified using openssl.conf.
|
Existing builds will start to see something like this is cache.log on startup: When |
rousskov
left a comment
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.
Thank you for adding this feature. I have not reviewed the entire PR yet, and will have more questions later, but these two change requests should allow you to make progress.
| if (::Config.SSL.ssl_provider) { | ||
| if (!OSSL_PROVIDER_load(nullptr, ::Config.SSL.ssl_provider)) { | ||
| const auto ssl_error = ERR_get_error(); | ||
| fatalf("Failed to load SSL provider: %s\n", Security::ErrorString(ssl_error)); |
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.
Please do not call fatalf() when reacting to a configuration application failure. Throw an exception instead.
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.
Unfortunately this function is not only called during startup. It can be delayed and called later in Squid operation after a reconfigure. The exception handlers for that case are not yet reliable.
FWIW, I planned to fix the above situation with the project moving init things into runners. But that work got stalled.
When using OpenSSL, allow Squid to use a specific
crypto provider named in ssl_provider.
Replaces any system-wide configuration specified
using openssl.conf.