-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fail hard if SSL certs or keys are invalid (#2848)
* Fail hard if OpenSSL cannot load cert or key Previously if an invalid SSL cert or key (e.g. blank file, mismatching private and public key, etc.) were specified, Puma would quietly accept them, bind to the port, and mysteriously fail with an error only after a client initiates a connection: ``` SSL error, peer: ::1, peer cert: : #<Puma::MiniSSL::SSLError: OpenSSL error: error:1417A0C1:SSL routines:tls_post_process_client_hello:no shared cipher - 193> ``` We now check the OpenSSL return values and raise an exception if the cert or key cannot be loaded. * Add SSL invalid tests Co-authored-by: MSP-Greg <Greg.mpls@gmail.com>
- Loading branch information
1 parent
416c1e2
commit c7dc812
Showing
2 changed files
with
63 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters