File: 0001-Propagate-error-if-cert-key-could-not-be-used-instea.patch

package info (click to toggle)
libio-socket-ssl-perl 2.002-2%2Bdeb8u3
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 1,348 kB
  • sloc: perl: 14,412; makefile: 4
file content (25 lines) | stat: -rw-r--r-- 852 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
From: Steffen Ullrich <Steffen_Ullrich@genua.de>
Date: Sun, 26 Oct 2014 18:23:15 +0100
Subject: Propagate error if cert/key could not be used instead of continuing
 with an invalid context which might cause a segmentation fault
Origin: https://github.com/noxxi/p5-io-socket-ssl/commit/a09f29f423859565bc0384dcfbbc75811d9e4e4a
Bug-Debian: https://bugs.debian.org/881711

---

diff --git a/lib/IO/Socket/SSL.pm b/lib/IO/Socket/SSL.pm
index 13c6680..2330b45 100644
--- a/lib/IO/Socket/SSL.pm
+++ b/lib/IO/Socket/SSL.pm
@@ -489,7 +489,7 @@ sub configure_SSL {
 
     # create context
     # this will fill in defaults in $arg_hash
-    $ctx ||= IO::Socket::SSL::SSL_Context->new($arg_hash);
+    $ctx ||= IO::Socket::SSL::SSL_Context->new($arg_hash) || return;
 
     ${*$self}{'_SSL_arguments'} = $arg_hash;
     ${*$self}{'_SSL_ctx'} = $ctx;
-- 
2.15.1