File: POE-Component-SSLify-1.012-Use-default-SSL-version-in-tests.patch

package info (click to toggle)
libpoe-component-sslify-perl 1.012-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 548 kB
  • ctags: 26
  • sloc: perl: 2,547; xml: 27; makefile: 2
file content (274 lines) | stat: -rw-r--r-- 11,738 bytes parent folder | download | duplicates (3)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
From fab873b9e556bc64cdd9da87ee76332840ca87e9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Mon, 18 May 2015 16:04:37 +0200
Subject: [PATCH] Use default SSL version in tests
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

OpenSSL or distributor will remove support for SSLv3 soon or later.
POE-Component-SSLify tests fail now because Net-SSLeay-0.68 has
already removed the support.

The patch replaces hard-coding any specific procol version to
`default' value which should be future-proof.

CPAN RT#104493

Signed-off-by: Petr Písař <ppisar@redhat.com>
---
 t/renegotiate_client.t       | 6 +++---
 t/renegotiate_client_pings.t | 6 +++---
 t/renegotiate_server.t       | 6 +++---
 t/simple.t                   | 6 +++---
 t/simple_large.t             | 6 +++---
 t/simple_parallel.t          | 6 +++---
 t/simple_parallel_large.t    | 6 +++---
 t/simple_parallel_superbig.t | 6 +++---
 t/simple_superbig.t          | 6 +++---
 t/upgrade.t                  | 6 +++---
 10 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/t/renegotiate_client.t b/t/renegotiate_client.t
index 2673653..f140b07 100644
--- a/t/renegotiate_client.t
+++ b/t/renegotiate_client.t
@@ -50,8 +50,8 @@ POE::Component::Server::TCP->new
 	},
 	ClientPreConnect	=> sub
 	{
-		eval { SSLify_Options('mylib/example.key', 'mylib/example.crt', 'sslv3') };
-		eval { SSLify_Options('../mylib/example.key', '../mylib/example.crt', 'sslv3') } if ($@);
+		eval { SSLify_Options('mylib/example.key', 'mylib/example.crt', 'default') };
+		eval { SSLify_Options('../mylib/example.key', '../mylib/example.crt', 'default') } if ($@);
 		ok(!$@, "SERVER: SSLify_Options $@");
 
 		my $socket = eval { Server_SSLify($_[ARG0]) };
@@ -113,7 +113,7 @@ POE::Component::Client::TCP->new
 	},
 	PreConnect	=> sub
 	{
-		my $ctx = eval { SSLify_ContextCreate(undef, undef, 'sslv3') };
+		my $ctx = eval { SSLify_ContextCreate(undef, undef, 'default') };
 		ok(!$@, "CLIENT: SSLify_ContextCreate $@");
 		my $socket = eval { Client_SSLify($_[ARG0], undef, undef, $ctx) };
 		ok(!$@, "CLIENT: Client_SSLify $@");
diff --git a/t/renegotiate_client_pings.t b/t/renegotiate_client_pings.t
index 23181dc..565c223 100644
--- a/t/renegotiate_client_pings.t
+++ b/t/renegotiate_client_pings.t
@@ -52,8 +52,8 @@ POE::Component::Server::TCP->new
 	},
 	ClientPreConnect	=> sub
 	{
-		eval { SSLify_Options('mylib/example.key', 'mylib/example.crt', 'sslv3') };
-		eval { SSLify_Options('../mylib/example.key', '../mylib/example.crt', 'sslv3') } if ($@);
+		eval { SSLify_Options('mylib/example.key', 'mylib/example.crt', 'default') };
+		eval { SSLify_Options('../mylib/example.key', '../mylib/example.crt', 'default') } if ($@);
 		ok(!$@, "SERVER: SSLify_Options $@");
 
 		my $socket = eval { Server_SSLify($_[ARG0]) };
@@ -116,7 +116,7 @@ POE::Component::Client::TCP->new
 	},
 	PreConnect	=> sub
 	{
-		my $ctx = eval { SSLify_ContextCreate(undef, undef, 'sslv3') };
+		my $ctx = eval { SSLify_ContextCreate(undef, undef, 'default') };
 		ok(!$@, "CLIENT: SSLify_ContextCreate $@");
 		my $socket = eval { Client_SSLify($_[ARG0], undef, undef, $ctx) };
 		ok(!$@, "CLIENT: Client_SSLify $@");
diff --git a/t/renegotiate_server.t b/t/renegotiate_server.t
index 9e07aea..d7384ce 100644
--- a/t/renegotiate_server.t
+++ b/t/renegotiate_server.t
@@ -50,8 +50,8 @@ POE::Component::Server::TCP->new
 	},
 	ClientPreConnect	=> sub
 	{
-		eval { SSLify_Options('mylib/example.key', 'mylib/example.crt', 'sslv3') };
-		eval { SSLify_Options('../mylib/example.key', '../mylib/example.crt', 'sslv3') } if ($@);
+		eval { SSLify_Options('mylib/example.key', 'mylib/example.crt', 'default') };
+		eval { SSLify_Options('../mylib/example.key', '../mylib/example.crt', 'default') } if ($@);
 		ok(!$@, "SERVER: SSLify_Options $@");
 
 		my $socket = eval { Server_SSLify($_[ARG0]) };
@@ -113,7 +113,7 @@ POE::Component::Client::TCP->new
 	},
 	PreConnect	=> sub
 	{
-		my $ctx = eval { SSLify_ContextCreate(undef, undef, 'sslv3') };
+		my $ctx = eval { SSLify_ContextCreate(undef, undef, 'default') };
 		ok(!$@, "CLIENT: SSLify_ContextCreate $@");
 		my $socket = eval { Client_SSLify($_[ARG0], undef, undef, $ctx) };
 		ok(!$@, "CLIENT: Client_SSLify $@");
diff --git a/t/simple.t b/t/simple.t
index 742f9e6..9225cd9 100644
--- a/t/simple.t
+++ b/t/simple.t
@@ -47,8 +47,8 @@ POE::Component::Server::TCP->new
 	},
 	ClientPreConnect	=> sub
 	{
-		eval { SSLify_Options('mylib/example.key', 'mylib/example.crt', 'sslv3') };
-		eval { SSLify_Options('../mylib/example.key', '../mylib/example.crt', 'sslv3') } if ($@);
+		eval { SSLify_Options('mylib/example.key', 'mylib/example.crt', 'default') };
+		eval { SSLify_Options('../mylib/example.key', '../mylib/example.crt', 'default') } if ($@);
 		ok(!$@, "SERVER: SSLify_Options $@");
 
 		my $socket = eval { Server_SSLify($_[ARG0]) };
@@ -107,7 +107,7 @@ POE::Component::Client::TCP->new
 	},
 	PreConnect	=> sub
 	{
-		my $ctx = eval { SSLify_ContextCreate(undef, undef, 'sslv3') };
+		my $ctx = eval { SSLify_ContextCreate(undef, undef, 'default') };
 		ok(!$@, "CLIENT: SSLify_ContextCreate $@");
 		my $socket = eval { Client_SSLify($_[ARG0], undef, undef, $ctx) };
 		ok(!$@, "CLIENT: Client_SSLify $@");
diff --git a/t/simple_large.t b/t/simple_large.t
index f749880..01046fc 100644
--- a/t/simple_large.t
+++ b/t/simple_large.t
@@ -49,8 +49,8 @@ POE::Component::Server::TCP->new
 	},
 	ClientPreConnect	=> sub
 	{
-		eval { SSLify_Options('mylib/example.key', 'mylib/example.crt', 'sslv3') };
-		eval { SSLify_Options('../mylib/example.key', '../mylib/example.crt', 'sslv3') } if ($@);
+		eval { SSLify_Options('mylib/example.key', 'mylib/example.crt', 'default') };
+		eval { SSLify_Options('../mylib/example.key', '../mylib/example.crt', 'default') } if ($@);
 		ok(!$@, "SERVER: SSLify_Options $@");
 
 		my $socket = eval { Server_SSLify($_[ARG0]) };
@@ -109,7 +109,7 @@ POE::Component::Client::TCP->new
 	},
 	PreConnect	=> sub
 	{
-		my $ctx = eval { SSLify_ContextCreate(undef, undef, 'sslv3') };
+		my $ctx = eval { SSLify_ContextCreate(undef, undef, 'default') };
 		ok(!$@, "CLIENT: SSLify_ContextCreate $@");
 		my $socket = eval { Client_SSLify($_[ARG0], undef, undef, $ctx) };
 		ok(!$@, "CLIENT: Client_SSLify $@");
diff --git a/t/simple_parallel.t b/t/simple_parallel.t
index f135b28..006ccd0 100644
--- a/t/simple_parallel.t
+++ b/t/simple_parallel.t
@@ -47,8 +47,8 @@ POE::Component::Server::TCP->new
 	},
 	ClientPreConnect	=> sub
 	{
-		eval { SSLify_Options('mylib/example.key', 'mylib/example.crt', 'sslv3') };
-		eval { SSLify_Options('../mylib/example.key', '../mylib/example.crt', 'sslv3') } if ($@);
+		eval { SSLify_Options('mylib/example.key', 'mylib/example.crt', 'default') };
+		eval { SSLify_Options('../mylib/example.key', '../mylib/example.crt', 'default') } if ($@);
 		ok(!$@, "SERVER: SSLify_Options $@");
 
 		my $socket = eval { Server_SSLify($_[ARG0]) };
@@ -107,7 +107,7 @@ POE::Component::Client::TCP->new
 	},
 	PreConnect	=> sub
 	{
-		my $ctx = eval { SSLify_ContextCreate(undef, undef, 'sslv3') };
+		my $ctx = eval { SSLify_ContextCreate(undef, undef, 'default') };
 		ok(!$@, "CLIENT: SSLify_ContextCreate $@");
 		my $socket = eval { Client_SSLify($_[ARG0], undef, undef, $ctx) };
 		ok(!$@, "CLIENT: Client_SSLify $@");
diff --git a/t/simple_parallel_large.t b/t/simple_parallel_large.t
index fa4d3d6..d065748 100644
--- a/t/simple_parallel_large.t
+++ b/t/simple_parallel_large.t
@@ -49,8 +49,8 @@ POE::Component::Server::TCP->new
 	},
 	ClientPreConnect	=> sub
 	{
-		eval { SSLify_Options('mylib/example.key', 'mylib/example.crt', 'sslv3') };
-		eval { SSLify_Options('../mylib/example.key', '../mylib/example.crt', 'sslv3') } if ($@);
+		eval { SSLify_Options('mylib/example.key', 'mylib/example.crt', 'default') };
+		eval { SSLify_Options('../mylib/example.key', '../mylib/example.crt', 'default') } if ($@);
 		ok(!$@, "SERVER: SSLify_Options $@");
 
 		my $socket = eval { Server_SSLify($_[ARG0]) };
@@ -107,7 +107,7 @@ POE::Component::Client::TCP->new
 	},
 	PreConnect	=> sub
 	{
-		my $ctx = eval { SSLify_ContextCreate(undef, undef, 'sslv3') };
+		my $ctx = eval { SSLify_ContextCreate(undef, undef, 'default') };
 		ok(!$@, "CLIENT: SSLify_ContextCreate $@");
 		my $socket = eval { Client_SSLify($_[ARG0], undef, undef, $ctx) };
 		ok(!$@, "CLIENT: Client_SSLify $@");
diff --git a/t/simple_parallel_superbig.t b/t/simple_parallel_superbig.t
index c4ca4ad..eba0efc 100644
--- a/t/simple_parallel_superbig.t
+++ b/t/simple_parallel_superbig.t
@@ -58,8 +58,8 @@ POE::Component::Server::TCP->new
 	},
 	ClientPreConnect	=> sub
 	{
-		eval { SSLify_Options('mylib/example.key', 'mylib/example.crt', 'sslv3') };
-		eval { SSLify_Options('../mylib/example.key', '../mylib/example.crt', 'sslv3') } if ($@);
+		eval { SSLify_Options('mylib/example.key', 'mylib/example.crt', 'default') };
+		eval { SSLify_Options('../mylib/example.key', '../mylib/example.crt', 'default') } if ($@);
 		ok(!$@, "SERVER: SSLify_Options $@");
 
 		my $socket = eval { Server_SSLify($_[ARG0]) };
@@ -116,7 +116,7 @@ POE::Component::Client::TCP->new
 	},
 	PreConnect	=> sub
 	{
-		my $ctx = eval { SSLify_ContextCreate(undef, undef, 'sslv3') };
+		my $ctx = eval { SSLify_ContextCreate(undef, undef, 'default') };
 		ok(!$@, "CLIENT: SSLify_ContextCreate $@");
 		my $socket = eval { Client_SSLify($_[ARG0], undef, undef, $ctx) };
 		ok(!$@, "CLIENT: Client_SSLify $@");
diff --git a/t/simple_superbig.t b/t/simple_superbig.t
index 6c5eacd..c00a83c 100644
--- a/t/simple_superbig.t
+++ b/t/simple_superbig.t
@@ -57,8 +57,8 @@ POE::Component::Server::TCP->new
 	},
 	ClientPreConnect	=> sub
 	{
-		eval { SSLify_Options('mylib/example.key', 'mylib/example.crt', 'sslv3') };
-		eval { SSLify_Options('../mylib/example.key', '../mylib/example.crt', 'sslv3') } if ($@);
+		eval { SSLify_Options('mylib/example.key', 'mylib/example.crt', 'default') };
+		eval { SSLify_Options('../mylib/example.key', '../mylib/example.crt', 'default') } if ($@);
 		ok(!$@, "SERVER: SSLify_Options $@");
 
 		my $socket = eval { Server_SSLify($_[ARG0]) };
@@ -119,7 +119,7 @@ POE::Component::Client::TCP->new
 	},
 	PreConnect	=> sub
 	{
-		my $ctx = eval { SSLify_ContextCreate(undef, undef, 'sslv3') };
+		my $ctx = eval { SSLify_ContextCreate(undef, undef, 'default') };
 		ok(!$@, "CLIENT: SSLify_ContextCreate $@");
 		my $socket = eval { Client_SSLify($_[ARG0], undef, undef, $ctx) };
 		ok(!$@, "CLIENT: Client_SSLify $@");
diff --git a/t/upgrade.t b/t/upgrade.t
index cd5fdb3..7795bbb 100644
--- a/t/upgrade.t
+++ b/t/upgrade.t
@@ -54,8 +54,8 @@ POE::Component::Server::TCP->new
 			$heap->{client}->flush; # make sure we sent the pong
 
 			# sslify it in-situ!
-			eval { SSLify_Options('mylib/example.key', 'mylib/example.crt', 'sslv3') };
-			eval { SSLify_Options('../mylib/example.key', '../mylib/example.crt', 'sslv3') } if ($@);
+			eval { SSLify_Options('mylib/example.key', 'mylib/example.crt', 'default') };
+			eval { SSLify_Options('../mylib/example.key', '../mylib/example.crt', 'default') } if ($@);
 			ok(!$@, "SERVER: SSLify_Options $@");
 			my $socket = eval { Server_SSLify($heap->{client}->get_output_handle) };
 			ok(!$@, "SERVER: Server_SSLify $@");
@@ -124,7 +124,7 @@ POE::Component::Client::TCP->new
 			ok(1, "CLIENT: recv: $line");
 
 			# sslify it in-situ!
-			my $ctx = eval { SSLify_ContextCreate(undef, undef, 'sslv3') };
+			my $ctx = eval { SSLify_ContextCreate(undef, undef, 'default') };
 			ok(!$@, "CLIENT: SSLify_ContextCreate $@");
 			my $socket = eval { Client_SSLify($heap->{server}->get_output_handle, undef, undef, $ctx) };
 			ok(!$@, "CLIENT: Client_SSLify $@");
-- 
2.1.0