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

SSL options are not passed to IO::Socket::SSL. #157

Open
vel21ripn opened this issue Jun 20, 2022 · 0 comments
Open

SSL options are not passed to IO::Socket::SSL. #157

vel21ripn opened this issue Jun 20, 2022 · 0 comments

Comments

@vel21ripn
Copy link

To work with self-signed certificates, it is necessary to pass many options to IO::Socket::SSL such as SSL_ocsp_mode, SSL_hostname, SSL_cert_file, SSL_key_file, SSL_ca_file.
As a temporary patch you can apply the patch

diff -u Redis.pm.orig Redis.pm 
--- Redis.pm.orig	2022-06-20 22:06:08.005466593 +0300
+++ Redis.pm	2022-06-20 22:05:41.455181815 +0300
@@ -192,6 +192,9 @@
             $self->{ssl}  = 1;
             $socket_class = 'IO::Socket::SSL';
             $socket_args{SSL_verify_mode} = $args{SSL_verify_mode} // 1;
+	     foreach (grep /^SSL_/,keys %args) {
+                $socket_args{$_} = $args{$_} if !defined $socket_args{$_};
+	     }
         }
         else {
             $self->{ssl}  = 0;

Perhaps you can make a more accurate solution.

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

No branches or pull requests

1 participant