perl-redis icon indicating copy to clipboard operation
perl-redis copied to clipboard

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

Open vel21ripn opened this issue 3 years ago • 0 comments

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.

vel21ripn avatar Jun 20 '22 19:06 vel21ripn