[svn-upgrade] new version libpoe-component-sslify-perl (1.003)
Jonathan Yu
13 years ago
23 | 23 | 'Apocalypse <APOCAL@cpan.org>' |
24 | 24 | ], |
25 | 25 | 'dist_name' => 'POE-Component-SSLify', |
26 | 'dist_version' => '1.002', | |
26 | 'dist_version' => '1.003', | |
27 | 27 | 'license' => 'perl', |
28 | 28 | 'module_name' => 'POE::Component::SSLify', |
29 | 29 | 'recommends' => {}, |
31 | 31 | 'requires' => { |
32 | 32 | 'Exporter' => '0', |
33 | 33 | 'IO::Handle' => '1.28', |
34 | 'Net::SSLeay' => '0', | |
34 | 'Net::SSLeay' => '1.36', | |
35 | 35 | 'Symbol' => '0', |
36 | 'perl' => '5.006', | |
37 | 'vars' => '0' | |
36 | 'perl' => '5.006' | |
38 | 37 | }, |
39 | 38 | 'script_files' => [] |
40 | 39 | ); |
0 | 0 | Revision history for Perl extension POE::Component::SSLify. |
1 | ||
2 | 1.003 | |
3 | Released: 2011-02-28 15:52:24 UTC | |
4 | ||
5 | Add $IGNORE_SSL_ERRORS to ignore certain SSL errors, thanks MNUNBERG - RT#66130 | |
6 | Remove prereq on vars.pm as it's obsolete | |
1 | 7 | |
2 | 8 | 1.002 |
3 | 9 | Released: 2011-02-20 04:23:48 UTC |
4 | 10 | |
5 | Add SSLify_GetSSL to get the Net::SSLeay object, thanks mordy@irc! | |
11 | Add SSLify_GetSSL to get the Net::SSLeay object, thanks MNUNBERG! | |
6 | 12 | |
7 | 13 | 1.001 |
8 | 14 | Released: 2011-02-13 18:11:07 UTC |
13 | 19 | Released: 2011-02-13 00:06:14 UTC |
14 | 20 | |
15 | 21 | Converted to Dist::Zilla for the release process! |
16 | Add a test for in-situ sslification, thanks mordy@irc! | |
22 | Add a test for in-situ sslification, thanks MNUNBERG! | |
17 | 23 | Add prereq for IO::Handle 1.28 to get sane $socket->blocking( 0 ) behavior on MSWin32 |
18 | 24 | Remove crufty old code for nonblocking and use $socket->blocking() instead |
19 | 25 |
0 | 0 | ============================== |
1 | 1 | 9999-99-99 99:99:99 +0000 HEAD |
2 | 2 | ============================== |
3 | ||
4 | commit 367645dabcbc3ca12aae0c32d7a2e8847274865e | |
5 | Author: Apocalypse <perl@0ne.us> | |
6 | Date: Mon Feb 28 08:51:38 2011 -0700 | |
7 | ||
8 | add note about MSWin32 | |
9 | ||
10 | commit 8dfc5acbbad45910fc93a6688661fb5c46cffd59 | |
11 | Author: Apocalypse <perl@0ne.us> | |
12 | Date: Mon Feb 28 08:46:09 2011 -0700 | |
13 | ||
14 | add IGNORE_SSL_ERRORS, thanks MNUNBERG | |
15 | ||
16 | commit cf26ebeb385b4a44dd20a1fa877905e3b948fd74 | |
17 | Author: Apocalypse <perl@0ne.us> | |
18 | Date: Mon Feb 21 00:01:02 2011 -0700 | |
19 | ||
20 | add explicit Net::SSLeay version req | |
21 | ||
22 | ======================================= | |
23 | 2011-02-19 21:24:02 -0700 release-1.002 | |
24 | ======================================= | |
25 | ||
26 | commit e20a8d5cd43978e14b22d50b884edc14f06a72c6 | |
27 | Author: Apocalypse <perl@0ne.us> | |
28 | Date: Sat Feb 19 21:24:02 2011 -0700 | |
29 | ||
30 | New CPAN release of POE-Component-SSLify - v1.002 | |
31 | ||
32 | Released: 2011-02-20 04:23:48 UTC | |
33 | ||
34 | Add SSLify_GetSSL to get the Net::SSLeay object, thanks mordy@irc! | |
3 | 35 | |
4 | 36 | commit b4269ddff7e04f09a8f304891469fbdc962e740c |
5 | 37 | Author: Apocalypse <perl@0ne.us> |
34 | 34 | "requires" : { |
35 | 35 | "Exporter" : 0, |
36 | 36 | "IO::Handle" : "1.28", |
37 | "Net::SSLeay" : 0, | |
37 | "Net::SSLeay" : "1.36", | |
38 | 38 | "Symbol" : 0, |
39 | "perl" : "5.006", | |
40 | "vars" : 0 | |
39 | "perl" : "5.006" | |
41 | 40 | } |
42 | 41 | }, |
43 | 42 | "test" : { |
55 | 54 | "provides" : { |
56 | 55 | "POE::Component::SSLify" : { |
57 | 56 | "file" : "lib/POE/Component/SSLify.pm", |
58 | "version" : "1.002" | |
57 | "version" : "1.003" | |
59 | 58 | }, |
60 | 59 | "POE::Component::SSLify::ClientHandle" : { |
61 | 60 | "file" : "lib/POE/Component/SSLify/ClientHandle.pm", |
62 | "version" : "1.002" | |
61 | "version" : "1.003" | |
63 | 62 | }, |
64 | 63 | "POE::Component::SSLify::ServerHandle" : { |
65 | 64 | "file" : "lib/POE/Component/SSLify/ServerHandle.pm", |
66 | "version" : "1.002" | |
65 | "version" : "1.003" | |
67 | 66 | } |
68 | 67 | }, |
69 | 68 | "release_status" : "stable", |
82 | 81 | "web" : "http://github.com/apocalypse/perl-poe-sslify" |
83 | 82 | } |
84 | 83 | }, |
85 | "version" : "1.002", | |
84 | "version" : "1.003", | |
86 | 85 | "x_BuiltWith" : { |
87 | 86 | "modules" : { |
88 | 87 | "Exporter" : "5.63", |
97 | 96 | "Socket" : "1.80", |
98 | 97 | "Symbol" : "1.06", |
99 | 98 | "Test::More" : "0.96", |
100 | "perl" : "NA(skipped: perl)", | |
101 | "vars" : "1.01" | |
99 | "perl" : "NA(skipped: perl)" | |
102 | 100 | }, |
103 | 101 | "perl" : { |
104 | 102 | "original" : "v5.10.0", |
117 | 115 | { |
118 | 116 | "class" : "Dist::Zilla::Plugin::Git::NextVersion", |
119 | 117 | "name" : "@Apocalyptic/Git::NextVersion", |
120 | "version" : "1.103470" | |
118 | "version" : "1.110500" | |
121 | 119 | }, |
122 | 120 | { |
123 | 121 | "class" : "Dist::Zilla::Plugin::GatherDir", |
301 | 299 | { |
302 | 300 | "class" : "Dist::Zilla::Plugin::Git::Check", |
303 | 301 | "name" : "@Apocalyptic/Git::Check", |
304 | "version" : "1.103470" | |
302 | "version" : "1.110500" | |
305 | 303 | }, |
306 | 304 | { |
307 | 305 | "class" : "Dist::Zilla::Plugin::ConfirmRelease", |
321 | 319 | { |
322 | 320 | "class" : "Dist::Zilla::Plugin::Git::Commit", |
323 | 321 | "name" : "@Apocalyptic/Git::Commit", |
324 | "version" : "1.103470" | |
322 | "version" : "1.110500" | |
325 | 323 | }, |
326 | 324 | { |
327 | 325 | "class" : "Dist::Zilla::Plugin::Git::Tag", |
328 | 326 | "name" : "@Apocalyptic/Git::Tag", |
329 | "version" : "1.103470" | |
327 | "version" : "1.110500" | |
330 | 328 | }, |
331 | 329 | { |
332 | 330 | "class" : "Dist::Zilla::Plugin::Git::Push", |
333 | 331 | "name" : "@Apocalyptic/Git::Push", |
334 | "version" : "1.103470" | |
332 | "version" : "1.110500" | |
335 | 333 | }, |
336 | 334 | { |
337 | 335 | "class" : "Dist::Zilla::Plugin::FinderCode", |
27 | 27 | provides: |
28 | 28 | POE::Component::SSLify: |
29 | 29 | file: lib/POE/Component/SSLify.pm |
30 | version: 1.002 | |
30 | version: 1.003 | |
31 | 31 | POE::Component::SSLify::ClientHandle: |
32 | 32 | file: lib/POE/Component/SSLify/ClientHandle.pm |
33 | version: 1.002 | |
33 | version: 1.003 | |
34 | 34 | POE::Component::SSLify::ServerHandle: |
35 | 35 | file: lib/POE/Component/SSLify/ServerHandle.pm |
36 | version: 1.002 | |
36 | version: 1.003 | |
37 | 37 | requires: |
38 | 38 | Exporter: 0 |
39 | 39 | IO::Handle: 1.28 |
40 | Net::SSLeay: 0 | |
40 | Net::SSLeay: 1.36 | |
41 | 41 | Symbol: 0 |
42 | 42 | perl: 5.006 |
43 | vars: 0 | |
44 | 43 | resources: |
45 | 44 | bugtracker: http://rt.cpan.org/Public/Dist/Display.html?Name=POE-Component-SSLify |
46 | 45 | homepage: http://search.cpan.org/dist/POE-Component-SSLify/ |
47 | 46 | license: http://dev.perl.org/licenses/ |
48 | 47 | repository: git://github.com/apocalypse/perl-poe-sslify.git |
49 | version: 1.002 | |
48 | version: 1.003 | |
50 | 49 | x_BuiltWith: |
51 | 50 | modules: |
52 | 51 | Exporter: 5.63 |
62 | 61 | Symbol: 1.06 |
63 | 62 | Test::More: 0.96 |
64 | 63 | perl: 'NA(skipped: perl)' |
65 | vars: 1.01 | |
66 | 64 | perl: |
67 | 65 | original: v5.10.0 |
68 | 66 | qv: 1 |
77 | 75 | - |
78 | 76 | class: Dist::Zilla::Plugin::Git::NextVersion |
79 | 77 | name: '@Apocalyptic/Git::NextVersion' |
80 | version: 1.103470 | |
78 | version: 1.110500 | |
81 | 79 | - |
82 | 80 | class: Dist::Zilla::Plugin::GatherDir |
83 | 81 | name: '@Apocalyptic/GatherDir' |
223 | 221 | - |
224 | 222 | class: Dist::Zilla::Plugin::Git::Check |
225 | 223 | name: '@Apocalyptic/Git::Check' |
226 | version: 1.103470 | |
224 | version: 1.110500 | |
227 | 225 | - |
228 | 226 | class: Dist::Zilla::Plugin::ConfirmRelease |
229 | 227 | name: '@Apocalyptic/ConfirmRelease' |
239 | 237 | - |
240 | 238 | class: Dist::Zilla::Plugin::Git::Commit |
241 | 239 | name: '@Apocalyptic/Git::Commit' |
242 | version: 1.103470 | |
240 | version: 1.110500 | |
243 | 241 | - |
244 | 242 | class: Dist::Zilla::Plugin::Git::Tag |
245 | 243 | name: '@Apocalyptic/Git::Tag' |
246 | version: 1.103470 | |
244 | version: 1.110500 | |
247 | 245 | - |
248 | 246 | class: Dist::Zilla::Plugin::Git::Push |
249 | 247 | name: '@Apocalyptic/Git::Push' |
250 | version: 1.103470 | |
248 | version: 1.110500 | |
251 | 249 | - |
252 | 250 | class: Dist::Zilla::Plugin::FinderCode |
253 | 251 | name: ':InstallModules' |
30 | 30 | 'PREREQ_PM' => { |
31 | 31 | 'Exporter' => '0', |
32 | 32 | 'IO::Handle' => '1.28', |
33 | 'Net::SSLeay' => '0', | |
34 | 'Symbol' => '0', | |
35 | 'vars' => '0' | |
33 | 'Net::SSLeay' => '1.36', | |
34 | 'Symbol' => '0' | |
36 | 35 | }, |
37 | 'VERSION' => '1.002', | |
36 | 'VERSION' => '1.003', | |
38 | 37 | 'test' => { |
39 | 38 | 'TESTS' => 't/*.t' |
40 | 39 | } |
1 | 1 | POE::Component::SSLify - Makes using SSL in the world of POE easy! |
2 | 2 | |
3 | 3 | VERSION |
4 | This document describes v1.002 of POE::Component::SSLify - released February 19, 2011 as part of POE-Component-SSLify. | |
4 | This document describes v1.003 of POE::Component::SSLify - released February 28, 2011 as part of POE-Component-SSLify. | |
5 | 5 | |
6 | 6 | SYNOPSIS |
7 | 7 | # CLIENT-side usage |
188 | 188 | Socket methods doesn't work |
189 | 189 | The new socket this module gives you actually is some tied socket magic, |
190 | 190 | so you cannot do stuff like getpeername() or getsockname(). The only way |
191 | to do it is to use SSLify_GetSocket and then operate on the socket it | |
191 | to do it is to use "SSLify_GetSocket" and then operate on the socket it | |
192 | 192 | returns. |
193 | 193 | |
194 | 194 | Dying everywhere... |
209 | 209 | if ( $@ ) { |
210 | 210 | # Unable to SSLify the socket... |
211 | 211 | } |
212 | } | |
213 | ||
214 | $IGNORE_SSL_ERRORS | |
215 | As of SSLify v1.003 you can override this variable to temporarily ignore | |
216 | some SSL errors. This is useful if you are doing crazy things with the | |
217 | underlying Net::SSLeay stuff and don't want to die. However, it won't | |
218 | ignore all errors as some is still considered fatal. Here's an example: | |
219 | ||
220 | { | |
221 | local $POE::Component::SSLify::IGNORE_SSL_ERRORS=1; | |
222 | my $ctx = SSLify_CreateContext(...); | |
223 | #Some more stuff | |
212 | 224 | } |
213 | 225 | |
214 | 226 | OpenSSL functions |
224 | 236 | that you're on a broken system. However, if you have the updated OpenSSL |
225 | 237 | library that fixes this you can use it. |
226 | 238 | |
227 | In-Situ sslification | |
239 | In-Situ sslification | |
228 | 240 | You can have a normal plaintext socket, and convert it to SSL anytime. |
229 | 241 | Just keep in mind that the client and the server must agree to sslify at |
230 | 242 | the same time, or they will be waiting on each other forever! See |
231 | 243 | "t/3_insitu.t" for an example of how this works. |
244 | ||
245 | MSWin32 is not supported | |
246 | This module doesn't work on MSWin32 platforms at all ( XP, Vista, 7, etc | |
247 | ) because of some weird underlying fd issues. Since I'm not a windows | |
248 | developer, I'm unable to fix this. However, it seems like Cygwin on | |
249 | MSWin32 works just fine! Please help me fix this if you can, thanks! | |
232 | 250 | |
233 | 251 | EXPORT |
234 | 252 | Stuffs all of the above functions in @EXPORT_OK so you have to request them directly |
13 | 13 | -----BEGIN PGP SIGNED MESSAGE----- |
14 | 14 | Hash: SHA1 |
15 | 15 | |
16 | SHA1 824ac753cab91f2771cc02d2ef2ea3adcb553b3d Build.PL | |
17 | SHA1 077d1b83cbdd3c5868246267d529f6ba86c9f5ae Changes | |
18 | SHA1 bccfcc0e06e54b64690760210bffb659fc37d8a3 CommitLog | |
16 | SHA1 f7303c3c5c4c01b8a3978878bb9694def4f21c85 Build.PL | |
17 | SHA1 8c6118bc38d4a238e2bcecae98dd9aae02f8e084 Changes | |
18 | SHA1 9579320245a7d68298b8024574c2c4f7f56dca08 CommitLog | |
19 | 19 | SHA1 e3edc44697d1770c65fec99f6ebdb6ea55fb3050 INSTALL |
20 | 20 | SHA1 263360e99a0de4d587fedefe1a919dcf61af1d10 LICENSE |
21 | 21 | SHA1 9b47f2f0b927dcb7cab2cc1f7daa62c5b50c55f8 MANIFEST |
22 | 22 | SHA1 9dfc07c5655b958e800189837f3ddd37ca050bfe MANIFEST.SKIP |
23 | SHA1 46a26e693e358bfaae14207085afe55ba6eaf361 META.json | |
24 | SHA1 c365eb8b83298415d1943bdab6d34d73857572d2 META.yml | |
25 | SHA1 b6349b4bc00f32576a8824dc472b2ccc2090d121 Makefile.PL | |
26 | SHA1 f35f0e1a391125f6e2d8db296430007ab257a6dc README | |
23 | SHA1 48c9ad465a56b101fa1ac5c85999f30d1331887f META.json | |
24 | SHA1 65aafd261f00a99d6b29708e37d61f61669672b6 META.yml | |
25 | SHA1 29dba82edeb60493a1160a55ca1e884384e85031 Makefile.PL | |
26 | SHA1 e9990bb66d60541b446cdb31e1aaec34de041314 README | |
27 | 27 | SHA1 41a5da1356107d097f6bbf72c62ee4da83e4119f dist.ini |
28 | 28 | SHA1 96decb1c51052f9b024b6d069e428b4ccc19e909 examples/client.pl |
29 | 29 | SHA1 d8f9b44df461cdcf6cbd7cffd79a9d49aade3947 examples/server.pl |
30 | 30 | SHA1 c4a936c75d1d566e936dfb1776c9a01ea244c618 examples/serverclient.pl |
31 | SHA1 443d26c5a8beaaa9645707f05103bc05143a1531 lib/POE/Component/SSLify.pm | |
32 | SHA1 b8e2f2b009899b565d7e654318620a69c14c52e0 lib/POE/Component/SSLify/ClientHandle.pm | |
33 | SHA1 963fb5f3d99a99218836cac8c246735ef4ef66b0 lib/POE/Component/SSLify/ServerHandle.pm | |
31 | SHA1 c078b1a678963b8b598da16e962710dff5744cc6 lib/POE/Component/SSLify.pm | |
32 | SHA1 d9b21917a7729440324ba06a73ae033b3e98cf08 lib/POE/Component/SSLify/ClientHandle.pm | |
33 | SHA1 3b6e6a9a9be570576af4b4317410bb4c1276407f lib/POE/Component/SSLify/ServerHandle.pm | |
34 | 34 | SHA1 59afa28f138a14b956443f915d60a891d5b306b8 mylib/example.crt |
35 | 35 | SHA1 f2ba02d28cfb207e0a86be7cb4f3c570f257bf93 mylib/example.key |
36 | 36 | SHA1 fd48b12e3df15fb55695e7d1b4ee95dc3c0cd766 t/00-compile.t |
37 | SHA1 17448d647ba0e9c5c6785b7f8d7757c3e19e1e47 t/000-report-versions-tiny.t | |
37 | SHA1 82a0e48ffb58ff738831c80a41071c607012f483 t/000-report-versions-tiny.t | |
38 | 38 | SHA1 a0fb19347ec360acca7bb08e1b2e437179ef3cfa t/1_simple.t |
39 | 39 | SHA1 c625a70ac63ea5d6a0fabd07130f1d3a905b1933 t/2_renegotiate.t |
40 | 40 | SHA1 034a72d7403a58a756c8cbd2b1ce15afd9acf333 t/3_insitu.t |
41 | 41 | -----BEGIN PGP SIGNATURE----- |
42 | 42 | Version: GnuPG v1.4.9 (GNU/Linux) |
43 | 43 | |
44 | iEYEARECAAYFAk1gl10ACgkQGfr7vsGKgxwytACeNcYDu9CjrhwX+PHHvxsh90tB | |
45 | xlMAn3NNRBe0mWb5DqISPlLucrQBl9+D | |
46 | =Xtye | |
44 | iEYEARECAAYFAk1rxMAACgkQGfr7vsGKgxyM4gCgnEeAD1ZuBBv0wbhPsQ1CZW9f | |
45 | FAUAn2EkEydhhQOwiKB4qH8o4FNv6OJR | |
46 | =aEEu | |
47 | 47 | -----END PGP SIGNATURE----- |
8 | 8 | use strict; use warnings; |
9 | 9 | package POE::Component::SSLify::ClientHandle; |
10 | 10 | BEGIN { |
11 | $POE::Component::SSLify::ClientHandle::VERSION = '1.002'; | |
11 | $POE::Component::SSLify::ClientHandle::VERSION = '1.003'; | |
12 | 12 | } |
13 | 13 | BEGIN { |
14 | 14 | $POE::Component::SSLify::ClientHandle::AUTHORITY = 'cpan:APOCAL'; |
17 | 17 | # ABSTRACT: Client-side handle for SSLify |
18 | 18 | |
19 | 19 | # Import the SSL death routines |
20 | use Net::SSLeay qw( die_now die_if_ssl_error ); | |
20 | use Net::SSLeay 1.36 qw( die_now die_if_ssl_error ); | |
21 | 21 | |
22 | 22 | # We inherit from ServerHandle |
23 | use vars qw( @ISA ); | |
24 | 23 | require POE::Component::SSLify::ServerHandle; |
25 | @ISA = qw( POE::Component::SSLify::ServerHandle ); | |
24 | our @ISA = qw( POE::Component::SSLify::ServerHandle ); | |
26 | 25 | |
27 | 26 | # Override TIEHANDLE because we create a CTX |
28 | 27 | sub TIEHANDLE { |
68 | 67 | |
69 | 68 | =head1 VERSION |
70 | 69 | |
71 | This document describes v1.002 of POE::Component::SSLify::ClientHandle - released February 19, 2011 as part of POE-Component-SSLify. | |
70 | This document describes v1.003 of POE::Component::SSLify::ClientHandle - released February 28, 2011 as part of POE-Component-SSLify. | |
72 | 71 | |
73 | 72 | =head1 DESCRIPTION |
74 | 73 |
8 | 8 | use strict; use warnings; |
9 | 9 | package POE::Component::SSLify::ServerHandle; |
10 | 10 | BEGIN { |
11 | $POE::Component::SSLify::ServerHandle::VERSION = '1.002'; | |
11 | $POE::Component::SSLify::ServerHandle::VERSION = '1.003'; | |
12 | 12 | } |
13 | 13 | BEGIN { |
14 | 14 | $POE::Component::SSLify::ServerHandle::AUTHORITY = 'cpan:APOCAL'; |
17 | 17 | # ABSTRACT: Server-side handle for SSLify |
18 | 18 | |
19 | 19 | # Import the SSL death routines |
20 | use Net::SSLeay qw( die_now die_if_ssl_error ); | |
20 | use Net::SSLeay 1.36 qw( die_now die_if_ssl_error ); | |
21 | 21 | |
22 | 22 | # Ties the socket |
23 | 23 | sub TIEHANDLE { |
180 | 180 | |
181 | 181 | =head1 VERSION |
182 | 182 | |
183 | This document describes v1.002 of POE::Component::SSLify::ServerHandle - released February 19, 2011 as part of POE-Component-SSLify. | |
183 | This document describes v1.003 of POE::Component::SSLify::ServerHandle - released February 28, 2011 as part of POE-Component-SSLify. | |
184 | 184 | |
185 | 185 | =head1 DESCRIPTION |
186 | 186 |
8 | 8 | use strict; use warnings; |
9 | 9 | package POE::Component::SSLify; |
10 | 10 | BEGIN { |
11 | $POE::Component::SSLify::VERSION = '1.002'; | |
11 | $POE::Component::SSLify::VERSION = '1.003'; | |
12 | 12 | } |
13 | 13 | BEGIN { |
14 | 14 | $POE::Component::SSLify::AUTHORITY = 'cpan:APOCAL'; |
43 | 43 | |
44 | 44 | # Do the exporting magic... |
45 | 45 | require Exporter; |
46 | use vars qw( @ISA @EXPORT_OK ); | |
47 | @ISA = qw( Exporter ); | |
48 | @EXPORT_OK = qw( Client_SSLify Server_SSLify SSLify_Options SSLify_GetCTX SSLify_GetCipher SSLify_GetSocket SSLify_GetSSL SSLify_ContextCreate ); | |
46 | our @ISA = qw( Exporter ); | |
47 | our @EXPORT_OK = qw( Client_SSLify Server_SSLify SSLify_Options SSLify_GetCTX SSLify_GetCipher SSLify_GetSocket SSLify_GetSSL SSLify_ContextCreate ); | |
49 | 48 | |
50 | 49 | # Bring in some socket-related stuff |
51 | 50 | use Symbol qw( gensym ); |
56 | 55 | |
57 | 56 | # The server-side CTX stuff |
58 | 57 | my $ctx = undef; |
58 | ||
59 | # global so users of this module can override it locally | |
60 | our $IGNORE_SSL_ERRORS = 0; | |
59 | 61 | |
60 | 62 | |
61 | 63 | sub Client_SSLify { |
171 | 173 | |
172 | 174 | # do we need to set options? |
173 | 175 | if ( defined $options ) { |
174 | Net::SSLeay::CTX_set_options( $context, $options ) and die_if_ssl_error( 'ssl ctx set options' ); | |
176 | Net::SSLeay::CTX_set_options( $context, $options ); | |
177 | die_if_ssl_error( 'ssl ctx set options' ) if ! $IGNORE_SSL_ERRORS; | |
175 | 178 | } |
176 | 179 | |
177 | 180 | # do we need to set key/etc? |
178 | 181 | if ( defined $key ) { |
179 | 182 | # Following will ask password unless private key is not encrypted |
180 | 183 | Net::SSLeay::CTX_use_RSAPrivateKey_file( $context, $key, &Net::SSLeay::FILETYPE_PEM ); |
181 | die_if_ssl_error( 'private key' ); | |
184 | die_if_ssl_error( 'private key' ) if ! $IGNORE_SSL_ERRORS; | |
182 | 185 | } |
183 | 186 | |
184 | 187 | # Set the cert file |
185 | 188 | if ( defined $cert ) { |
186 | 189 | Net::SSLeay::CTX_use_certificate_file( $context, $cert, &Net::SSLeay::FILETYPE_PEM ); |
187 | die_if_ssl_error( 'certificate' ); | |
190 | die_if_ssl_error( 'certificate' ) if ! $IGNORE_SSL_ERRORS; | |
188 | 191 | } |
189 | 192 | |
190 | 193 | # All done! |
231 | 234 | |
232 | 235 | =head1 VERSION |
233 | 236 | |
234 | This document describes v1.002 of POE::Component::SSLify - released February 19, 2011 as part of POE-Component-SSLify. | |
237 | This document describes v1.003 of POE::Component::SSLify - released February 28, 2011 as part of POE-Component-SSLify. | |
235 | 238 | |
236 | 239 | =head1 SYNOPSIS |
237 | 240 | |
430 | 433 | =head2 Socket methods doesn't work |
431 | 434 | |
432 | 435 | The new socket this module gives you actually is some tied socket magic, so you cannot do stuff like |
433 | getpeername() or getsockname(). The only way to do it is to use SSLify_GetSocket and then operate on | |
436 | getpeername() or getsockname(). The only way to do it is to use L</SSLify_GetSocket> and then operate on | |
434 | 437 | the socket it returns. |
435 | 438 | |
436 | 439 | =head2 Dying everywhere... |
453 | 456 | } |
454 | 457 | } |
455 | 458 | |
459 | =head3 $IGNORE_SSL_ERRORS | |
460 | ||
461 | As of SSLify v1.003 you can override this variable to temporarily ignore some SSL errors. This is useful if you are doing crazy things | |
462 | with the underlying Net::SSLeay stuff and don't want to die. However, it won't ignore all errors as some is still considered fatal. | |
463 | Here's an example: | |
464 | ||
465 | { | |
466 | local $POE::Component::SSLify::IGNORE_SSL_ERRORS=1; | |
467 | my $ctx = SSLify_CreateContext(...); | |
468 | #Some more stuff | |
469 | } | |
470 | ||
456 | 471 | =head2 OpenSSL functions |
457 | 472 | |
458 | 473 | Theoretically you can do anything that Net::SSLeay exports from the OpenSSL libs on the socket. However, I have not tested every |
464 | 479 | L<http://security.freebsd.org/advisories/FreeBSD-SA-09:15.ssl.asc> which explains it in detail. The test will skip this function |
465 | 480 | if it detects that you're on a broken system. However, if you have the updated OpenSSL library that fixes this you can use it. |
466 | 481 | |
467 | =head3 In-Situ sslification | |
482 | =head2 In-Situ sslification | |
468 | 483 | |
469 | 484 | You can have a normal plaintext socket, and convert it to SSL anytime. Just keep in mind that the client and the server must agree to sslify |
470 | 485 | at the same time, or they will be waiting on each other forever! See C<t/3_insitu.t> for an example of how this works. |
486 | ||
487 | =head2 MSWin32 is not supported | |
488 | ||
489 | This module doesn't work on MSWin32 platforms at all ( XP, Vista, 7, etc ) because of some weird underlying fd issues. Since I'm not a windows | |
490 | developer, I'm unable to fix this. However, it seems like Cygwin on MSWin32 works just fine! Please help me fix this if you can, thanks! | |
471 | 491 | |
472 | 492 | =head1 EXPORT |
473 | 493 |
52 | 52 | eval { $v .= pmver('File::Temp','any version') }; |
53 | 53 | eval { $v .= pmver('IO::Handle','1.28') }; |
54 | 54 | eval { $v .= pmver('Module::Build','0.3601') }; |
55 | eval { $v .= pmver('Net::SSLeay','any version') }; | |
55 | eval { $v .= pmver('Net::SSLeay','1.36') }; | |
56 | 56 | eval { $v .= pmver('POE','1.267') }; |
57 | 57 | eval { $v .= pmver('POE::Component::Client::TCP','any version') }; |
58 | 58 | eval { $v .= pmver('POE::Component::Server::TCP','any version') }; |
59 | 59 | eval { $v .= pmver('Socket','any version') }; |
60 | 60 | eval { $v .= pmver('Symbol','any version') }; |
61 | 61 | eval { $v .= pmver('Test::More','0.88') }; |
62 | eval { $v .= pmver('vars','any version') }; | |
63 | 62 | |
64 | 63 | |
65 | 64 |