diff -Nru libpoe-component-sslify-perl-1.008/AUTHOR_PLEDGE libpoe-component-sslify-perl-1.012/AUTHOR_PLEDGE --- libpoe-component-sslify-perl-1.008/AUTHOR_PLEDGE 1970-01-01 00:00:00.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/AUTHOR_PLEDGE 2014-11-14 20:20:01.000000000 +0000 @@ -0,0 +1,13 @@ + +# CPAN Covenant for POE-Component-SSLify + +I, Apocalypse , hereby give modules@perl.org permission to grant co-maintainership +to POE-Component-SSLify, if all the following conditions are met: + + (1) I haven't released the module for a year or more + (2) There are outstanding issues in the module's public bug tracker + (3) Email to my CPAN email address hasn't been answered after a month + (4) The requester wants to make worthwhile changes that will benefit CPAN + +In the event of my death, then the time-limits in (1) and (3) do not apply. + diff -Nru libpoe-component-sslify-perl-1.008/Build.PL libpoe-component-sslify-perl-1.012/Build.PL --- libpoe-component-sslify-perl-1.008/Build.PL 2011-05-04 21:55:38.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/Build.PL 2014-11-14 20:20:01.000000000 +0000 @@ -1,49 +1,16 @@ - +# +# This file is part of POE-Component-SSLify +# +# This software is copyright (c) 2014 by Apocalypse. +# +# This is free software; you can redistribute it and/or modify it under +# the same terms as the Perl 5 programming language system itself. +# +use strict; use warnings; +# This Build.PL for POE-Component-SSLify was generated by Dist::Zilla::Plugin::ModuleBuildTiny 0.008. use strict; use warnings; -use Module::Build 0.3601; - - -my %module_build_args = ( - 'build_requires' => { - 'File::Find' => '0', - 'File::Temp' => '0', - 'Module::Build' => '0.3601', - 'POE' => '1.267', - 'POE::Component::Client::TCP' => '0', - 'POE::Component::Server::TCP' => '0', - 'Socket' => '0', - 'Test::More' => '0.88' - }, - 'configure_requires' => { - 'Module::Build' => '0.3601' - }, - 'dist_abstract' => 'Makes using SSL in the world of POE easy!', - 'dist_author' => [ - 'Apocalypse ' - ], - 'dist_name' => 'POE-Component-SSLify', - 'dist_version' => '1.008', - 'license' => 'perl', - 'module_name' => 'POE::Component::SSLify', - 'recommends' => {}, - 'recursive_test_files' => 1, - 'requires' => { - 'Exporter' => '0', - 'IO::Handle' => '1.28', - 'Net::SSLeay' => '1.36', - 'POE' => '0', - 'Scalar::Util' => '0', - 'Symbol' => '0', - 'Task::Weaken' => '1.03', - 'parent' => '0', - 'perl' => '5.006' - }, - 'script_files' => [] -); - - -my $build = Module::Build->new(%module_build_args); - -$build->create_build_script; +use 5.006; +use Module::Build::Tiny 0.039; +Build_PL(); diff -Nru libpoe-component-sslify-perl-1.008/Changes libpoe-component-sslify-perl-1.012/Changes --- libpoe-component-sslify-perl-1.008/Changes 2011-05-04 21:55:38.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/Changes 2014-11-14 20:20:01.000000000 +0000 @@ -1,179 +1,194 @@ -Revision history for Perl extension POE::Component::SSLify. +Revision history for POE-Component-SSLify -1.008 - Released: 2011-05-04 21:55:27 UTC +1.012 2014-11-14T20:19:52Z UTC + - Reduce memory usage and speedup writing large strings by avoiding substr + magic + + [STATISTICS] + - code churn: 2 files changed, 6 insertions(+), 3 deletions(-) + +1.011 2014-11-14T03:06:48Z UTC + - Tweak the testsuite thanks to CPANTesters! + + [STATISTICS] + - code churn: 11 files changed, 37 insertions(+), 35 deletions(-) + +1.010 2014-11-12T06:13:41Z UTC + - add informational test that prints out ssleay version + - clamp the writes to 16K internally to get around write errors reported + by RT#95071 and RT#58243, thanks! + + [STATISTICS] + - code churn: 7 files changed, 591 insertions(+), 5 deletions(-) + +1.009 2014-11-12T00:41:25Z UTC + - Updates to the auto-generated files + - Tweaked the testsuite to use done_testing() for sanity, RT#66741 (thanks + RCAPUTO!) + - Use Test::FailWarnings in the testsuite in place of Test::NoWarnings + (DAGOLDEN++) + - Add t/simple_large.t to try and track down RT#58243 (thanks Johan!) + - Added a boatload of tests to try and track down RT#95071 (thanks Joe!) + + [STATISTICS] + - code churn: 27 files changed, 2160 insertions(+), 1503 deletions(-) + +1.008 2011-05-04T21:55:27Z UTC + - Bazerka@irc noticed that POE wasn't even listed as a runtime prereq, + d0h! + +1.007 2011-05-04T21:36:32Z UTC + - Revert the ENGINE load logic added in 1.004 because it was causing + coredumps on netbsd ( thanks BINGOS! ) + - Add the constant LOAD_SSL_ENGINES sub if you need to load the ssl + engines + - Tweak the renegotiate tests to be more tolerant of failures, thanks + RCAPUTO - RT#66741 + +1.006 2011-04-22T00:21:51Z UTC + - Fix a heinous bug where openssl will randomly+reliably close a + connection ( thanks MIRE ) + - Tweak the hook tests so they test the case where no data is sent over + the connection + - Tweak the connfail tests so they work better + +1.005 2011-03-10T07:55:30Z UTC + - Fix the connfail tests due to an incorrect assumption regards socket + close value, thanks CPANTesters! + +1.004 2011-03-08T23:39:03Z UTC + - We now load certificate files via CTX_use_certificate_chain_file(), + thanks Zephaniah E. Loss-Cutler-Hull + OpenSSL docs suggest it - + http://www.openssl.org/docs/ssl/SSL_CTX_use_certificate.html#NOTES + PLEASE yell at me if you need the old functionality - the docs suggest + this is the "better" way to do it... + - Add the ability to pass a subref to call on connection/negotiation + success, thanks Zephaniah E. Loss-Cutler-Hull + NOTE: This will not work if you do + renegotiation or any other zany SSL stuff! + - Add the SSLify_GetStatus function to get the status of the connection + - After staring at the Net::SSLeay/OpenSSL docs for a while I realized we + were missing support for sslv23 version, added! + - After some investigation, we now load all default ENGINEs for OpenSSL on + startup, as it might provide a performance boost + +1.003 2011-02-28T15:52:24Z UTC + - Add $IGNORE_SSL_ERRORS to ignore certain SSL errors, thanks MNUNBERG - + RT#66130 + - Remove prereq on vars.pm as it's obsolete + +1.002 2011-02-20T04:23:48Z UTC + - Add SSLify_GetSSL to get the Net::SSLeay object, thanks MNUNBERG! + +1.001 2011-02-13T18:11:07Z UTC + - Fixed the Net::SSLeay import code, thanks CPANTesters! + +1.000 2011-02-13T00:06:14Z UTC + - Converted to Dist::Zilla for the release process! + - Add a test for in-situ sslification, thanks MNUNBERG! + - Add prereq for IO::Handle 1.28 to get sane $socket->blocking( 0 ) + behavior on MSWin32 + - Remove crufty old code for nonblocking and use $socket->blocking() + instead + +0.20 0000-00-00T00:00:00Z UTC + - Split up the simple.t test into 2 tests for clarity, and added more diag + messages for renegotiate, thanks HMBRAND! + +0.19 0000-00-00T00:00:00Z UTC + - Fixed a warning generated by POE::Component::Client::TCP in t/simple.t, + thanks HMBRAND! + +0.18 0000-00-00T00:00:00Z UTC + - Bumped POE dep to at least 1.267 for t/simple.t - thanks CPANTesters! + - Minor typo fixes in POD/Build.PL + +0.17 0000-00-00T00:00:00Z UTC + - Fixed the t/simple.t test to PASS on FreeBSD because + Net::SSLeay::renegotiate was buggy on it, thanks CPANTesters! + - Added note about OpenSSL functions in the POD. + +0.16 0000-00-00T00:00:00Z UTC + - Updated the nonblocking code to be production-ready, thanks ASCENT! + - Removed the NONBLOCKING() sub, this module is now always nonblocking. + - Added more tests, thanks ASCENT! + - Added "mylib/example.crt" and "mylib/example.key" for testing, thanks + ASCENT! + - Misc kwalitee and POD fixes. + - Bumped Net::SSLeay prereq to 1.36 so we have the latest SSL stuff to + ensure sanity :) + +0.15 0000-00-00T00:00:00Z UTC + - Added "examples/serverclient.pl" to track down same-process sslification + problems, thanks LotR! + - Applied patch from BinGOs to support passing custom $ctx for + Server_SSLify, thanks! RT#43018 + - Switched over to Test::Apocalypse for easy author tests + - Added experimental NONBLOCKING code, thanks ASCENT for the motivation! + +0.14 0000-00-00T00:00:00Z UTC + - removed Test::* modules from dependency list, thanks BINGOS - RT #36725 + - dos2unix fixes - thanks RT #36704 + - added Build.PL + +0.13 0000-00-00T00:00:00Z UTC + - POD typo errors in SSLify_ContextCreate - thanks ASCENT! + +0.12 0000-00-00T00:00:00Z UTC + - Kwalitee-related fixes + +0.11 0000-00-00T00:00:00Z UTC + - allowed setting of client-side context ( $ctx ) object - thanks RT + #34442 + - squashed typo in pod - thanks ASCENT! + - changed version check code to regexp for compatibility with SSLeay + v1.33_01 - thanks Mark! + - added SSLify_ContextCreate helper function + - backported Net::SSLeay's removal of %Filenum_Objects hash + +0.10 0000-00-00T00:00:00Z UTC + - More tweaks of POD - finally close RT #31238 + - Added SSL version support - thanks RT #31492 + - Added SSL CTX option support as a side effect + - Added client.pl example with ReadLine support + +0.09 0000-00-00T00:00:00Z UTC + - Minor tweak of POD to enable better distro building - thanks RT #31238 + +0.08 0000-00-00T00:00:00Z UTC + - Added support for BINMODE - thanks RT #27117 + +0.07 0000-00-00T00:00:00Z UTC + - Fixed undefined $info - thanks RT #22372 + +0.06 0000-00-00T00:00:00Z UTC + - Kwalitee-related fixes + +0.05 0000-00-00T00:00:00Z UTC + - Finally use a Changes file - thanks RT #18981 + - Documentation tweaks + - Upgraded Net::SSLeay requirement to 1.30 to help Win32 problems + +0.04 0000-00-00T00:00:00Z UTC + - Added new functions to extract data from the SSL socket -> GetCipher and + GetSocket + - In the case somebody knows Net::SSLeay more than me, added GetCTX to + return the server-side CTX object + - Removed the dependency on Net::SSLeay::Handle + +0.03 0000-00-00T00:00:00Z UTC + - First stab at the server-side code, help me test it out! + - Refactored SSLify() into client/server side, so update your program + accordingly! + +0.02 0000-00-00T00:00:00Z UTC + - Made sure the IO::Handle way was used only on MSWin32 + - SSLify::ServerHandle + - Removed _CIPHER and moved it to the main SSLify.pm code + - Oops, forgot to override _get_self and _get_ssl + - Fixed a nasty leak issue - Bazerka@irc noticed that POE wasn't even listed as a runtime prereq, d0h! +0.01 0000-00-00T00:00:00Z UTC + - Initial release -1.007 - Released: 2011-05-04 21:36:32 UTC - - Revert the ENGINE load logic added in 1.004 because it was causing coredumps on netbsd ( thanks BINGOS! ) - Add the constant LOAD_SSL_ENGINES sub if you need to load the ssl engines - Tweak the renegotiate tests to be more tolerant of failures, thanks RCAPUTO - RT#66741 - -1.006 - Released: 2011-04-22 00:21:51 UTC - - Fix a heinous bug where openssl will randomly+reliably close a connection ( thanks MIRE ) - Tweak the hook tests so they test the case where no data is sent over the connection - Tweak the connfail tests so they work better - -1.005 - Released: 2011-03-10 07:55:30 UTC - - Fix the connfail tests due to an incorrect assumption regards socket close value, thanks CPANTesters! - -1.004 - Released: 2011-03-08 23:39:03 UTC - - We now load certificate files via CTX_use_certificate_chain_file(), thanks Zephaniah E. Loss-Cutler-Hull - OpenSSL docs suggest it - http://www.openssl.org/docs/ssl/SSL_CTX_use_certificate.html#NOTES - PLEASE yell at me if you need the old functionality - the docs suggest this is the "better" way to do it... - Add the ability to pass a subref to call on connection/negotiation success, thanks Zephaniah E. Loss-Cutler-Hull - NOTE: This will not work if you do renegotiation or any other zany SSL stuff! - Add the SSLify_GetStatus function to get the status of the connection - After staring at the Net::SSLeay/OpenSSL docs for a while I realized we were missing support for sslv23 version, added! - After some investigation, we now load all default ENGINEs for OpenSSL on startup, as it might provide a performance boost - -1.003 - Released: 2011-02-28 15:52:24 UTC - - Add $IGNORE_SSL_ERRORS to ignore certain SSL errors, thanks MNUNBERG - RT#66130 - Remove prereq on vars.pm as it's obsolete - -1.002 - Released: 2011-02-20 04:23:48 UTC - - Add SSLify_GetSSL to get the Net::SSLeay object, thanks MNUNBERG! - -1.001 - Released: 2011-02-13 18:11:07 UTC - - Fixed the Net::SSLeay import code, thanks CPANTesters! - -1.000 - Released: 2011-02-13 00:06:14 UTC - - Converted to Dist::Zilla for the release process! - Add a test for in-situ sslification, thanks MNUNBERG! - Add prereq for IO::Handle 1.28 to get sane $socket->blocking( 0 ) behavior on MSWin32 - Remove crufty old code for nonblocking and use $socket->blocking() instead - -0.20 - - Split up the simple.t test into 2 tests for clarity, and added more diag messages for renegotiate, thanks HMBRAND! - -0.19 - - Fixed a warning generated by POE::Component::Client::TCP in t/simple.t, thanks HMBRAND! - -0.18 - - Bumped POE dep to at least 1.267 for t/simple.t - thanks CPANTesters! - Minor typo fixes in POD/Build.PL - -0.17 - - Fixed the t/simple.t test to PASS on FreeBSD because Net::SSLeay::renegotiate was buggy on it, thanks CPANTesters! - Added note about OpenSSL functions in the POD. - -0.16 - - Updated the nonblocking code to be production-ready, thanks ASCENT! - Removed the NONBLOCKING() sub, this module is now always nonblocking. - Added more tests, thanks ASCENT! - Added "mylib/example.crt" and "mylib/example.key" for testing, thanks ASCENT! - Misc kwalitee and POD fixes. - Bumped Net::SSLeay prereq to 1.36 so we have the latest SSL stuff to ensure sanity :) - -0.15 - - Added "examples/serverclient.pl" to track down same-process sslification problems, thanks LotR! - - Applied patch from BinGOs to support passing custom $ctx for Server_SSLify, thanks! RT#43018 - - Switched over to Test::Apocalypse for easy author tests - - Added experimental NONBLOCKING code, thanks ASCENT for the motivation! - -0.14 - - removed Test::* modules from dependency list, thanks BINGOS - RT #36725 - - dos2unix fixes - thanks RT #36704 - - added Build.PL - -0.13 - - POD typo errors in SSLify_ContextCreate - thanks ASCENT! - -0.12 - - Kwalitee-related fixes - -0.11 - - allowed setting of client-side context ( $ctx ) object - thanks RT #34442 - - squashed typo in pod - thanks ASCENT! - - changed version check code to regexp for compatibility with SSLeay v1.33_01 - thanks Mark! - - added SSLify_ContextCreate helper function - - backported Net::SSLeay's removal of %Filenum_Objects hash - -0.10 - - More tweaks of POD - finally close RT #31238 - Added SSL version support - thanks RT #31492 - Added SSL CTX option support as a side effect - Added client.pl example with ReadLine support - -0.09 - - Minor tweak of POD to enable better distro building - thanks RT #31238 - -0.08 - - Added support for BINMODE - thanks RT #27117 - -0.07 - - Fixed undefined $info - thanks RT #22372 - -0.06 - - Kwalitee-related fixes - -0.05 - - Finally use a Changes file - thanks RT #18981 - Documentation tweaks - Upgraded Net::SSLeay requirement to 1.30 to help Win32 problems - -0.04 - - Added new functions to extract data from the SSL socket -> GetCipher and GetSocket - In the case somebody knows Net::SSLeay more than me, added GetCTX to return the server-side CTX object - Removed the dependency on Net::SSLeay::Handle - -0.03 - - First stab at the server-side code, help me test it out! - Refactored SSLify() into client/server side, so update your program accordingly! - -0.02 - - Made sure the IO::Handle way was used only on MSWin32 - - * SSLify::ServerHandle - Removed _CIPHER and moved it to the main SSLify.pm code - Oops, forgot to override _get_self and _get_ssl - Fixed a nasty leak issue - -0.01 - - Initial release diff -Nru libpoe-component-sslify-perl-1.008/CommitLog libpoe-component-sslify-perl-1.012/CommitLog --- libpoe-component-sslify-perl-1.008/CommitLog 2011-05-04 21:55:38.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/CommitLog 2014-11-14 20:20:01.000000000 +0000 @@ -1,343 +1,199 @@ -============================== -9999-99-99 99:99:99 +0000 HEAD -============================== - - commit 4fa0a44b7f0a9b37ef5fcbcb07ad6e45dd50b265 - Author: Apocalypse - Date: Wed May 4 14:53:14 2011 -0700 - - actually require POE as a runtime prereq, thanks Bazerka@irc - -======================================= -2011-05-04 14:37:11 -0700 release-1.007 -======================================= - - commit 5ada288a8ab2b24c6472e5a8fb3f43958fa22445 - Author: Apocalypse - Date: Wed May 4 14:37:11 2011 -0700 - - New CPAN release of POE-Component-SSLify - v1.007 - - Released: 2011-05-04 21:36:32 UTC - - Revert the ENGINE load logic added in 1.004 because it was causing - coredumps on netbsd ( thanks BINGOS! ) - - Add the constant LOAD_SSL_ENGINES sub if you need to load the ssl - engines - - Tweak the renegotiate tests to be more tolerant of failures, thanks - RCAPUTO - RT#66741 - - commit 958b153b6d09773230336793b1a3f2f2848a55dc - Author: Apocalypse - Date: Wed May 4 14:34:15 2011 -0700 - - rename some POD for pod::coverage tests - - commit 125745d00aa051e13a18ac207a618c50913bbd57 - Author: Apocalypse - Date: Wed May 4 14:21:22 2011 -0700 - - rewrite the renegotiate tests in hope of fixing RT#66741 - - commit 393337624aef50602f4f2e9ff4ec412e1cbe7d76 - Author: Apocalypse - Date: Wed May 4 14:02:59 2011 -0700 - - fix netbsd coredumps by not loading ENGINEs, reported by BINGOS - -======================================= -2011-04-21 17:22:30 -0700 release-1.006 -======================================= - - commit 0096f51336380c31d99e87cf93a63ed650e60aff - Author: Apocalypse - Date: Thu Apr 21 17:22:30 2011 -0700 - - New CPAN release of POE-Component-SSLify - v1.006 - - Released: 2011-04-22 00:21:51 UTC - - Fix a heinous bug where openssl will randomly+reliably close a - connection ( thanks MIRE ) - - Tweak the hook tests so they test the case where no data is sent over - the connection - - Tweak the connfail tests so they work better - - commit df65edee2621f55f347db2c70d779e44d93b87d2 - Author: Apocalypse - Date: Thu Apr 21 17:16:15 2011 -0700 - - mire@irc is now MIRE, congrats - - commit 853522b575570c997d3c8ff70c530cd45cde1e40 - Author: Apocalypse - Date: Thu Apr 21 14:54:08 2011 -0700 - - tweak mires test a bit - - commit e745765e01f9c07e0b195b2c49be40bea2e916f4 - Author: Apocalypse - Date: Thu Apr 21 08:28:42 2011 -0700 - - start of work on mire's testcase - - commit 15e3d473b68e6e0ac36673bbc71b7125fd49ed2f - Author: Apocalypse - Date: Thu Apr 21 00:03:23 2011 -0700 - - add mire test to be worked into a proper AUTHOR test - - commit ad5c8c95dce50c051d8c54ade4c90b45f49103c3 - Author: Apocalypse - Date: Wed Apr 20 20:44:15 2011 -0700 - - update changelog for the fixes - - commit ed9e2b33c10572df76e790ffad68d3d7ecb820f9 - Author: Apocalypse - Date: Wed Apr 20 20:11:17 2011 -0700 - - fix random SSL failures, spotted by mire - - commit 5a9b28e587a3dace6ed71bd93691215b47cbc348 - Author: Apocalypse - Date: Wed Apr 20 20:09:00 2011 -0700 - - tweak the connfail tests and make the server test work - - commit 806d4c4df5ca108c8cfacbb19babcfebc8b05cdc - Author: Apocalypse - Date: Wed Apr 20 20:08:18 2011 -0700 - - tweak the hook tests to cover the case where there is no data sent - over the wire - -======================================= -2011-03-10 00:56:13 -0700 release-1.005 -======================================= - - commit bc1a271e1f6e597f42cf03723ef6525a21281bea - Author: Apocalypse - Date: Thu Mar 10 00:56:13 2011 -0700 - - New CPAN release of POE-Component-SSLify - v1.005 - - Released: 2011-03-10 07:55:30 UTC - - Fix the connfail tests due to an incorrect assumption regards socket - close value, thanks CPANTesters! - - commit d8b4c0e354acf683f17fd63186810226e101b54e - Author: Apocalypse - Date: Thu Mar 10 00:54:05 2011 -0700 - - fix an incorrect assumption in the connfail tests, thanks CPANTesters - -======================================= -2011-03-08 16:43:43 -0700 release-1.004 -======================================= - - commit 073ae0a4eb74e7c7bd24db3717653ee5764db6bb - Author: Apocalypse - Date: Tue Mar 8 16:43:43 2011 -0700 - - New CPAN release of POE-Component-SSLify - v1.004 - - Released: 2011-03-08 23:39:03 UTC - - We now load certificate files via CTX_use_certificate_chain_file(), - thanks Zephaniah E. Loss-Cutler-Hull - - OpenSSL docs suggest it - - http://www.openssl.org/docs/ssl/SSL_CTX_use_certificate.html#NOTES - - PLEASE yell at me if you need the old functionality - the docs - suggest this is the "better" way to do it... - - Add the ability to pass a subref to call on connection/negotiation - success, thanks Zephaniah E. Loss-Cutler-Hull - - - NOTE: This will not work if you do renegotiation or any other zany - SSL stuff! - - Add the SSLify_GetStatus function to get the status of the connection - - After staring at the Net::SSLeay/OpenSSL docs for a while I realized - we were missing support for sslv23 version, added! - - After some investigation, we now load all default ENGINEs for OpenSSL - on startup, as it might provide a performance boost - - commit f9f664939980fdd646c3331815c7c9935e9ee248 - Author: Apocalypse - Date: Tue Mar 8 16:29:27 2011 -0700 - - yet more POD tweaks - - commit 79116f5515997c0353659c5611d943f73e6a3d58 - Author: Apocalypse - Date: Tue Mar 8 16:23:19 2011 -0700 - - add more POD about callback and make the status a boolean value - - commit fb1c1a1c135a20fea4f749548d6d34cab1735ff9 - Author: Apocalypse - Date: Tue Mar 8 14:43:41 2011 -0700 - - fix some nits reported by PerlCritic - - commit 602dac644a11b2331217895056e034d9226310b4 - Author: Apocalypse - Date: Tue Mar 8 13:27:32 2011 -0700 - - tweak testsuite - - commit 7ad6bbbc8e1d95f5dd4fbdb4df957e32eb31519c - Author: Apocalypse - Date: Tue Mar 8 12:45:28 2011 -0700 - - more doc tweaks - - commit 5079fc8f5c3e4a9275f5fab7a80a10910800f3e1 - Author: Apocalypse - Date: Tue Mar 8 12:33:10 2011 -0700 - - add more connect fail tests - - commit 9700e8dd8f22d73bfeca5b2e603ad3eb85cb310c - Author: Apocalypse - Date: Tue Mar 8 12:32:56 2011 -0700 - - massive doc revamp - - commit 13dde50f6a039812fb8b335c0318ccf467b2331e - Author: Apocalypse - Date: Tue Mar 8 00:23:22 2011 -0700 - - add connfail test - - commit d96b80b1a4c1876d82e217677d0cdf33b1f68160 - Author: Apocalypse - Date: Mon Mar 7 17:14:38 2011 -0700 - - add note about renegotiation and connection function - - commit 4df07a720ee9ad46fc39bb4fd39ad46db3c6a710 - Author: Apocalypse - Date: Mon Mar 7 16:56:44 2011 -0700 - - add testcase for connref hooks - - commit def0826f81ef2825c9be2c3a9aa2e0a3588c5489 - Author: Apocalypse - Date: Mon Mar 7 16:55:24 2011 -0700 - - add GetStatus and finalize connref stuff - - commit f5b8e4ae8016715cf5d9385d5771dac8dbe59abd - Author: Apocalypse - Date: Mon Mar 7 16:13:03 2011 -0700 - - more fixes and add hook testcase - - commit 3e003c92bc922091587960de5a02c5bdfec36c8c - Author: Apocalypse - Date: Mon Mar 7 16:04:00 2011 -0700 - - add actual hook functionality for connection done - - commit 95ea76ec6e5a93cc8ff8b99df5a9b1558db27984 - Author: Apocalypse - Date: Mon Mar 7 15:31:27 2011 -0700 - - initial commit for hook work - - commit d7914f5f0a6d9cd3065c23ab70f91d9912eba084 - Author: Apocalypse - Date: Mon Mar 7 14:58:09 2011 -0700 - - use CTX_use_certificate_chain_file - -======================================= -2011-02-28 08:52:48 -0700 release-1.003 -======================================= - - commit dba0e05d424aeeb766bf887c1e731593777a6b5b - Author: Apocalypse - Date: Mon Feb 28 08:52:48 2011 -0700 - - New CPAN release of POE-Component-SSLify - v1.003 - - Released: 2011-02-28 15:52:24 UTC - - Add $IGNORE_SSL_ERRORS to ignore certain SSL errors, thanks MNUNBERG - - RT#66130 - - Remove prereq on vars.pm as it's obsolete - - commit 367645dabcbc3ca12aae0c32d7a2e8847274865e - Author: Apocalypse - Date: Mon Feb 28 08:51:38 2011 -0700 - - add note about MSWin32 - - commit 8dfc5acbbad45910fc93a6688661fb5c46cffd59 - Author: Apocalypse - Date: Mon Feb 28 08:46:09 2011 -0700 - - add IGNORE_SSL_ERRORS, thanks MNUNBERG - - commit cf26ebeb385b4a44dd20a1fa877905e3b948fd74 - Author: Apocalypse - Date: Mon Feb 21 00:01:02 2011 -0700 - - add explicit Net::SSLeay version req - -======================================= -2011-02-19 21:24:02 -0700 release-1.002 -======================================= - - commit e20a8d5cd43978e14b22d50b884edc14f06a72c6 - Author: Apocalypse - Date: Sat Feb 19 21:24:02 2011 -0700 - - New CPAN release of POE-Component-SSLify - v1.002 - - Released: 2011-02-20 04:23:48 UTC - - Add SSLify_GetSSL to get the Net::SSLeay object, thanks mordy@irc! - - commit b4269ddff7e04f09a8f304891469fbdc962e740c - Author: Apocalypse - Date: Sat Feb 19 21:19:21 2011 -0700 - - Add SSLify_GetSSL function, thanks mordy - -======================================= -2011-02-13 11:11:22 -0700 release-1.001 -======================================= - - commit 6f65b4c33c787f306ec32033f6445be4b5b59516 - Author: Apocalypse - Date: Sun Feb 13 11:11:22 2011 -0700 - - New CPAN release of POE-Component-SSLify - v1.001 - - Released: 2011-02-13 18:11:07 UTC - - Fixed the Net::SSLeay import code, thanks CPANTesters! - - commit 1627d797b6cd2a8a42de31312f699a5e514494ae - Author: Apocalypse - Date: Sun Feb 13 11:10:05 2011 -0700 - - use string eval instead of block eval, thanks CPANTesters - -=================================== -End of changes in the last 365 days -=================================== +================================================== +Changes from 2013-11-14 00:00:00 +0000 to present. +================================================== + +------------------------------------------ +version 1.012 at 2014-11-14 20:19:55 +0000 +------------------------------------------ + + Change: 57b6383e061d573e12fe9cc90950cdbc37dcd25f + Author: Apocalypse + Date : 2014-11-14 12:18:49 +0000 + + remove magic from substr and reduce copying of strings + +------------------------------------------ +version 1.011 at 2014-11-14 03:08:48 +0000 +------------------------------------------ + + Change: 65afe245446e0e64a7a7eb87154f9d039fc39272 + Author: Apocalypse + Date : 2014-11-13 19:08:48 +0000 + + New CPAN release of POE-Component-SSLify - v1.011 + + - Tweak the testsuite thanks to CPANTesters! + + [STATISTICS] + + - code churn: 11 files changed, 37 insertions(+), 35 deletions(-) + + Change: 6795ac7e0577df360e1cd094113235d12eaae9d9 + Author: Apocalypse + Date : 2014-11-13 19:06:41 +0000 + + remove TODO from superbig tests + + Change: 82379d6f23f8bbb76a03ed26fd4bdbc2af288fd2 + Author: Apocalypse + Date : 2014-11-13 19:01:25 +0000 + + dont test blocking mode on MSWin32, thanks CPANTesters and DSOLIMANO + + Change: 48c4ba77fed8089a608ecaf9ec8b7789a3e73c27 + Author: Apocalypse + Date : 2014-11-13 18:47:32 +0000 + + switch to POE::Filter::Block to reduce issues from Filter::Line + + Change: 9a89ec61f97b246088fb02508d1479295706bd22 + Author: Apocalypse + Date : 2014-11-13 16:30:19 +0000 + + add pogomips concept from POE =] + +------------------------------------------ +version 1.010 at 2014-11-12 06:19:01 +0000 +------------------------------------------ + + Change: dc234fe2f82b3982d475ee45fdc3534d1bfc178d + Author: Apocalypse + Date : 2014-11-11 22:19:01 +0000 + + New CPAN release of POE-Component-SSLify - v1.010 + + - add informational test that prints out ssleay version + + - clamp the writes to 16K internally to get around write errors + reported + + by RT#95071 and RT#58243, thanks! + + [STATISTICS] + + - code churn: 7 files changed, 591 insertions(+), 5 deletions(-) + + Change: f8043053bd401402979e7161d2fcc31f8184cb3b + Author: Apocalypse + Date : 2014-11-11 22:13:38 +0000 + + satisfy perlcritic... + + Change: c0ce9919c362c501fbe2487b718e68e5a7e1f038 + Author: Apocalypse + Date : 2014-11-11 21:50:17 +0000 + + add website link about same write issue + + Change: 3d8fa3c965241a7bc6b9b229d56863823dab02f5 + Author: Apocalypse + Date : 2014-11-11 21:46:21 +0000 + + tweak changes header + + Change: 26ef9be50cd5069bfe938fc41da7630ef0d5a739 + Author: Apocalypse + Date : 2014-11-11 21:41:59 +0000 + + clamp the writes + + Change: cae051e4f8c5c6368b9112a4fdc94f75b20ccf0d + Author: Apocalypse + Date : 2014-11-11 21:41:07 +0000 + + activate superbig tests for automated + + Change: 68ffe2c85d5f250b02b14e16da8fc973dfb259aa + Author: Apocalypse + Date : 2014-11-11 21:30:21 +0000 + + add ssleay info test + + Change: 200d56da2705d8bb5dedc384a8f7694aba331053 + Author: Apocalypse + Date : 2014-11-11 16:52:04 +0000 + + fix damn tabs + +------------------------------------------ +version 1.009 at 2014-11-12 00:45:19 +0000 +------------------------------------------ + + Change: 89e7cf553d93fe61a3c2eb9240f027b87d80954d + Author: Apocalypse + Date : 2014-11-11 16:45:19 +0000 + + New CPAN release of POE-Component-SSLify - v1.009 + + - Updates to the auto-generated files + + - Tweaked the testsuite to use done_testing() for sanity, RT#66741 + (thanks + + RCAPUTO!) + + - Use Test::FailWarnings in the testsuite in place of + Test::NoWarnings + + (DAGOLDEN++) + + - Add t/simple_large.t to try and track down RT#58243 (thanks Johan!) + + - Added a boatload of tests to try and track down RT#95071 (thanks + Joe!) + + [STATISTICS] + + - code churn: 27 files changed, 2160 insertions(+), 1503 deletions(-) + + Change: b717e75279e2b28ebd4b0d8ab0ce48cd7540998f + Author: Apocalypse + Date : 2014-11-11 16:41:22 +0000 + + dont test superbig tests! + + Change: e1aed14b94e9d1852b08208895262726d629fe3c + Author: Apocalypse + Date : 2014-11-11 15:51:56 +0000 + + tweak tests and add more large size tests + + Change: 0d1324143216eb9cd1cf07ba0c2ac814a268cf6f + Author: Apocalypse + Date : 2014-11-11 14:29:58 +0000 + + fix changes + + Change: 7621d86c76c95fb7495717a4d4e0b912cfe51b97 + Author: Apocalypse + Date : 2014-11-11 14:27:39 +0000 + + add test to try and track down RT#58243 + + Change: 3db8619e947a14554c1a04ec8a8c5c0cac19acb5 + Author: Apocalypse + Date : 2014-11-11 14:10:54 +0000 + + rename tests for clarity + + Change: ffbe1df7efa2ab2fd03230a44bdd14f0300bad5e + Author: Apocalypse + Date : 2014-11-11 14:08:06 +0000 + + use Test::FailWarnings and migrate to done_testing + + Change: f6a84928364e3a57e71733620bcbe8544a8ee6f2 + Author: Apocalypse + Date : 2014-11-11 14:00:30 +0000 + + tweaks to POD and stuff to pass tests + + Change: cd37d35eacaae2505f7d657b15d6e5820bf4f3fe + Author: Apocalypse + Date : 2014-11-09 01:19:19 +0000 + + mailmap + +================================================ +Plus 9 releases after 2013-11-14 00:00:00 +0000. +================================================ diff -Nru libpoe-component-sslify-perl-1.008/cpanfile libpoe-component-sslify-perl-1.012/cpanfile --- libpoe-component-sslify-perl-1.008/cpanfile 1970-01-01 00:00:00.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/cpanfile 2014-11-14 20:20:01.000000000 +0000 @@ -0,0 +1,37 @@ +requires "Exporter" => "0"; +requires "IO::Handle" => "1.28"; +requires "Net::SSLeay" => "1.36"; +requires "POE" => "1.267"; +requires "Scalar::Util" => "0"; +requires "Symbol" => "0"; +requires "Task::Weaken" => "1.03"; +requires "parent" => "0"; +requires "perl" => "5.006"; +requires "strict" => "0"; +requires "warnings" => "0"; + +on 'test' => sub { + requires "ExtUtils::MakeMaker" => "0"; + requires "File::Spec" => "0"; + requires "File::Temp" => "0"; + requires "IO::Handle" => "1.28"; + requires "IPC::Open3" => "0"; + requires "POE" => "1.267"; + requires "POE::Component::Client::TCP" => "0"; + requires "POE::Component::Server::TCP" => "0"; + requires "POE::Filter::Stream" => "0"; + requires "Socket" => "0"; + requires "Test::FailWarnings" => "0"; + requires "Test::More" => "1.001002"; + requires "perl" => "5.006"; +}; + +on 'test' => sub { + recommends "CPAN::Meta" => "2.120900"; +}; + +on 'configure' => sub { + requires "ExtUtils::MakeMaker" => "0"; + requires "Module::Build::Tiny" => "0.039"; + requires "perl" => "5.006"; +}; diff -Nru libpoe-component-sslify-perl-1.008/debian/changelog libpoe-component-sslify-perl-1.012/debian/changelog --- libpoe-component-sslify-perl-1.008/debian/changelog 2011-07-09 14:18:28.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/debian/changelog 2015-05-29 21:16:43.000000000 +0000 @@ -1,3 +1,42 @@ +libpoe-component-sslify-perl (1.012-1) unstable; urgency=low + + [ Ansgar Burchardt ] + * debian/control: Convert Vcs-* fields to Git. + + [ Salvatore Bonaccorso ] + * debian/copyright: Replace DEP5 Format-Specification URL from + svn.debian.org to anonscm.debian.org URL. + + [ gregor herrmann ] + * debian/control: update {versioned,alternative} (build) dependencies. + + [ Salvatore Bonaccorso ] + * Change Vcs-Git to canonical URI (git://anonscm.debian.org) + * Change search.cpan.org based URIs to metacpan.org based URIs + + [ Axel Beckert ] + * debian/copyright: migrate pre-1.0 format to 1.0 using "cme fix dpkg- + copyright" + + [ gregor herrmann ] + * Strip trailing slash from metacpan URLs. + + [ Salvatore Bonaccorso ] + * Update Vcs-Browser URL to cgit web frontend + + [ gregor herrmann ] + * Add debian/upstream/metadata + + * Import upstream version 1.012 + * Update build dependencies and debhelper compat level. + * Refresh spelling.patch (offset). + * Declare compliance with Debian Policy 3.9.6. + * Update years of upstream and packaging copyright. + * Add patch from Petr Písař for Net-SSLeay 0.68 compatibility. Taken + from CPAN RT#104493. + + -- gregor herrmann Fri, 29 May 2015 23:16:36 +0200 + libpoe-component-sslify-perl (1.008-1) unstable; urgency=low * Team upload. diff -Nru libpoe-component-sslify-perl-1.008/debian/compat libpoe-component-sslify-perl-1.012/debian/compat --- libpoe-component-sslify-perl-1.008/debian/compat 2011-06-12 11:43:10.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/debian/compat 2015-05-29 21:16:43.000000000 +0000 @@ -1 +1 @@ -8 +9 diff -Nru libpoe-component-sslify-perl-1.008/debian/control libpoe-component-sslify-perl-1.012/debian/control --- libpoe-component-sslify-perl-1.008/debian/control 2011-07-09 14:17:02.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/debian/control 2015-05-29 21:16:43.000000000 +0000 @@ -1,29 +1,34 @@ Source: libpoe-component-sslify-perl +Maintainer: Debian Perl Group +Uploaders: Niko Tyni , + Martín Ferrari , + Jose Luis Rivas , + Damyan Ivanov , + Jonathan Yu , + gregor herrmann Section: perl Priority: optional -Build-Depends: debhelper (>= 8) -Build-Depends-Indep: perl (>= 5.10.1), netbase, - libtask-weaken-perl (>= 1.03), - libmodule-build-perl (>= 0.360100) | perl (>= 5.11.4), - libnet-ssleay-perl (>= 1.36), - libpoe-perl (>= 2:1.267), - libtest-nowarnings-perl -Maintainer: Debian Perl Group -Uploaders: Niko Tyni , Martín Ferrari , - Jose Luis Rivas , Damyan Ivanov , - Jonathan Yu , - gregor herrmann -Standards-Version: 3.9.2 -Homepage: http://search.cpan.org/dist/POE-Component-SSLify/ -Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libpoe-component-sslify-perl/ -Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libpoe-component-sslify-perl/ +Build-Depends: debhelper (>= 9.20140227~), + libmodule-build-tiny-perl +Build-Depends-Indep: libnet-ssleay-perl, + libpoe-perl, + libtask-weaken-perl, + libtest-failwarnings-perl, + netbase, + perl, + perl (>= 5.19.6) | libtest-simple-perl (>= 1.001002) +Standards-Version: 3.9.6 +Vcs-Browser: https://anonscm.debian.org/cgit/pkg-perl/packages/libpoe-component-sslify-perl.git +Vcs-Git: git://anonscm.debian.org/pkg-perl/packages/libpoe-component-sslify-perl.git +Homepage: https://metacpan.org/release/POE-Component-SSLify Package: libpoe-component-sslify-perl Architecture: all -Depends: ${perl:Depends}, ${misc:Depends}, perl (>= 5.10.1), - libtask-weaken-perl (>= 1.03), - libnet-ssleay-perl (>= 1.36), - libpoe-perl (>= 2:1.267) +Depends: ${misc:Depends}, + ${perl:Depends}, + libnet-ssleay-perl, + libpoe-perl, + libtask-weaken-perl Description: module for SSL connection handling in POE Components POE::Component::SSLify is a POE Component that represents the standard way to handle SSL connections for other POE Components. It allows for the creation of diff -Nru libpoe-component-sslify-perl-1.008/debian/copyright libpoe-component-sslify-perl-1.012/debian/copyright --- libpoe-component-sslify-perl-1.008/debian/copyright 2011-06-12 11:43:10.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/debian/copyright 2015-05-29 21:16:43.000000000 +0000 @@ -1,10 +1,10 @@ -Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135 -Maintainer: Apocalypse -Source: http://search.cpan.org/dist/POE-Component-SSLify/ -Name: POE-Component-SSLify +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: POE-Component-SSLify +Upstream-Contact: Apocalypse +Source: https://metacpan.org/release/POE-Component-SSLify Files: * -Copyright: 2011, Apocalypse +Copyright: 2014, Apocalypse 2010, Rocco Caputo 2010, Dariusz Jackowski License: Artistic or GPL-1+ @@ -14,7 +14,7 @@ 2007, Niko Tyni 2008, Damyan Ivanov 2007-2008, Martín Ferrari - 2009-2011, gregor herrmann + 2009-2015, gregor herrmann 2011, Jonathan Yu License: Artistic or GPL-1+ diff -Nru libpoe-component-sslify-perl-1.008/debian/patches/POE-Component-SSLify-1.012-Use-default-SSL-version-in-tests.patch libpoe-component-sslify-perl-1.012/debian/patches/POE-Component-SSLify-1.012-Use-default-SSL-version-in-tests.patch --- libpoe-component-sslify-perl-1.008/debian/patches/POE-Component-SSLify-1.012-Use-default-SSL-version-in-tests.patch 1970-01-01 00:00:00.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/debian/patches/POE-Component-SSLify-1.012-Use-default-SSL-version-in-tests.patch 2015-05-29 21:16:43.000000000 +0000 @@ -0,0 +1,274 @@ +From fab873b9e556bc64cdd9da87ee76332840ca87e9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +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ř +--- + 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 + diff -Nru libpoe-component-sslify-perl-1.008/debian/patches/series libpoe-component-sslify-perl-1.012/debian/patches/series --- libpoe-component-sslify-perl-1.008/debian/patches/series 2010-10-12 10:31:06.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/debian/patches/series 2015-05-29 21:16:43.000000000 +0000 @@ -1 +1,2 @@ spelling.patch +POE-Component-SSLify-1.012-Use-default-SSL-version-in-tests.patch diff -Nru libpoe-component-sslify-perl-1.008/debian/patches/spelling.patch libpoe-component-sslify-perl-1.012/debian/patches/spelling.patch --- libpoe-component-sslify-perl-1.008/debian/patches/spelling.patch 2011-06-12 11:43:10.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/debian/patches/spelling.patch 2015-05-29 21:16:43.000000000 +0000 @@ -1,12 +1,13 @@ Description: fix a spelling mistake Origin: vendor -Forwarded: no +Bug: https://rt.cpan.org/Ticket/Display.html?id=104786 +Forwarded: https://rt.cpan.org/Ticket/Display.html?id=104786 Author: gregor herrmann -Last-Update: 2010-04-18 +Last-Update: 2015-05-29 --- a/lib/POE/Component/SSLify/ClientHandle.pm +++ b/lib/POE/Component/SSLify/ClientHandle.pm -@@ -77,7 +77,7 @@ +@@ -73,7 +73,7 @@ =head1 DESCRIPTION diff -Nru libpoe-component-sslify-perl-1.008/debian/upstream/metadata libpoe-component-sslify-perl-1.012/debian/upstream/metadata --- libpoe-component-sslify-perl-1.008/debian/upstream/metadata 1970-01-01 00:00:00.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/debian/upstream/metadata 2015-05-29 21:16:43.000000000 +0000 @@ -0,0 +1,8 @@ +--- +Archive: CPAN +Bug-Database: http://rt.cpan.org/Public/Dist/Display.html?Name=POE-Component-SSLify +Bug-Submit: bug-poe-component-sslify@rt.cpan.org +Contact: Apocalypse +Name: POE-Component-SSLify +Repository: git://github.com/apocalypse/perl-poe-sslify.git +Repository-Browse: http://github.com/apocalypse/perl-poe-sslify diff -Nru libpoe-component-sslify-perl-1.008/debian/watch libpoe-component-sslify-perl-1.012/debian/watch --- libpoe-component-sslify-perl-1.008/debian/watch 2010-10-12 10:31:06.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/debian/watch 2015-05-29 21:16:43.000000000 +0000 @@ -1,3 +1,3 @@ version=3 -http://search.cpan.org/dist/POE-Component-SSLify/ \ +https://metacpan.org/release/POE-Component-SSLify \ .*/POE-Component-SSLify-v?(\d.*)\.tar\.gz diff -Nru libpoe-component-sslify-perl-1.008/doap.xml libpoe-component-sslify-perl-1.012/doap.xml --- libpoe-component-sslify-perl-1.008/doap.xml 1970-01-01 00:00:00.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/doap.xml 2014-11-14 20:20:01.000000000 +0000 @@ -0,0 +1,27 @@ + + + POE-Component-SSLify + Makes using SSL in the world of POE easy! + + + Apocalypse + + + + + + + + + + + + + Perl + diff -Nru libpoe-component-sslify-perl-1.008/examples/client.pl libpoe-component-sslify-perl-1.012/examples/client.pl --- libpoe-component-sslify-perl-1.008/examples/client.pl 2011-05-04 21:55:38.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/examples/client.pl 2014-11-14 20:20:01.000000000 +0000 @@ -2,7 +2,7 @@ # # This file is part of POE-Component-SSLify # -# This software is copyright (c) 2011 by Apocalypse. +# This software is copyright (c) 2014 by Apocalypse. # # This is free software; you can redistribute it and/or modify it under # the same terms as the Perl 5 programming language system itself. diff -Nru libpoe-component-sslify-perl-1.008/examples/serverclient.pl libpoe-component-sslify-perl-1.012/examples/serverclient.pl --- libpoe-component-sslify-perl-1.008/examples/serverclient.pl 2011-05-04 21:55:38.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/examples/serverclient.pl 2014-11-14 20:20:01.000000000 +0000 @@ -2,7 +2,7 @@ # # This file is part of POE-Component-SSLify # -# This software is copyright (c) 2011 by Apocalypse. +# This software is copyright (c) 2014 by Apocalypse. # # This is free software; you can redistribute it and/or modify it under # the same terms as the Perl 5 programming language system itself. diff -Nru libpoe-component-sslify-perl-1.008/examples/server.pl libpoe-component-sslify-perl-1.012/examples/server.pl --- libpoe-component-sslify-perl-1.008/examples/server.pl 2011-05-04 21:55:38.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/examples/server.pl 2014-11-14 20:20:01.000000000 +0000 @@ -2,7 +2,7 @@ # # This file is part of POE-Component-SSLify # -# This software is copyright (c) 2011 by Apocalypse. +# This software is copyright (c) 2014 by Apocalypse. # # This is free software; you can redistribute it and/or modify it under # the same terms as the Perl 5 programming language system itself. diff -Nru libpoe-component-sslify-perl-1.008/INSTALL libpoe-component-sslify-perl-1.012/INSTALL --- libpoe-component-sslify-perl-1.008/INSTALL 2011-05-04 21:55:38.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/INSTALL 2014-11-14 20:20:01.000000000 +0000 @@ -1,4 +1,3 @@ - This is the Perl distribution POE-Component-SSLify. Installing POE-Component-SSLify is straightforward. @@ -25,16 +24,16 @@ As a last resort, you can manually install it. Download the tarball, untar it, then build it: - % perl Makefile.PL - % make && make test + % perl Build.PL + % ./Build && ./Build test Then install it: - % make install + % ./Build install If you are installing into a system-wide directory, you may need to run: - % sudo make install + % sudo ./Build install ## Documentation diff -Nru libpoe-component-sslify-perl-1.008/lib/POE/Component/SSLify/ClientHandle.pm libpoe-component-sslify-perl-1.012/lib/POE/Component/SSLify/ClientHandle.pm --- libpoe-component-sslify-perl-1.008/lib/POE/Component/SSLify/ClientHandle.pm 2011-05-04 21:55:38.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/lib/POE/Component/SSLify/ClientHandle.pm 2014-11-14 20:20:01.000000000 +0000 @@ -1,19 +1,15 @@ # # This file is part of POE-Component-SSLify # -# This software is copyright (c) 2011 by Apocalypse. +# This software is copyright (c) 2014 by Apocalypse. # # This is free software; you can redistribute it and/or modify it under # the same terms as the Perl 5 programming language system itself. # use strict; use warnings; package POE::Component::SSLify::ClientHandle; -BEGIN { - $POE::Component::SSLify::ClientHandle::VERSION = '1.008'; -} -BEGIN { - $POE::Component::SSLify::ClientHandle::AUTHORITY = 'cpan:APOCAL'; -} +$POE::Component::SSLify::ClientHandle::VERSION = '1.012'; +our $AUTHORITY = 'cpan:APOCAL'; # ABSTRACT: Client-side handle for SSLify @@ -59,13 +55,13 @@ 1; - __END__ + =pod -=for :stopwords Apocalypse +=encoding UTF-8 -=encoding utf-8 +=for :stopwords Apocalypse =head1 NAME @@ -73,7 +69,7 @@ =head1 VERSION - This document describes v1.008 of POE::Component::SSLify::ClientHandle - released May 04, 2011 as part of POE-Component-SSLify. + This document describes v1.012 of POE::Component::SSLify::ClientHandle - released November 14, 2014 as part of POE-Component-SSLify. =head1 DESCRIPTION @@ -101,35 +97,33 @@ =head1 COPYRIGHT AND LICENSE -This software is copyright (c) 2011 by Apocalypse. +This software is copyright (c) 2014 by Apocalypse. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. -The full text of the license can be found in the LICENSE file included with this distribution. +The full text of the license can be found in the +F file included with this distribution. =head1 DISCLAIMER OF WARRANTY -BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT -WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER -PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, -EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION. +THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE -TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. =cut - diff -Nru libpoe-component-sslify-perl-1.008/lib/POE/Component/SSLify/ServerHandle.pm libpoe-component-sslify-perl-1.012/lib/POE/Component/SSLify/ServerHandle.pm --- libpoe-component-sslify-perl-1.008/lib/POE/Component/SSLify/ServerHandle.pm 2011-05-04 21:55:38.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/lib/POE/Component/SSLify/ServerHandle.pm 2014-11-14 20:20:01.000000000 +0000 @@ -1,19 +1,15 @@ # # This file is part of POE-Component-SSLify # -# This software is copyright (c) 2011 by Apocalypse. +# This software is copyright (c) 2014 by Apocalypse. # # This is free software; you can redistribute it and/or modify it under # the same terms as the Perl 5 programming language system itself. # use strict; use warnings; package POE::Component::SSLify::ServerHandle; -BEGIN { - $POE::Component::SSLify::ServerHandle::VERSION = '1.008'; -} -BEGIN { - $POE::Component::SSLify::ServerHandle::AUTHORITY = 'cpan:APOCAL'; -} +$POE::Component::SSLify::ServerHandle::VERSION = '1.012'; +our $AUTHORITY = 'cpan:APOCAL'; # ABSTRACT: Server-side handle for SSLify @@ -157,7 +153,8 @@ # Write some stuff to the socket sub WRITE { # Get ourself + buffer + length + offset to write - my( $self, $buf, $len, $offset ) = @_; + my( $self, $len, $offset ) = ( $_[0], $_[2], $_[3] ); + my $buf = \$_[1]; # don't copy! # Check the status of the SSL handshake if ( ! $self->{'ssl_started'} ) { @@ -170,8 +167,13 @@ $offset = 0; } - # We count the number of characters written to the socket - my $wrote_len = Net::SSLeay::write( $self->{'ssl'}, substr( $buf, $offset, $len ) ); + # Thanks to RT#95071 and RT#58243 we need to clamp the length to the TLS 16K limit + # seems like the same thing happened to https://www.mail-archive.com/openssl-users@openssl.org/msg28151.html + $len = 16_384 if $len > 16_384; + + # don't trigger substr's magic as it is SLOOOOOOOOW! + # see http://www.perlmonks.org/?node_id=732873 + my $wrote_len = Net::SSLeay::write( $self->{'ssl'}, scalar substr( $$buf, $offset, $len ) ); # Did we get an error or number of bytes written? # Net::SSLeay::write() returns the number of bytes written, or 0 on unsuccessful @@ -261,13 +263,13 @@ 1; - __END__ + =pod -=for :stopwords Apocalypse +=encoding UTF-8 -=encoding utf-8 +=for :stopwords Apocalypse =head1 NAME @@ -275,7 +277,7 @@ =head1 VERSION - This document describes v1.008 of POE::Component::SSLify::ServerHandle - released May 04, 2011 as part of POE-Component-SSLify. + This document describes v1.012 of POE::Component::SSLify::ServerHandle - released November 14, 2014 as part of POE-Component-SSLify. =head1 DESCRIPTION @@ -307,35 +309,33 @@ =head1 COPYRIGHT AND LICENSE -This software is copyright (c) 2011 by Apocalypse. +This software is copyright (c) 2014 by Apocalypse. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. -The full text of the license can be found in the LICENSE file included with this distribution. +The full text of the license can be found in the +F file included with this distribution. =head1 DISCLAIMER OF WARRANTY -BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT -WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER -PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, -EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION. +THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE -TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. =cut - diff -Nru libpoe-component-sslify-perl-1.008/lib/POE/Component/SSLify.pm libpoe-component-sslify-perl-1.012/lib/POE/Component/SSLify.pm --- libpoe-component-sslify-perl-1.008/lib/POE/Component/SSLify.pm 2011-05-04 21:55:38.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/lib/POE/Component/SSLify.pm 2014-11-14 20:20:01.000000000 +0000 @@ -1,19 +1,16 @@ # # This file is part of POE-Component-SSLify # -# This software is copyright (c) 2011 by Apocalypse. +# This software is copyright (c) 2014 by Apocalypse. # # This is free software; you can redistribute it and/or modify it under # the same terms as the Perl 5 programming language system itself. # use strict; use warnings; package POE::Component::SSLify; -BEGIN { - $POE::Component::SSLify::VERSION = '1.008'; -} -BEGIN { - $POE::Component::SSLify::AUTHORITY = 'cpan:APOCAL'; -} +# git description: release-1.011-1-g57b6383 +$POE::Component::SSLify::VERSION = '1.012'; +our $AUTHORITY = 'cpan:APOCAL'; # ABSTRACT: Makes using SSL in the world of POE easy! @@ -110,6 +107,67 @@ # global so users of this module can override it locally our $IGNORE_SSL_ERRORS = 0; +#pod =func Client_SSLify +#pod +#pod This function sslifies a client-side socket. You can pass several options to it: +#pod +#pod my $socket = shift; +#pod $socket = Client_SSLify( $socket, $version, $options, $ctx, $callback ); +#pod $socket is the non-ssl socket you got from somewhere ( required ) +#pod $version is the SSL version you want to use +#pod $options is the SSL options you want to use +#pod $ctx is the custom SSL context you want to use +#pod $callback is the callback hook on success/failure of sslification +#pod +#pod # This is an example of the callback and you should pass it as Client_SSLify( $socket, ... , \&callback ); +#pod sub callback { +#pod my( $socket, $status, $errval ) = @_; +#pod # $socket is the original sslified socket in case you need to play with it +#pod # $status is either 1 or 0; with 1 signifying success and 0 failure +#pod # $errval will be defined if $status == 0; it's the numeric SSL error code +#pod # check http://www.openssl.org/docs/ssl/SSL_get_error.html for the possible error values ( and import them from Net::SSLeay! ) +#pod +#pod # The return value from the callback is discarded +#pod } +#pod +#pod If $ctx is defined, SSLify will ignore $version and $options. Otherwise, it will be created from the $version and +#pod $options parameters. If all of them are undefined, it will follow the defaults in L. +#pod +#pod BEWARE: If you passed in a CTX, SSLify will do Net::SSLeay::CTX_free( $ctx ) when the +#pod socket is destroyed. This means you cannot reuse contexts! +#pod +#pod NOTE: The way to have a client socket with proper certificates set up is: +#pod +#pod my $socket = shift; # get the socket from somewhere +#pod my $ctx = SSLify_ContextCreate( 'server.key', 'server.crt' ); +#pod $socket = Client_SSLify( $socket, undef, undef, $ctx ); +#pod +#pod NOTE: You can pass the callback anywhere in the arguments, we'll figure it out for you! If you want to call a POE event, please look +#pod into the postback/callback stuff in L. +#pod +#pod # we got this from POE::Wheel::SocketFactory +#pod sub event_SuccessEvent { +#pod my $socket = $_[ARG0]; +#pod $socket = Client_SSLify( $socket, $_[SESSION]->callback( 'sslify_result' ) ); +#pod $_[HEAP]->{client} = POE::Wheel::ReadWrite->new( +#pod Handle => $socket, +#pod ... +#pod ); +#pod return; +#pod } +#pod +#pod # the callback event +#pod sub event_sslify_result { +#pod my ($creation_args, $called_args) = @_[ARG0, ARG1]; +#pod my( $socket, $status, $errval ) = @$called_args; +#pod +#pod if ( $status ) { +#pod print "Yay, SSLification worked!"; +#pod } else { +#pod print "Aw, SSLification failed with error $errval"; +#pod } +#pod } +#pod =cut sub Client_SSLify { # Get the socket + version + options + ctx + callback @@ -152,6 +210,28 @@ return $newsock; } +#pod =func Server_SSLify +#pod +#pod This function sslifies a server-side socket. You can pass several options to it: +#pod +#pod my $socket = shift; +#pod $socket = Server_SSLify( $socket, $ctx, $callback ); +#pod $socket is the non-ssl socket you got from somewhere ( required ) +#pod $ctx is the custom SSL context you want to use; overrides the global ctx set in SSLify_Options +#pod $callback is the callback hook on success/failure of sslification +#pod +#pod BEWARE: L must be called first if you aren't passing a $ctx. If you want to set some options per-connection, do this: +#pod +#pod my $socket = shift; # get the socket from somewhere +#pod my $ctx = SSLify_ContextCreate(); +#pod # set various options on $ctx as desired +#pod $socket = Server_SSLify( $socket, $ctx ); +#pod +#pod NOTE: You can use L to modify the global, and avoid doing this on every connection if the +#pod options are the same... +#pod +#pod Please look at L for more details on the callback hook. +#pod =cut sub Server_SSLify { # Get the socket! @@ -193,6 +273,33 @@ return $newsock; } +#pod =func SSLify_ContextCreate +#pod +#pod Accepts some options, and returns a brand-new Net::SSLeay context object ( $ctx ) +#pod +#pod my $ctx = SSLify_ContextCreate( $key, $cert, $version, $options ); +#pod $key is the certificate key file +#pod $cert is the certificate file +#pod $version is the SSL version to use +#pod $options is the SSL options to use +#pod +#pod You can then call various Net::SSLeay methods on the context +#pod +#pod my $mode = Net::SSLeay::CTX_get_mode( $ctx ); +#pod +#pod By default we don't use the SSL key + certificate files +#pod +#pod By default we use the version: default. Known versions of the SSL connection - look at +#pod L for more info. +#pod +#pod * sslv2 +#pod * sslv3 +#pod * tlsv1 +#pod * sslv23 +#pod * default ( sslv23 ) +#pod +#pod By default we don't set any options - look at L for more info. +#pod =cut sub SSLify_ContextCreate { # Get the key + cert + version + options @@ -201,6 +308,23 @@ return _createSSLcontext( $key, $cert, $version, $options ); } +#pod =func SSLify_Options +#pod +#pod Call this function to initialize the global server-side context object. This will be the default context whenever you call +#pod L without passing a custom context to it. +#pod +#pod SSLify_Options( $key, $cert, $version, $options ); +#pod $key is the certificate key file ( required ) +#pod $cert is the certificate file ( required ) +#pod $version is the SSL version to use +#pod $options is the SSL options to use +#pod +#pod By default we use the version: default +#pod +#pod By default we use the options: Net::SSLeay::OP_ALL +#pod +#pod Please look at L for more info on the available versions/options. +#pod =cut sub SSLify_Options { # Get the key + cert + version + options @@ -276,6 +400,15 @@ return $context; } +#pod =func SSLify_GetCTX +#pod +#pod Returns the actual Net::SSLeay context object in case you wanted to play with it :) +#pod +#pod If passed in a socket, it will return that socket's $ctx instead of the global. +#pod +#pod my $ctx = SSLify_GetCTX(); # get the one set via SSLify_Options +#pod my $ctx = SSLify_GetCTX( $sslified_sock ); # get the one in the object +#pod =cut sub SSLify_GetCTX { my $sock = shift; @@ -286,24 +419,67 @@ } } +#pod =func SSLify_GetCipher +#pod +#pod Returns the cipher used by the SSLified socket +#pod +#pod print "SSL Cipher is: " . SSLify_GetCipher( $sslified_sock ) . "\n"; +#pod +#pod NOTE: Doing this immediately after Client_SSLify or Server_SSLify will result in "(NONE)" because the SSL handshake +#pod is not done yet. The socket is nonblocking, so you will have to wait a little bit for it to get ready. +#pod +#pod apoc@blackhole:~/mygit/perl-poe-sslify/examples$ perl serverclient.pl +#pod got connection from: 127.0.0.1 - commencing Server_SSLify() +#pod SSLified: 127.0.0.1 cipher type: ((NONE)) +#pod Connected to server, commencing Client_SSLify() +#pod SSLified the connection to the server +#pod Connected to SSL server +#pod Input: hola +#pod got input from: 127.0.0.1 cipher type: (AES256-SHA) input: 'hola' +#pod Got Reply: hola +#pod Input: ^C +#pod stopped at serverclient.pl line 126. +#pod =cut sub SSLify_GetCipher { my $sock = shift; return Net::SSLeay::get_cipher( tied( *$sock )->{'ssl'} ); } +#pod =func SSLify_GetSocket +#pod +#pod Returns the actual socket used by the SSLified socket, useful for stuff like getpeername()/getsockname() +#pod +#pod print "Remote IP is: " . inet_ntoa( ( unpack_sockaddr_in( getpeername( SSLify_GetSocket( $sslified_sock ) ) ) )[1] ) . "\n"; +#pod =cut sub SSLify_GetSocket { my $sock = shift; return tied( *$sock )->{'socket'}; } +#pod =func SSLify_GetSSL +#pod +#pod Returns the actual Net::SSLeay object so you can call methods on it +#pod +#pod print Net::SSLeay::dump_peer_certificate( SSLify_GetSSL( $sslified_sock ) ); +#pod =cut sub SSLify_GetSSL { my $sock = shift; return tied( *$sock )->{'ssl'}; } +#pod =func SSLify_GetStatus +#pod +#pod Returns the status of the SSL negotiation/handshake/connection. See L +#pod for more info. +#pod +#pod my $status = SSLify_GetStatus( $socket ); +#pod -1 = still in negotiation stage ( or error ) +#pod 0 = internal SSL error, connection will be dead +#pod 1 = negotiation successful +#pod =cut sub SSLify_GetStatus { my $sock = shift; @@ -312,14 +488,14 @@ 1; - __END__ + =pod -=for :stopwords Apocalypse cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee -diff irc mailto metadata placeholders +=encoding UTF-8 -=encoding utf-8 +=for :stopwords Apocalypse cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee +diff irc mailto metadata placeholders metacpan =head1 NAME @@ -327,11 +503,18 @@ =head1 VERSION - This document describes v1.008 of POE::Component::SSLify - released May 04, 2011 as part of POE-Component-SSLify. + This document describes v1.012 of POE::Component::SSLify - released November 14, 2014 as part of POE-Component-SSLify. =head1 SYNOPSIS - # CLIENT-side usage + # look at the DESCRIPTION for client and server example code + +=head1 DESCRIPTION + +This component is a method to simplify the SSLification of a socket before it is passed +to a L wheel in your application. + +=head2 Client usage # Import the module use POE::Component::SSLify qw( Client_SSLify ); @@ -353,9 +536,7 @@ # other options as usual ); - # --------------------------------------------------------------------------- # - - # SERVER-side usage +=head2 Server usage # !!! Make sure you have a public key + certificate # excellent howto: http://www.akadia.com/services/ssh_test_certificate.html @@ -386,10 +567,6 @@ # other options as usual ); -=head1 DESCRIPTION - -This component represents the standard way to do SSL in POE. - =head1 FUNCTIONS =head2 Client_SSLify @@ -685,6 +862,14 @@ =item * +MetaCPAN + +A modern, open-source CPAN search engine, useful to view POD in HTML format. + +L + +=item * + Search CPAN The default CPAN search engine, useful to view POD in HTML format. @@ -703,7 +888,7 @@ AnnoCPAN -The AnnoCPAN is a website that allows community annonations of Perl module documentation. +The AnnoCPAN is a website that allows community annotations of Perl module documentation. L @@ -729,7 +914,7 @@ The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution. -L +L =item * @@ -743,7 +928,7 @@ CPAN Testers Matrix -The CPAN Testers Matrix is a website that provides a visual way to determine what Perls/platforms PASSed for a distribution. +The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms. L @@ -802,9 +987,9 @@ with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull from your repository :) -L +L - git clone git://github.com/apocalypse/perl-poe-sslify.git + git clone https://github.com/apocalypse/perl-poe-sslify.git =head1 AUTHOR @@ -818,8 +1003,8 @@ From the PoCo::Client::HTTP code =] # This code should probably become a POE::Kernel method, - # seeing as it's rather baroque and potentially useful in a number - # of places. + # seeing as it's rather baroque and potentially useful in a number + # of places. ASCENT also helped a lot with the nonblocking mode, without his hard work this module would still be stuck in the stone age :) @@ -828,35 +1013,33 @@ =head1 COPYRIGHT AND LICENSE -This software is copyright (c) 2011 by Apocalypse. +This software is copyright (c) 2014 by Apocalypse. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. -The full text of the license can be found in the LICENSE file included with this distribution. +The full text of the license can be found in the +F file included with this distribution. =head1 DISCLAIMER OF WARRANTY -BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT -WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER -PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, -EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION. +THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE -TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. =cut - diff -Nru libpoe-component-sslify-perl-1.008/LICENSE libpoe-component-sslify-perl-1.012/LICENSE --- libpoe-component-sslify-perl-1.008/LICENSE 2011-05-04 21:55:38.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/LICENSE 2014-11-14 20:20:01.000000000 +0000 @@ -1,4 +1,4 @@ -This software is copyright (c) 2011 by Apocalypse. +This software is copyright (c) 2014 by Apocalypse. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. @@ -12,21 +12,22 @@ --- The GNU General Public License, Version 1, February 1989 --- -This software is Copyright (c) 2011 by Apocalypse. +This software is Copyright (c) 2014 by Apocalypse. This is free software, licensed under: The GNU General Public License, Version 1, February 1989 - GNU GENERAL PUBLIC LICENSE - Version 1, February 1989 + GNU GENERAL PUBLIC LICENSE + Version 1, February 1989 Copyright (C) 1989 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - Preamble + Preamble The license agreements of most software companies try to keep users at the mercy of those companies. By contrast, our General Public @@ -67,7 +68,7 @@ The precise terms and conditions for copying, distribution and modification follow. - GNU GENERAL PUBLIC LICENSE + GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any program or other work which @@ -185,7 +186,7 @@ of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. - NO WARRANTY + NO WARRANTY 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN @@ -207,9 +208,9 @@ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - END OF TERMS AND CONDITIONS + END OF TERMS AND CONDITIONS - Appendix: How to Apply These Terms to Your New Programs + Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to humanity, the best way to achieve this is to make it @@ -235,8 +236,9 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA + Also add information on how to contact you by electronic and paper mail. @@ -270,7 +272,7 @@ --- The Artistic License 1.0 --- -This software is Copyright (c) 2011 by Apocalypse. +This software is Copyright (c) 2014 by Apocalypse. This is free software, licensed under: diff -Nru libpoe-component-sslify-perl-1.008/Makefile.PL libpoe-component-sslify-perl-1.012/Makefile.PL --- libpoe-component-sslify-perl-1.008/Makefile.PL 2011-05-04 21:55:38.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/Makefile.PL 2014-11-14 20:20:01.000000000 +0000 @@ -1,67 +1,153 @@ +# +# This file is part of POE-Component-SSLify +# +# This software is copyright (c) 2014 by Apocalypse. +# +# This is free software; you can redistribute it and/or modify it under +# the same terms as the Perl 5 programming language system itself. +# +use strict; use warnings; +# This Makefile.PL for POE-Component-SSLify was generated by +# Dist::Zilla::Plugin::MakeMaker::Fallback 0.014 +# and Dist::Zilla::Plugin::MakeMaker::Awesome 0.31. +# Don't edit it but the dist.ini and plugins used to construct it. use strict; use warnings; -BEGIN { require 5.006; } +BEGIN { +my %configure_requires = ( + 'ExtUtils::MakeMaker' => '0', + 'Module::Build::Tiny' => '0.039', +); + +my @missing = grep { + ! eval "require $_; $_->VERSION($configure_requires{$_}); 1" +} keys %configure_requires; + +if (not @missing) +{ + print "Congratulations, your toolchain understands 'configure_requires'!\n\n"; +} +else +{ + $ENV{PERL_MM_FALLBACK_SILENCE_WARNING} or warn <<'EOW'; +*** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING *** + +If you're seeing this warning, your toolchain is really, really old* and you'll +almost certainly have problems installing CPAN modules from this century. But +never fear, dear user, for we have the technology to fix this! + +If you're using CPAN.pm to install things, then you can upgrade it using: + + cpan CPAN + +If you're using CPANPLUS to install things, then you can upgrade it using: + + cpanp CPANPLUS + +If you're using cpanminus, you shouldn't be seeing this message in the first +place, so please file an issue on github. + +If you're installing manually, please retrain your fingers to run Build.PL +when present instead. + +This public service announcement was brought to you by the Perl Toolchain +Gang, the irc.perl.org #toolchain IRC channel, and the number 42. -use ExtUtils::MakeMaker 6.31; +---- +* Alternatively, you are doing something overly clever, in which case you +should consider setting the 'prefer_installer' config option in CPAN.pm, or +'prefer_makefile' in CPANPLUS, to 'mb" and '0' respectively. +You can also silence this warning for future installations by setting the +PERL_MM_FALLBACK_SILENCE_WARNING environment variable. + +EOW + + sleep 10 if -t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT)); +} +} + +use 5.006; +use ExtUtils::MakeMaker; my %WriteMakefileArgs = ( - 'ABSTRACT' => 'Makes using SSL in the world of POE easy!', - 'AUTHOR' => 'Apocalypse ', - 'BUILD_REQUIRES' => { - 'File::Find' => '0', - 'File::Temp' => '0', - 'ExtUtils::MakeMaker' => '6.31', - 'POE' => '1.267', - 'POE::Component::Client::TCP' => '0', - 'POE::Component::Server::TCP' => '0', - 'Socket' => '0', - 'Test::More' => '0.88' + "ABSTRACT" => "Makes using SSL in the world of POE easy!", + "AUTHOR" => "Apocalypse ", + "CONFIGURE_REQUIRES" => { + "ExtUtils::MakeMaker" => 0, + "Module::Build::Tiny" => "0.039" }, - 'CONFIGURE_REQUIRES' => { - 'ExtUtils::MakeMaker' => '6.31' + "DISTNAME" => "POE-Component-SSLify", + "EXE_FILES" => [], + "LICENSE" => "perl", + "MIN_PERL_VERSION" => "5.006", + "NAME" => "POE::Component::SSLify", + "PREREQ_PM" => { + "Exporter" => 0, + "IO::Handle" => "1.28", + "Net::SSLeay" => "1.36", + "POE" => "1.267", + "Scalar::Util" => 0, + "Symbol" => 0, + "Task::Weaken" => "1.03", + "parent" => 0, + "strict" => 0, + "warnings" => 0 }, - 'DISTNAME' => 'POE-Component-SSLify', - 'EXE_FILES' => [], - 'LICENSE' => 'perl', - 'NAME' => 'POE::Component::SSLify', - 'PREREQ_PM' => { - 'Exporter' => '0', - 'IO::Handle' => '1.28', - 'Net::SSLeay' => '1.36', - 'POE' => '0', - 'Scalar::Util' => '0', - 'Symbol' => '0', - 'Task::Weaken' => '1.03', - 'parent' => '0' + "TEST_REQUIRES" => { + "ExtUtils::MakeMaker" => 0, + "File::Spec" => 0, + "File::Temp" => 0, + "IO::Handle" => "1.28", + "IPC::Open3" => 0, + "POE" => "1.267", + "POE::Component::Client::TCP" => 0, + "POE::Component::Server::TCP" => 0, + "POE::Filter::Stream" => 0, + "Socket" => 0, + "Test::FailWarnings" => 0, + "Test::More" => "1.001002" }, - 'VERSION' => '1.008', - 'test' => { - 'TESTS' => 't/*.t' + "VERSION" => "1.012", + "test" => { + "TESTS" => "t/*.t" } ); +my %FallbackPrereqs = ( + "Exporter" => 0, + "ExtUtils::MakeMaker" => 0, + "File::Spec" => 0, + "File::Temp" => 0, + "IO::Handle" => "1.28", + "IPC::Open3" => 0, + "Module::Build::Tiny" => "0.039", + "Net::SSLeay" => "1.36", + "POE" => "1.267", + "POE::Component::Client::TCP" => 0, + "POE::Component::Server::TCP" => 0, + "POE::Filter::Stream" => 0, + "Scalar::Util" => 0, + "Socket" => 0, + "Symbol" => 0, + "Task::Weaken" => "1.03", + "Test::FailWarnings" => 0, + "Test::More" => "1.001002", + "parent" => 0, + "strict" => 0, + "warnings" => 0 +); -unless ( eval { ExtUtils::MakeMaker->VERSION(6.56) } ) { - my $br = delete $WriteMakefileArgs{BUILD_REQUIRES}; - my $pp = $WriteMakefileArgs{PREREQ_PM}; - for my $mod ( keys %$br ) { - if ( exists $pp->{$mod} ) { - $pp->{$mod} = $br->{$mod} if $br->{$mod} > $pp->{$mod}; - } - else { - $pp->{$mod} = $br->{$mod}; - } - } +unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) { + delete $WriteMakefileArgs{TEST_REQUIRES}; + delete $WriteMakefileArgs{BUILD_REQUIRES}; + $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs; } delete $WriteMakefileArgs{CONFIGURE_REQUIRES} unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; WriteMakefile(%WriteMakefileArgs); - - - diff -Nru libpoe-component-sslify-perl-1.008/MANIFEST libpoe-component-sslify-perl-1.012/MANIFEST --- libpoe-component-sslify-perl-1.008/MANIFEST 2011-05-04 21:55:38.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/MANIFEST 2014-11-14 20:20:01.000000000 +0000 @@ -1,3 +1,5 @@ +# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.024. +AUTHOR_PLEDGE Build.PL Changes CommitLog @@ -10,7 +12,9 @@ Makefile.PL README SIGNATURE +cpanfile dist.ini +doap.xml examples/client.pl examples/server.pl examples/serverclient.pl @@ -20,15 +24,22 @@ mylib/example.crt mylib/example.key t/00-compile.t -t/000-report-versions-tiny.t -t/1_simple.t -t/2_renegotiate_client.t -t/3_upgrade.t -t/4_connect_hook.t -t/5_connfail_client.t -t/6_connfail_server.t -t/7_connect_hook_nodata.t -t/8_renegotiate_server.t -t/98_renegotiate.t +t/00-report-prereqs.dd +t/00-report-prereqs.t +t/00-ssleay-info.t t/99_mire_test.t t/apocalypse.t +t/connect_hook.t +t/connect_hook_nodata.t +t/connfail_client.t +t/connfail_server.t +t/renegotiate_client.t +t/renegotiate_client_pings.t +t/renegotiate_server.t +t/simple.t +t/simple_large.t +t/simple_parallel.t +t/simple_parallel_large.t +t/simple_parallel_superbig.t +t/simple_superbig.t +t/upgrade.t diff -Nru libpoe-component-sslify-perl-1.008/MANIFEST.SKIP libpoe-component-sslify-perl-1.012/MANIFEST.SKIP --- libpoe-component-sslify-perl-1.008/MANIFEST.SKIP 2011-05-04 21:55:38.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/MANIFEST.SKIP 2014-11-14 20:20:01.000000000 +0000 @@ -1,4 +1,4 @@ -# Added by Dist::Zilla::PluginBundle::Apocalyptic v0.001 +# Added by Dist::Zilla::PluginBundle::Apocalyptic v0.006 # skip Eclipse IDE stuff \.includepath$ diff -Nru libpoe-component-sslify-perl-1.008/META.json libpoe-component-sslify-perl-1.012/META.json --- libpoe-component-sslify-perl-1.008/META.json 2011-05-04 21:55:38.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/META.json 2014-11-14 20:20:01.000000000 +0000 @@ -4,7 +4,7 @@ "Apocalypse " ], "dynamic_config" : 0, - "generated_by" : "Dist::Zilla version 4.200005, CPAN::Meta::Converter version 2.102400", + "generated_by" : "Dist::Zilla version 5.024, CPAN::Meta::Converter version 2.142690", "license" : [ "perl_5" ], @@ -21,53 +21,61 @@ ] }, "prereqs" : { - "build" : { - "requires" : { - "Module::Build" : "0.3601" - } - }, "configure" : { "requires" : { - "Module::Build" : "0.3601" + "ExtUtils::MakeMaker" : "0", + "Module::Build::Tiny" : "0.039", + "perl" : "5.006" } }, "runtime" : { "requires" : { - "Exporter" : 0, + "Exporter" : "0", "IO::Handle" : "1.28", "Net::SSLeay" : "1.36", - "POE" : 0, - "Scalar::Util" : 0, - "Symbol" : 0, + "POE" : "1.267", + "Scalar::Util" : "0", + "Symbol" : "0", "Task::Weaken" : "1.03", - "parent" : 0, - "perl" : "5.006" + "parent" : "0", + "perl" : "5.006", + "strict" : "0", + "warnings" : "0" } }, "test" : { + "recommends" : { + "CPAN::Meta" : "2.120900" + }, "requires" : { - "File::Find" : 0, - "File::Temp" : 0, + "ExtUtils::MakeMaker" : "0", + "File::Spec" : "0", + "File::Temp" : "0", + "IO::Handle" : "1.28", + "IPC::Open3" : "0", "POE" : "1.267", - "POE::Component::Client::TCP" : 0, - "POE::Component::Server::TCP" : 0, - "Socket" : 0, - "Test::More" : "0.88" + "POE::Component::Client::TCP" : "0", + "POE::Component::Server::TCP" : "0", + "POE::Filter::Stream" : "0", + "Socket" : "0", + "Test::FailWarnings" : "0", + "Test::More" : "1.001002", + "perl" : "5.006" } } }, "provides" : { "POE::Component::SSLify" : { "file" : "lib/POE/Component/SSLify.pm", - "version" : "1.008" + "version" : "1.012" }, "POE::Component::SSLify::ClientHandle" : { "file" : "lib/POE/Component/SSLify/ClientHandle.pm", - "version" : "1.008" + "version" : "1.012" }, "POE::Component::SSLify::ServerHandle" : { "file" : "lib/POE/Component/SSLify/ServerHandle.pm", - "version" : "1.008" + "version" : "1.012" } }, "release_status" : "stable", @@ -76,151 +84,348 @@ "mailto" : "bug-poe-component-sslify at rt.cpan.org", "web" : "http://rt.cpan.org/Public/Dist/Display.html?Name=POE-Component-SSLify" }, - "homepage" : "http://search.cpan.org/dist/POE-Component-SSLify/", + "homepage" : "https://github.com/apocalypse/perl-poe-sslify", "license" : [ "http://dev.perl.org/licenses/" ], "repository" : { "type" : "git", - "url" : "git://github.com/apocalypse/perl-poe-sslify.git", - "web" : "http://github.com/apocalypse/perl-poe-sslify" + "url" : "https://github.com/apocalypse/perl-poe-sslify.git", + "web" : "https://github.com/apocalypse/perl-poe-sslify" } }, - "version" : "1.008", + "version" : "1.012", "x_BuiltWith" : { "modules" : { - "Exporter" : "5.63", - "File::Find" : "1.12", - "File::Temp" : "0.22", - "IO::Handle" : "1.28", - "Module::Build" : "0.3607", - "Net::SSLeay" : "1.36", - "POE" : "1.310", - "POE::Component::Client::TCP" : "1.299", - "POE::Component::Server::TCP" : "1.299", - "Scalar::Util" : "1.23", - "Socket" : "1.80", - "Symbol" : "1.06", - "Task::Weaken" : "1.03", - "Test::More" : "0.96", - "parent" : "0.224", - "perl" : "NA(skipped: perl)" + "CPAN::Meta" : "2.142690", + "Exporter" : "5.70", + "ExtUtils::MakeMaker" : "7.00", + "File::Spec" : "3.47", + "File::Temp" : "0.2304", + "IO::Handle" : "1.34", + "IPC::Open3" : "1.13", + "Module::Build::Tiny" : "0.039", + "Net::SSLeay" : "1.66", + "POE" : "1.365", + "POE::Component::Client::TCP" : "1.365", + "POE::Component::Server::TCP" : "1.365", + "POE::Filter::Stream" : "1.365", + "Scalar::Util" : "1.41", + "Socket" : "2.016", + "Symbol" : "1.07", + "Task::Weaken" : "1.04", + "Test::FailWarnings" : "0.008", + "Test::More" : "1.001009", + "parent" : "0.228", + "strict" : "1.07", + "warnings" : "1.18" }, "perl" : { - "original" : "v5.10.0", + "original" : "v5.18.2", "qv" : 1, "version" : [ 5, - 10, - 0 + 18, + 2 ] }, "platform" : "linux", - "uname" : "Linux 2.6.31-22-generic x86_64" + "uname" : "Linux 3.13.0-35-generic x86_64" }, "x_Dist_Zilla" : { + "perl" : { + "version" : "5.018002" + }, "plugins" : [ { "class" : "Dist::Zilla::Plugin::Git::NextVersion", + "config" : { + "Dist::Zilla::Plugin::Git::NextVersion" : { + "first_version" : "0.001", + "version_by_branch" : "0", + "version_regexp" : "(?^:^release-(.+)$)" + }, + "Dist::Zilla::Role::Git::Repo" : { + "repo_root" : "." + } + }, "name" : "@Apocalyptic/Git::NextVersion", - "version" : "1.110500" + "version" : "2.025" }, { - "class" : "Dist::Zilla::Plugin::GatherDir", - "name" : "@Apocalyptic/GatherDir", - "version" : "4.200005" + "class" : "Dist::Zilla::Plugin::Git::GatherDir", + "config" : { + "Dist::Zilla::Plugin::GatherDir" : { + "exclude_filename" : [ + "README.pod" + ], + "exclude_match" : [], + "follow_symlinks" : "0", + "include_dotfiles" : "1", + "prefix" : "", + "prune_directory" : [], + "root" : "." + }, + "Dist::Zilla::Plugin::Git::GatherDir" : { + "include_untracked" : "0" + }, + "Dist::Zilla::Role::Git::Repo" : { + "repo_root" : "." + } + }, + "name" : "@Apocalyptic/Git::GatherDir", + "version" : "2.025" }, { "class" : "Dist::Zilla::Plugin::PruneCruft", "name" : "@Apocalyptic/PruneCruft", - "version" : "4.200005" + "version" : "5.024" }, { "class" : "Dist::Zilla::Plugin::AutoPrereqs", "name" : "@Apocalyptic/AutoPrereqs", - "version" : "4.200005" + "version" : "5.024" }, { "class" : "Dist::Zilla::Plugin::GenerateFile", "name" : "@Apocalyptic/MANIFEST.SKIP", - "version" : "4.200005" + "version" : "5.024" }, { "class" : "Dist::Zilla::Plugin::ManifestSkip", "name" : "@Apocalyptic/ManifestSkip", - "version" : "4.200005" + "version" : "5.024" }, { - "class" : "Dist::Zilla::Plugin::CompileTests", - "name" : "@Apocalyptic/CompileTests", - "version" : "1.103030" + "class" : "Dist::Zilla::Plugin::Test::Compile", + "config" : { + "Dist::Zilla::Plugin::Test::Compile" : { + "bail_out_on_fail" : "0", + "fail_on_warning" : "author", + "fake_home" : "1", + "filename" : "t/00-compile.t", + "module_finder" : [ + ":InstallModules" + ], + "needs_display" : "0", + "phase" : "test", + "script_finder" : [ + ":ExecFiles" + ], + "skips" : [] + } + }, + "name" : "@Apocalyptic/Test::Compile", + "version" : "2.051" }, { "class" : "Dist::Zilla::Plugin::ApocalypseTests", "name" : "@Apocalyptic/ApocalypseTests", - "version" : "1.001" + "version" : "1.002" }, { - "class" : "Dist::Zilla::Plugin::ReportVersions::Tiny", - "name" : "@Apocalyptic/ReportVersions::Tiny", - "version" : "1.03" + "class" : "Dist::Zilla::Plugin::Test::ReportPrereqs", + "name" : "@Apocalyptic/Test::ReportPrereqs", + "version" : "0.019" }, { "class" : "Dist::Zilla::Plugin::Prepender", "name" : "@Apocalyptic/Prepender", - "version" : "1.101590" + "version" : "1.112280" }, { "class" : "Dist::Zilla::Plugin::Authority", "name" : "@Apocalyptic/Authority", - "version" : "1.005" + "version" : "1.009" + }, + { + "class" : "Dist::Zilla::Plugin::Git::Describe", + "name" : "@Apocalyptic/Git::Describe", + "version" : "0.003" }, { "class" : "Dist::Zilla::Plugin::PkgVersion", "name" : "@Apocalyptic/PkgVersion", - "version" : "4.200005" + "version" : "5.024" }, { "class" : "Dist::Zilla::Plugin::PodWeaver", + "config" : { + "Dist::Zilla::Plugin::PodWeaver" : { + "config_plugins" : [ + "@Apocalyptic" + ], + "finder" : [ + ":InstallModules", + ":ExecFiles" + ], + "plugins" : [ + { + "class" : "Pod::Weaver::Plugin::EnsurePod5", + "name" : "@CorePrep/EnsurePod5", + "version" : "4.006" + }, + { + "class" : "Pod::Weaver::Plugin::H1Nester", + "name" : "@CorePrep/H1Nester", + "version" : "4.006" + }, + { + "class" : "Pod::Weaver::Plugin::SingleEncoding", + "name" : "@Apocalyptic/SingleEncoding", + "version" : "4.006" + }, + { + "class" : "Pod::Weaver::Section::Region", + "name" : "@Apocalyptic/PodCoverage", + "version" : "4.006" + }, + { + "class" : "Pod::Weaver::Plugin::StopWords", + "name" : "@Apocalyptic/StopWords", + "version" : "1.009" + }, + { + "class" : "Pod::Weaver::Section::Name", + "name" : "@Apocalyptic/Name", + "version" : "4.006" + }, + { + "class" : "Pod::Weaver::Section::Version", + "name" : "@Apocalyptic/Version", + "version" : "4.006" + }, + { + "class" : "Pod::Weaver::Section::Generic", + "name" : "@Apocalyptic/Synopsis", + "version" : "4.006" + }, + { + "class" : "Pod::Weaver::Section::Generic", + "name" : "@Apocalyptic/Description", + "version" : "4.006" + }, + { + "class" : "Pod::Weaver::Section::Collect", + "name" : "@Apocalyptic/Attributes", + "version" : "4.006" + }, + { + "class" : "Pod::Weaver::Section::Collect", + "name" : "@Apocalyptic/Methods", + "version" : "4.006" + }, + { + "class" : "Pod::Weaver::Section::Collect", + "name" : "@Apocalyptic/Functions", + "version" : "4.006" + }, + { + "class" : "Pod::Weaver::Section::Collect", + "name" : "@Apocalyptic/POEvents", + "version" : "4.006" + }, + { + "class" : "Pod::Weaver::Section::Leftovers", + "name" : "@Apocalyptic/Leftovers", + "version" : "4.006" + }, + { + "class" : "Pod::Weaver::Section::SeeAlso", + "name" : "@Apocalyptic/SeeAlso", + "version" : "1.003" + }, + { + "class" : "Pod::Weaver::Section::Support", + "name" : "@Apocalyptic/Support", + "version" : "1.006" + }, + { + "class" : "Pod::Weaver::Section::Authors", + "name" : "@Apocalyptic/Authors", + "version" : "4.006" + }, + { + "class" : "Pod::Weaver::Section::Contributors", + "name" : "@Apocalyptic/Contributors", + "version" : "0.008" + }, + { + "class" : "Pod::Weaver::Section::Generic", + "name" : "@Apocalyptic/ACK", + "version" : "4.006" + }, + { + "class" : "Pod::Weaver::Section::Legal", + "name" : "@Apocalyptic/Legal", + "version" : "4.006" + }, + { + "class" : "Pod::Weaver::Section::WarrantyDisclaimer::GPL3", + "name" : "@Apocalyptic/Warranty", + "version" : "0.121290" + }, + { + "class" : "Pod::Weaver::Plugin::Transformer", + "name" : "@Apocalyptic/ListTransformer", + "version" : "4.006" + }, + { + "class" : "Pod::Weaver::Plugin::EnsureUniqueSections", + "name" : "@Apocalyptic/UniqueSections", + "version" : "0.121550" + } + ] + } + }, "name" : "@Apocalyptic/PodWeaver", - "version" : "3.101641" + "version" : "4.006" }, { "class" : "Dist::Zilla::Plugin::NextRelease", "name" : "@Apocalyptic/NextRelease", - "version" : "4.200005" + "version" : "5.024" }, { "class" : "Dist::Zilla::Plugin::ChangelogFromGit", "name" : "@Apocalyptic/ChangelogFromGit", - "version" : "0.002" + "version" : "0.016" }, { "class" : "Dist::Zilla::Plugin::MinimumPerl", "name" : "@Apocalyptic/MinimumPerl", - "version" : "1.003" + "version" : "1.006" }, { "class" : "Dist::Zilla::Plugin::Bugtracker", "name" : "@Apocalyptic/Bugtracker", - "version" : "1.102670" - }, - { - "class" : "Dist::Zilla::Plugin::Homepage", - "name" : "@Apocalyptic/Homepage", - "version" : "1.101420" + "version" : "1.111080" }, { "class" : "Dist::Zilla::Plugin::MetaConfig", "name" : "@Apocalyptic/MetaConfig", - "version" : "4.200005" + "version" : "5.024" + }, + { + "class" : "Dist::Zilla::Plugin::Git::Contributors", + "config" : { + "Dist::Zilla::Plugin::Git::Contributors" : { + "include_authors" : "0", + "include_releaser" : "1", + "order_by" : "name", + "paths" : [] + } + }, + "name" : "@Apocalyptic/Git::Contributors", + "version" : "0.008" }, { "class" : "Dist::Zilla::Plugin::MetaData::BuiltWith", "config" : { "Dist::Zilla::Plugin::MetaData::BuiltWith" : { "_stash_key" : "x_BuiltWith", - "show_uname" : 1, + "show_config" : "0", + "show_uname" : "1", "uname" : { "uname_args" : [ "-s", @@ -232,67 +437,118 @@ } }, "name" : "@Apocalyptic/MetaData::BuiltWith", - "version" : "0.01018204" + "version" : "1.003001" }, { - "class" : "Dist::Zilla::Plugin::Repository", - "name" : "@Apocalyptic/Repository", - "version" : "0.16" + "class" : "Dist::Zilla::Plugin::GithubMeta", + "name" : "@Apocalyptic/GithubMeta", + "version" : "0.46" }, { "class" : "Dist::Zilla::Plugin::MetaResources", "name" : "@Apocalyptic/MetaResources", - "version" : "4.200005" + "version" : "5.024" + }, + { + "class" : "Dist::Zilla::Plugin::Metadata", + "name" : "@Apocalyptic/Metadata", + "version" : "3.03" }, { "class" : "Dist::Zilla::Plugin::MetaNoIndex", "name" : "@Apocalyptic/MetaNoIndex", - "version" : "4.200005" + "version" : "5.024" }, { "class" : "Dist::Zilla::Plugin::MetaProvides::Package", + "config" : { + "Dist::Zilla::Plugin::MetaProvides::Package" : { + "finder_objects" : [ + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : "@Apocalyptic/MetaProvides::Package/AUTOVIV/:InstallModulesPM", + "version" : "5.024" + } + ] + }, + "Dist::Zilla::Role::MetaProvider::Provider" : { + "inherit_missing" : "1", + "inherit_version" : "1", + "meta_noindex" : "1" + } + }, "name" : "@Apocalyptic/MetaProvides::Package", - "version" : "1.12044908" + "version" : "2.001002" }, { "class" : "Dist::Zilla::Plugin::License", "name" : "@Apocalyptic/License", - "version" : "4.200005" - }, - { - "class" : "Dist::Zilla::Plugin::MakeMaker", - "name" : "@Apocalyptic/MakeMaker", - "version" : "4.200005" + "version" : "5.024" }, { - "class" : "Dist::Zilla::Plugin::ModuleBuild", - "name" : "@Apocalyptic/ModuleBuild", - "version" : "4.200005" + "class" : "Dist::Zilla::Plugin::ModuleBuildTiny", + "config" : { + "Dist::Zilla::Role::TestRunner" : { + "default_jobs" : 1 + } + }, + "name" : "@Apocalyptic/ModuleBuildTiny", + "version" : "0.008" }, { - "class" : "Dist::Zilla::Plugin::DualBuilders", - "name" : "@Apocalyptic/DualBuilders", - "version" : "1.001" + "class" : "Dist::Zilla::Plugin::MakeMaker::Fallback", + "config" : { + "Dist::Zilla::Role::TestRunner" : { + "default_jobs" : 1 + } + }, + "name" : "@Apocalyptic/MakeMaker::Fallback", + "version" : "0.014" }, { "class" : "Dist::Zilla::Plugin::MetaYAML", "name" : "@Apocalyptic/MetaYAML", - "version" : "4.200005" + "version" : "5.024" }, { "class" : "Dist::Zilla::Plugin::MetaJSON", "name" : "@Apocalyptic/MetaJSON", - "version" : "4.200005" - }, - { - "class" : "Dist::Zilla::Plugin::ReadmeFromPod", - "name" : "@Apocalyptic/ReadmeFromPod", - "version" : "0.14" + "version" : "5.024" }, { "class" : "Dist::Zilla::Plugin::InstallGuide", "name" : "@Apocalyptic/InstallGuide", - "version" : "1.101461" + "version" : "1.200005" + }, + { + "class" : "Dist::Zilla::Plugin::DOAP", + "name" : "@Apocalyptic/DOAP", + "version" : "0.003" + }, + { + "class" : "Dist::Zilla::Plugin::Covenant", + "name" : "@Apocalyptic/Covenant", + "version" : "0.1.0" + }, + { + "class" : "Dist::Zilla::Plugin::CPANFile", + "name" : "@Apocalyptic/CPANFile", + "version" : "5.024" + }, + { + "class" : "Dist::Zilla::Plugin::ReadmeAnyFromPod", + "name" : "@Apocalyptic/ReadmeAnyFromPod", + "version" : "0.142470" + }, + { + "class" : "Dist::Zilla::Plugin::ReadmeAnyFromPod", + "name" : "@Apocalyptic/pod for github", + "version" : "0.142470" + }, + { + "class" : "Dist::Zilla::Plugin::ChangeStats::Git", + "name" : "@Apocalyptic/ChangeStats::Git", + "version" : "0.3.0" }, { "class" : "Dist::Zilla::Plugin::Signature", @@ -302,82 +558,260 @@ { "class" : "Dist::Zilla::Plugin::Manifest", "name" : "@Apocalyptic/Manifest", - "version" : "4.200005" + "version" : "5.024" }, { "class" : "Dist::Zilla::Plugin::CheckChangesHasContent", "name" : "@Apocalyptic/CheckChangesHasContent", - "version" : "0.003" + "version" : "0.007" }, { "class" : "Dist::Zilla::Plugin::Git::Check", + "config" : { + "Dist::Zilla::Plugin::Git::Check" : { + "untracked_files" : "die" + }, + "Dist::Zilla::Role::Git::DirtyFiles" : { + "allow_dirty" : [ + "README.pod", + "Changes" + ], + "allow_dirty_match" : [], + "changelog" : "Changes" + }, + "Dist::Zilla::Role::Git::Repo" : { + "repo_root" : "." + } + }, "name" : "@Apocalyptic/Git::Check", - "version" : "1.110500" + "version" : "2.025" + }, + { + "class" : "Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch", + "config" : { + "Dist::Zilla::Role::Git::Repo" : { + "repo_root" : "." + } + }, + "name" : "@Apocalyptic/Git::CheckFor::CorrectBranch", + "version" : "0.011" + }, + { + "class" : "Dist::Zilla::Plugin::Git::CheckFor::MergeConflicts", + "config" : { + "Dist::Zilla::Role::Git::Repo" : { + "repo_root" : "." + } + }, + "name" : "@Apocalyptic/Git::CheckFor::MergeConflicts", + "version" : "0.011" + }, + { + "class" : "Dist::Zilla::Plugin::Git::Remote::Check", + "name" : "@Apocalyptic/Git::Remote::Check", + "version" : "0.1.2" + }, + { + "class" : "Dist::Zilla::Plugin::PromptIfStale", + "config" : { + "Dist::Zilla::Plugin::PromptIfStale" : { + "check_all_plugins" : "1", + "check_all_prereqs" : "1", + "modules" : [], + "phase" : "release", + "skip" : [] + } + }, + "name" : "@Apocalyptic/PromptIfStale", + "version" : "0.029" }, { "class" : "Dist::Zilla::Plugin::TestRelease", "name" : "@Apocalyptic/TestRelease", - "version" : "4.200005" + "version" : "5.024" + }, + { + "class" : "Dist::Zilla::Plugin::CheckPrereqsIndexed", + "name" : "@Apocalyptic/CheckPrereqsIndexed", + "version" : "0.012" + }, + { + "class" : "Dist::Zilla::Plugin::CheckSelfDependency", + "config" : { + "Dist::Zilla::Plugin::CheckSelfDependency" : { + "finder" : [ + ":InstallModules" + ] + } + }, + "name" : "@Apocalyptic/CheckSelfDependency", + "version" : "0.007" + }, + { + "class" : "Dist::Zilla::Plugin::CheckIssues", + "name" : "@Apocalyptic/CheckIssues", + "version" : "0.004" }, { "class" : "Dist::Zilla::Plugin::ConfirmRelease", "name" : "@Apocalyptic/ConfirmRelease", - "version" : "4.200005" + "version" : "5.024" }, { "class" : "Dist::Zilla::Plugin::UploadToCPAN", "name" : "@Apocalyptic/UploadToCPAN", - "version" : "4.200005" + "version" : "5.024" }, { "class" : "Dist::Zilla::Plugin::ArchiveRelease", "name" : "@Apocalyptic/ArchiveRelease", - "version" : "3.01" + "version" : "4.00" }, { "class" : "Dist::Zilla::Plugin::Git::Commit", + "config" : { + "Dist::Zilla::Plugin::Git::Commit" : { + "add_files_in" : [ + "releases" + ], + "commit_msg" : "New CPAN release of %N - v%v%n%n%c", + "time_zone" : "UTC" + }, + "Dist::Zilla::Role::Git::DirtyFiles" : { + "allow_dirty" : [ + "README.pod", + "Changes" + ], + "allow_dirty_match" : [], + "changelog" : "Changes" + }, + "Dist::Zilla::Role::Git::Repo" : { + "repo_root" : "." + } + }, "name" : "@Apocalyptic/Git::Commit", - "version" : "1.110500" + "version" : "2.025" }, { "class" : "Dist::Zilla::Plugin::Git::Tag", + "config" : { + "Dist::Zilla::Plugin::Git::Tag" : { + "branch" : null, + "signed" : 0, + "tag" : "release-1.012", + "tag_format" : "release-%v", + "tag_message" : "Tagged release-%v", + "time_zone" : "local" + }, + "Dist::Zilla::Role::Git::Repo" : { + "repo_root" : "." + } + }, "name" : "@Apocalyptic/Git::Tag", - "version" : "1.110500" + "version" : "2.025" }, { "class" : "Dist::Zilla::Plugin::Git::Push", + "config" : { + "Dist::Zilla::Plugin::Git::Push" : { + "push_to" : [ + "origin", + "bitbucket" + ], + "remotes_must_exist" : 1 + }, + "Dist::Zilla::Role::Git::Repo" : { + "repo_root" : "." + } + }, "name" : "@Apocalyptic/Git::Push", - "version" : "1.110500" + "version" : "2.025" + }, + { + "class" : "Dist::Zilla::Plugin::GitHub::Update", + "name" : "@Apocalyptic/GitHub::Update", + "version" : "0.38" + }, + { + "class" : "Dist::Zilla::Plugin::Bitbucket::Update", + "name" : "@Apocalyptic/Bitbucket::Update", + "version" : "0.001" + }, + { + "class" : "Dist::Zilla::Plugin::Clean", + "name" : "@Apocalyptic/Clean", + "version" : "0.07" + }, + { + "class" : "Dist::Zilla::Plugin::SchwartzRatio", + "name" : "@Apocalyptic/SchwartzRatio", + "version" : "0.2.0" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":InstallModules", - "version" : "4.200005" + "version" : "5.024" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : ":IncModules", + "version" : "5.024" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":TestFiles", - "version" : "4.200005" + "version" : "5.024" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExecFiles", - "version" : "4.200005" + "version" : "5.024" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ShareFiles", - "version" : "4.200005" + "version" : "5.024" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : ":MainModule", + "version" : "5.024" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : ":AllFiles", + "version" : "5.024" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : ":NoFiles", + "version" : "5.024" + }, + { + "class" : "Dist::Zilla::Plugin::VerifyPhases", + "name" : "@Apocalyptic/VerifyPhases", + "version" : "0.006" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : "@Apocalyptic/MetaProvides::Package/AUTOVIV/:InstallModulesPM", + "version" : "5.024" } ], "zilla" : { "class" : "Dist::Zilla::Dist::Builder", "config" : { - "is_trial" : 0 + "is_trial" : "0" }, - "version" : "4.200005" + "version" : "5.024" } }, + "x_IRC" : { + "url" : "irc://irc.perl.org/#perl-help", + "web" : "https://chat.mibbit.com/?channel=%23perl-help&server=irc.perl.org" + }, + "x_author_pledge" : { + "version" : 1 + }, "x_authority" : "cpan:APOCAL" } - diff -Nru libpoe-component-sslify-perl-1.008/META.yml libpoe-component-sslify-perl-1.012/META.yml --- libpoe-component-sslify-perl-1.008/META.yml 2011-05-04 21:55:38.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/META.yml 2014-11-14 20:20:01.000000000 +0000 @@ -3,22 +3,29 @@ author: - 'Apocalypse ' build_requires: - File::Find: 0 - File::Temp: 0 - Module::Build: 0.3601 - POE: 1.267 - POE::Component::Client::TCP: 0 - POE::Component::Server::TCP: 0 - Socket: 0 - Test::More: 0.88 + ExtUtils::MakeMaker: '0' + File::Spec: '0' + File::Temp: '0' + IO::Handle: '1.28' + IPC::Open3: '0' + POE: '1.267' + POE::Component::Client::TCP: '0' + POE::Component::Server::TCP: '0' + POE::Filter::Stream: '0' + Socket: '0' + Test::FailWarnings: '0' + Test::More: '1.001002' + perl: '5.006' configure_requires: - Module::Build: 0.3601 -dynamic_config: 0 -generated_by: 'Dist::Zilla version 4.200005, CPAN::Meta::Converter version 2.102400' + ExtUtils::MakeMaker: '0' + Module::Build::Tiny: '0.039' + perl: '5.006' +dynamic_config: '0' +generated_by: 'Dist::Zilla version 5.024, CPAN::Meta::Converter version 2.142690' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html - version: 1.4 + version: '1.4' name: POE-Component-SSLify no_index: directory: @@ -28,259 +35,584 @@ provides: POE::Component::SSLify: file: lib/POE/Component/SSLify.pm - version: 1.008 + version: '1.012' POE::Component::SSLify::ClientHandle: file: lib/POE/Component/SSLify/ClientHandle.pm - version: 1.008 + version: '1.012' POE::Component::SSLify::ServerHandle: file: lib/POE/Component/SSLify/ServerHandle.pm - version: 1.008 + version: '1.012' requires: - Exporter: 0 - IO::Handle: 1.28 - Net::SSLeay: 1.36 - POE: 0 - Scalar::Util: 0 - Symbol: 0 - Task::Weaken: 1.03 - parent: 0 - perl: 5.006 + Exporter: '0' + IO::Handle: '1.28' + Net::SSLeay: '1.36' + POE: '1.267' + Scalar::Util: '0' + Symbol: '0' + Task::Weaken: '1.03' + parent: '0' + perl: '5.006' + strict: '0' + warnings: '0' resources: bugtracker: http://rt.cpan.org/Public/Dist/Display.html?Name=POE-Component-SSLify - homepage: http://search.cpan.org/dist/POE-Component-SSLify/ + homepage: https://github.com/apocalypse/perl-poe-sslify license: http://dev.perl.org/licenses/ - repository: git://github.com/apocalypse/perl-poe-sslify.git -version: 1.008 + repository: https://github.com/apocalypse/perl-poe-sslify.git +version: '1.012' x_BuiltWith: modules: - Exporter: 5.63 - File::Find: 1.12 - File::Temp: 0.22 - IO::Handle: 1.28 - Module::Build: 0.3607 - Net::SSLeay: 1.36 - POE: 1.310 - POE::Component::Client::TCP: 1.299 - POE::Component::Server::TCP: 1.299 - Scalar::Util: 1.23 - Socket: 1.80 - Symbol: 1.06 - Task::Weaken: 1.03 - Test::More: 0.96 - parent: 0.224 - perl: 'NA(skipped: perl)' + CPAN::Meta: '2.142690' + Exporter: '5.70' + ExtUtils::MakeMaker: '7.00' + File::Spec: '3.47' + File::Temp: '0.2304' + IO::Handle: '1.34' + IPC::Open3: '1.13' + Module::Build::Tiny: '0.039' + Net::SSLeay: '1.66' + POE: '1.365' + POE::Component::Client::TCP: '1.365' + POE::Component::Server::TCP: '1.365' + POE::Filter::Stream: '1.365' + Scalar::Util: '1.41' + Socket: '2.016' + Symbol: '1.07' + Task::Weaken: '1.04' + Test::FailWarnings: '0.008' + Test::More: '1.001009' + parent: '0.228' + strict: '1.07' + warnings: '1.18' perl: - original: v5.10.0 + original: v5.18.2 qv: 1 version: - 5 - - 10 - - 0 + - 18 + - 2 platform: linux - uname: 'Linux 2.6.31-22-generic x86_64' + uname: 'Linux 3.13.0-35-generic x86_64' x_Dist_Zilla: + perl: + version: '5.018002' plugins: - class: Dist::Zilla::Plugin::Git::NextVersion + config: + Dist::Zilla::Plugin::Git::NextVersion: + first_version: '0.001' + version_by_branch: '0' + version_regexp: (?^:^release-(.+)$) + Dist::Zilla::Role::Git::Repo: + repo_root: . name: '@Apocalyptic/Git::NextVersion' - version: 1.110500 + version: '2.025' - - class: Dist::Zilla::Plugin::GatherDir - name: '@Apocalyptic/GatherDir' - version: 4.200005 + class: Dist::Zilla::Plugin::Git::GatherDir + config: + Dist::Zilla::Plugin::GatherDir: + exclude_filename: + - README.pod + exclude_match: [] + follow_symlinks: '0' + include_dotfiles: '1' + prefix: '' + prune_directory: [] + root: . + Dist::Zilla::Plugin::Git::GatherDir: + include_untracked: '0' + Dist::Zilla::Role::Git::Repo: + repo_root: . + name: '@Apocalyptic/Git::GatherDir' + version: '2.025' - class: Dist::Zilla::Plugin::PruneCruft name: '@Apocalyptic/PruneCruft' - version: 4.200005 + version: '5.024' - class: Dist::Zilla::Plugin::AutoPrereqs name: '@Apocalyptic/AutoPrereqs' - version: 4.200005 + version: '5.024' - class: Dist::Zilla::Plugin::GenerateFile name: '@Apocalyptic/MANIFEST.SKIP' - version: 4.200005 + version: '5.024' - class: Dist::Zilla::Plugin::ManifestSkip name: '@Apocalyptic/ManifestSkip' - version: 4.200005 + version: '5.024' - - class: Dist::Zilla::Plugin::CompileTests - name: '@Apocalyptic/CompileTests' - version: 1.103030 + class: Dist::Zilla::Plugin::Test::Compile + config: + Dist::Zilla::Plugin::Test::Compile: + bail_out_on_fail: '0' + fail_on_warning: author + fake_home: '1' + filename: t/00-compile.t + module_finder: + - ':InstallModules' + needs_display: '0' + phase: test + script_finder: + - ':ExecFiles' + skips: [] + name: '@Apocalyptic/Test::Compile' + version: '2.051' - class: Dist::Zilla::Plugin::ApocalypseTests name: '@Apocalyptic/ApocalypseTests' - version: 1.001 + version: '1.002' - - class: Dist::Zilla::Plugin::ReportVersions::Tiny - name: '@Apocalyptic/ReportVersions::Tiny' - version: 1.03 + class: Dist::Zilla::Plugin::Test::ReportPrereqs + name: '@Apocalyptic/Test::ReportPrereqs' + version: '0.019' - class: Dist::Zilla::Plugin::Prepender name: '@Apocalyptic/Prepender' - version: 1.101590 + version: '1.112280' - class: Dist::Zilla::Plugin::Authority name: '@Apocalyptic/Authority' - version: 1.005 + version: '1.009' + - + class: Dist::Zilla::Plugin::Git::Describe + name: '@Apocalyptic/Git::Describe' + version: '0.003' - class: Dist::Zilla::Plugin::PkgVersion name: '@Apocalyptic/PkgVersion' - version: 4.200005 + version: '5.024' - class: Dist::Zilla::Plugin::PodWeaver + config: + Dist::Zilla::Plugin::PodWeaver: + config_plugins: + - '@Apocalyptic' + finder: + - ':InstallModules' + - ':ExecFiles' + plugins: + - + class: Pod::Weaver::Plugin::EnsurePod5 + name: '@CorePrep/EnsurePod5' + version: '4.006' + - + class: Pod::Weaver::Plugin::H1Nester + name: '@CorePrep/H1Nester' + version: '4.006' + - + class: Pod::Weaver::Plugin::SingleEncoding + name: '@Apocalyptic/SingleEncoding' + version: '4.006' + - + class: Pod::Weaver::Section::Region + name: '@Apocalyptic/PodCoverage' + version: '4.006' + - + class: Pod::Weaver::Plugin::StopWords + name: '@Apocalyptic/StopWords' + version: '1.009' + - + class: Pod::Weaver::Section::Name + name: '@Apocalyptic/Name' + version: '4.006' + - + class: Pod::Weaver::Section::Version + name: '@Apocalyptic/Version' + version: '4.006' + - + class: Pod::Weaver::Section::Generic + name: '@Apocalyptic/Synopsis' + version: '4.006' + - + class: Pod::Weaver::Section::Generic + name: '@Apocalyptic/Description' + version: '4.006' + - + class: Pod::Weaver::Section::Collect + name: '@Apocalyptic/Attributes' + version: '4.006' + - + class: Pod::Weaver::Section::Collect + name: '@Apocalyptic/Methods' + version: '4.006' + - + class: Pod::Weaver::Section::Collect + name: '@Apocalyptic/Functions' + version: '4.006' + - + class: Pod::Weaver::Section::Collect + name: '@Apocalyptic/POEvents' + version: '4.006' + - + class: Pod::Weaver::Section::Leftovers + name: '@Apocalyptic/Leftovers' + version: '4.006' + - + class: Pod::Weaver::Section::SeeAlso + name: '@Apocalyptic/SeeAlso' + version: '1.003' + - + class: Pod::Weaver::Section::Support + name: '@Apocalyptic/Support' + version: '1.006' + - + class: Pod::Weaver::Section::Authors + name: '@Apocalyptic/Authors' + version: '4.006' + - + class: Pod::Weaver::Section::Contributors + name: '@Apocalyptic/Contributors' + version: '0.008' + - + class: Pod::Weaver::Section::Generic + name: '@Apocalyptic/ACK' + version: '4.006' + - + class: Pod::Weaver::Section::Legal + name: '@Apocalyptic/Legal' + version: '4.006' + - + class: Pod::Weaver::Section::WarrantyDisclaimer::GPL3 + name: '@Apocalyptic/Warranty' + version: '0.121290' + - + class: Pod::Weaver::Plugin::Transformer + name: '@Apocalyptic/ListTransformer' + version: '4.006' + - + class: Pod::Weaver::Plugin::EnsureUniqueSections + name: '@Apocalyptic/UniqueSections' + version: '0.121550' name: '@Apocalyptic/PodWeaver' - version: 3.101641 + version: '4.006' - class: Dist::Zilla::Plugin::NextRelease name: '@Apocalyptic/NextRelease' - version: 4.200005 + version: '5.024' - class: Dist::Zilla::Plugin::ChangelogFromGit name: '@Apocalyptic/ChangelogFromGit' - version: 0.002 + version: '0.016' - class: Dist::Zilla::Plugin::MinimumPerl name: '@Apocalyptic/MinimumPerl' - version: 1.003 + version: '1.006' - class: Dist::Zilla::Plugin::Bugtracker name: '@Apocalyptic/Bugtracker' - version: 1.102670 - - - class: Dist::Zilla::Plugin::Homepage - name: '@Apocalyptic/Homepage' - version: 1.101420 + version: '1.111080' - class: Dist::Zilla::Plugin::MetaConfig name: '@Apocalyptic/MetaConfig' - version: 4.200005 + version: '5.024' + - + class: Dist::Zilla::Plugin::Git::Contributors + config: + Dist::Zilla::Plugin::Git::Contributors: + include_authors: '0' + include_releaser: '1' + order_by: name + paths: [] + name: '@Apocalyptic/Git::Contributors' + version: '0.008' - class: Dist::Zilla::Plugin::MetaData::BuiltWith config: Dist::Zilla::Plugin::MetaData::BuiltWith: _stash_key: x_BuiltWith - show_uname: 1 + show_config: '0' + show_uname: '1' uname: uname_args: - - '-s' - - '-r' - - '-m' + - -s + - -r + - -m uname_call: uname name: '@Apocalyptic/MetaData::BuiltWith' - version: 0.01018204 + version: '1.003001' - - class: Dist::Zilla::Plugin::Repository - name: '@Apocalyptic/Repository' - version: 0.16 + class: Dist::Zilla::Plugin::GithubMeta + name: '@Apocalyptic/GithubMeta' + version: '0.46' - class: Dist::Zilla::Plugin::MetaResources name: '@Apocalyptic/MetaResources' - version: 4.200005 + version: '5.024' + - + class: Dist::Zilla::Plugin::Metadata + name: '@Apocalyptic/Metadata' + version: '3.03' - class: Dist::Zilla::Plugin::MetaNoIndex name: '@Apocalyptic/MetaNoIndex' - version: 4.200005 + version: '5.024' - class: Dist::Zilla::Plugin::MetaProvides::Package + config: + Dist::Zilla::Plugin::MetaProvides::Package: + finder_objects: + - + class: Dist::Zilla::Plugin::FinderCode + name: '@Apocalyptic/MetaProvides::Package/AUTOVIV/:InstallModulesPM' + version: '5.024' + Dist::Zilla::Role::MetaProvider::Provider: + inherit_missing: '1' + inherit_version: '1' + meta_noindex: '1' name: '@Apocalyptic/MetaProvides::Package' - version: 1.12044908 + version: '2.001002' - class: Dist::Zilla::Plugin::License name: '@Apocalyptic/License' - version: 4.200005 + version: '5.024' - - class: Dist::Zilla::Plugin::MakeMaker - name: '@Apocalyptic/MakeMaker' - version: 4.200005 - - - class: Dist::Zilla::Plugin::ModuleBuild - name: '@Apocalyptic/ModuleBuild' - version: 4.200005 - - - class: Dist::Zilla::Plugin::DualBuilders - name: '@Apocalyptic/DualBuilders' - version: 1.001 + class: Dist::Zilla::Plugin::ModuleBuildTiny + config: + Dist::Zilla::Role::TestRunner: + default_jobs: '1' + name: '@Apocalyptic/ModuleBuildTiny' + version: '0.008' + - + class: Dist::Zilla::Plugin::MakeMaker::Fallback + config: + Dist::Zilla::Role::TestRunner: + default_jobs: '1' + name: '@Apocalyptic/MakeMaker::Fallback' + version: '0.014' - class: Dist::Zilla::Plugin::MetaYAML name: '@Apocalyptic/MetaYAML' - version: 4.200005 + version: '5.024' - class: Dist::Zilla::Plugin::MetaJSON name: '@Apocalyptic/MetaJSON' - version: 4.200005 - - - class: Dist::Zilla::Plugin::ReadmeFromPod - name: '@Apocalyptic/ReadmeFromPod' - version: 0.14 + version: '5.024' - class: Dist::Zilla::Plugin::InstallGuide name: '@Apocalyptic/InstallGuide' - version: 1.101461 + version: '1.200005' + - + class: Dist::Zilla::Plugin::DOAP + name: '@Apocalyptic/DOAP' + version: '0.003' + - + class: Dist::Zilla::Plugin::Covenant + name: '@Apocalyptic/Covenant' + version: 0.1.0 + - + class: Dist::Zilla::Plugin::CPANFile + name: '@Apocalyptic/CPANFile' + version: '5.024' + - + class: Dist::Zilla::Plugin::ReadmeAnyFromPod + name: '@Apocalyptic/ReadmeAnyFromPod' + version: '0.142470' + - + class: Dist::Zilla::Plugin::ReadmeAnyFromPod + name: '@Apocalyptic/pod for github' + version: '0.142470' + - + class: Dist::Zilla::Plugin::ChangeStats::Git + name: '@Apocalyptic/ChangeStats::Git' + version: 0.3.0 - class: Dist::Zilla::Plugin::Signature name: '@Apocalyptic/Signature' - version: 1.100930 + version: '1.100930' - class: Dist::Zilla::Plugin::Manifest name: '@Apocalyptic/Manifest' - version: 4.200005 + version: '5.024' - class: Dist::Zilla::Plugin::CheckChangesHasContent name: '@Apocalyptic/CheckChangesHasContent' - version: 0.003 + version: '0.007' - class: Dist::Zilla::Plugin::Git::Check + config: + Dist::Zilla::Plugin::Git::Check: + untracked_files: die + Dist::Zilla::Role::Git::DirtyFiles: + allow_dirty: + - README.pod + - Changes + allow_dirty_match: [] + changelog: Changes + Dist::Zilla::Role::Git::Repo: + repo_root: . name: '@Apocalyptic/Git::Check' - version: 1.110500 + version: '2.025' + - + class: Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch + config: + Dist::Zilla::Role::Git::Repo: + repo_root: . + name: '@Apocalyptic/Git::CheckFor::CorrectBranch' + version: '0.011' + - + class: Dist::Zilla::Plugin::Git::CheckFor::MergeConflicts + config: + Dist::Zilla::Role::Git::Repo: + repo_root: . + name: '@Apocalyptic/Git::CheckFor::MergeConflicts' + version: '0.011' + - + class: Dist::Zilla::Plugin::Git::Remote::Check + name: '@Apocalyptic/Git::Remote::Check' + version: 0.1.2 + - + class: Dist::Zilla::Plugin::PromptIfStale + config: + Dist::Zilla::Plugin::PromptIfStale: + check_all_plugins: '1' + check_all_prereqs: '1' + modules: [] + phase: release + skip: [] + name: '@Apocalyptic/PromptIfStale' + version: '0.029' - class: Dist::Zilla::Plugin::TestRelease name: '@Apocalyptic/TestRelease' - version: 4.200005 + version: '5.024' + - + class: Dist::Zilla::Plugin::CheckPrereqsIndexed + name: '@Apocalyptic/CheckPrereqsIndexed' + version: '0.012' + - + class: Dist::Zilla::Plugin::CheckSelfDependency + config: + Dist::Zilla::Plugin::CheckSelfDependency: + finder: + - ':InstallModules' + name: '@Apocalyptic/CheckSelfDependency' + version: '0.007' + - + class: Dist::Zilla::Plugin::CheckIssues + name: '@Apocalyptic/CheckIssues' + version: '0.004' - class: Dist::Zilla::Plugin::ConfirmRelease name: '@Apocalyptic/ConfirmRelease' - version: 4.200005 + version: '5.024' - class: Dist::Zilla::Plugin::UploadToCPAN name: '@Apocalyptic/UploadToCPAN' - version: 4.200005 + version: '5.024' - class: Dist::Zilla::Plugin::ArchiveRelease name: '@Apocalyptic/ArchiveRelease' - version: 3.01 + version: '4.00' - class: Dist::Zilla::Plugin::Git::Commit + config: + Dist::Zilla::Plugin::Git::Commit: + add_files_in: + - releases + commit_msg: 'New CPAN release of %N - v%v%n%n%c' + time_zone: UTC + Dist::Zilla::Role::Git::DirtyFiles: + allow_dirty: + - README.pod + - Changes + allow_dirty_match: [] + changelog: Changes + Dist::Zilla::Role::Git::Repo: + repo_root: . name: '@Apocalyptic/Git::Commit' - version: 1.110500 + version: '2.025' - class: Dist::Zilla::Plugin::Git::Tag + config: + Dist::Zilla::Plugin::Git::Tag: + branch: ~ + signed: '0' + tag: release-1.012 + tag_format: release-%v + tag_message: 'Tagged release-%v' + time_zone: local + Dist::Zilla::Role::Git::Repo: + repo_root: . name: '@Apocalyptic/Git::Tag' - version: 1.110500 + version: '2.025' - class: Dist::Zilla::Plugin::Git::Push + config: + Dist::Zilla::Plugin::Git::Push: + push_to: + - origin + - bitbucket + remotes_must_exist: '1' + Dist::Zilla::Role::Git::Repo: + repo_root: . name: '@Apocalyptic/Git::Push' - version: 1.110500 + version: '2.025' + - + class: Dist::Zilla::Plugin::GitHub::Update + name: '@Apocalyptic/GitHub::Update' + version: '0.38' + - + class: Dist::Zilla::Plugin::Bitbucket::Update + name: '@Apocalyptic/Bitbucket::Update' + version: '0.001' + - + class: Dist::Zilla::Plugin::Clean + name: '@Apocalyptic/Clean' + version: '0.07' + - + class: Dist::Zilla::Plugin::SchwartzRatio + name: '@Apocalyptic/SchwartzRatio' + version: 0.2.0 - class: Dist::Zilla::Plugin::FinderCode name: ':InstallModules' - version: 4.200005 + version: '5.024' + - + class: Dist::Zilla::Plugin::FinderCode + name: ':IncModules' + version: '5.024' - class: Dist::Zilla::Plugin::FinderCode name: ':TestFiles' - version: 4.200005 + version: '5.024' - class: Dist::Zilla::Plugin::FinderCode name: ':ExecFiles' - version: 4.200005 + version: '5.024' - class: Dist::Zilla::Plugin::FinderCode name: ':ShareFiles' - version: 4.200005 + version: '5.024' + - + class: Dist::Zilla::Plugin::FinderCode + name: ':MainModule' + version: '5.024' + - + class: Dist::Zilla::Plugin::FinderCode + name: ':AllFiles' + version: '5.024' + - + class: Dist::Zilla::Plugin::FinderCode + name: ':NoFiles' + version: '5.024' + - + class: Dist::Zilla::Plugin::VerifyPhases + name: '@Apocalyptic/VerifyPhases' + version: '0.006' + - + class: Dist::Zilla::Plugin::FinderCode + name: '@Apocalyptic/MetaProvides::Package/AUTOVIV/:InstallModulesPM' + version: '5.024' zilla: class: Dist::Zilla::Dist::Builder config: - is_trial: 0 - version: 4.200005 + is_trial: '0' + version: '5.024' +x_IRC: + url: irc://irc.perl.org/#perl-help + web: https://chat.mibbit.com/?channel=%23perl-help&server=irc.perl.org +x_author_pledge: + version: '1' x_authority: cpan:APOCAL diff -Nru libpoe-component-sslify-perl-1.008/README libpoe-component-sslify-perl-1.012/README --- libpoe-component-sslify-perl-1.008/README 2011-05-04 21:55:38.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/README 2014-11-14 20:20:01.000000000 +0000 @@ -1,18 +1,29 @@ NAME + POE::Component::SSLify - Makes using SSL in the world of POE easy! VERSION - This document describes v1.008 of POE::Component::SSLify - released May 04, 2011 as part of POE-Component-SSLify. + + This document describes v1.012 of POE::Component::SSLify - released November 14, 2014 as part of POE-Component-SSLify. SYNOPSIS - # CLIENT-side usage + + # look at the DESCRIPTION for client and server example code + +DESCRIPTION + + This component is a method to simplify the SSLification of a socket + before it is passed to a POE::Wheel::ReadWrite wheel in your + application. + + Client usage # Import the module use POE::Component::SSLify qw( Client_SSLify ); - + # Create a normal SocketFactory wheel and connect to a SSL-enabled server my $factory = POE::Wheel::SocketFactory->new; - + # Time passes, SocketFactory gives you a socket when it connects in SuccessEvent # Convert the socket into a SSL socket POE can communicate with my $socket = shift; @@ -20,32 +31,30 @@ if ( $@ ) { # Unable to SSLify it... } - + # Now, hand it off to ReadWrite my $rw = POE::Wheel::ReadWrite->new( Handle => $socket, # other options as usual ); - # --------------------------------------------------------------------------- # - - # SERVER-side usage + Server usage # !!! Make sure you have a public key + certificate # excellent howto: http://www.akadia.com/services/ssh_test_certificate.html - + # Import the module use POE::Component::SSLify qw( Server_SSLify SSLify_Options ); - + # Set the key + certificate file eval { SSLify_Options( 'server.key', 'server.crt' ) }; if ( $@ ) { # Unable to load key or certificate file... } - + # Create a normal SocketFactory wheel to listen for connections my $factory = POE::Wheel::SocketFactory->new; - + # Time passes, SocketFactory gives you a socket when it gets a connection in SuccessEvent # Convert the socket into a SSL socket POE can communicate with my $socket = shift; @@ -53,18 +62,17 @@ if ( $@ ) { # Unable to SSLify it... } - + # Now, hand it off to ReadWrite my $rw = POE::Wheel::ReadWrite->new( Handle => $socket, # other options as usual ); -DESCRIPTION - This component represents the standard way to do SSL in POE. - FUNCTIONS - Client_SSLify + + Client_SSLify + This function sslifies a client-side socket. You can pass several options to it: @@ -75,7 +83,7 @@ $options is the SSL options you want to use $ctx is the custom SSL context you want to use $callback is the callback hook on success/failure of sslification - + # This is an example of the callback and you should pass it as Client_SSLify( $socket, ... , \&callback ); sub callback { my( $socket, $status, $errval ) = @_; @@ -83,14 +91,14 @@ # $status is either 1 or 0; with 1 signifying success and 0 failure # $errval will be defined if $status == 0; it's the numeric SSL error code # check http://www.openssl.org/docs/ssl/SSL_get_error.html for the possible error values ( and import them from Net::SSLeay! ) - + # The return value from the callback is discarded } - If $ctx is defined, SSLify will ignore $version and $options. Otherwise, - it will be created from the $version and $options parameters. If all of - them are undefined, it will follow the defaults in - "SSLify_ContextCreate". + If $ctx is defined, SSLify will ignore $version and $options. + Otherwise, it will be created from the $version and $options + parameters. If all of them are undefined, it will follow the defaults + in "SSLify_ContextCreate". BEWARE: If you passed in a CTX, SSLify will do Net::SSLeay::CTX_free( $ctx ) when the socket is destroyed. This means you cannot reuse @@ -117,12 +125,12 @@ ); return; } - + # the callback event sub event_sslify_result { my ($creation_args, $called_args) = @_[ARG0, ARG1]; my( $socket, $status, $errval ) = @$called_args; - + if ( $status ) { print "Yay, SSLification worked!"; } else { @@ -130,7 +138,8 @@ } } - Server_SSLify + Server_SSLify + This function sslifies a server-side socket. You can pass several options to it: @@ -153,9 +162,10 @@ Please look at "Client_SSLify" for more details on the callback hook. - SSLify_ContextCreate - Accepts some options, and returns a brand-new Net::SSLeay context object - ( $ctx ) + SSLify_ContextCreate + + Accepts some options, and returns a brand-new Net::SSLeay context + object ( $ctx ) my $ctx = SSLify_ContextCreate( $key, $cert, $version, $options ); $key is the certificate key file @@ -170,7 +180,7 @@ By default we don't use the SSL key + certificate files By default we use the version: default. Known versions of the SSL - connection - look at + connection - look at http://www.openssl.org/docs/ssl/SSL_CTX_new.html for more info. * sslv2 @@ -180,10 +190,10 @@ * default ( sslv23 ) By default we don't set any options - look at - for more - info. + http://www.openssl.org/docs/ssl/SSL_CTX_set_options.html for more info. + + SSLify_Options - SSLify_Options Call this function to initialize the global server-side context object. This will be the default context whenever you call "Server_SSLify" without passing a custom context to it. @@ -201,9 +211,10 @@ Please look at "SSLify_ContextCreate" for more info on the available versions/options. - SSLify_GetCTX - Returns the actual Net::SSLeay context object in case you wanted to play - with it :) + SSLify_GetCTX + + Returns the actual Net::SSLeay context object in case you wanted to + play with it :) If passed in a socket, it will return that socket's $ctx instead of the global. @@ -211,15 +222,16 @@ my $ctx = SSLify_GetCTX(); # get the one set via SSLify_Options my $ctx = SSLify_GetCTX( $sslified_sock ); # get the one in the object - SSLify_GetCipher + SSLify_GetCipher + Returns the cipher used by the SSLified socket print "SSL Cipher is: " . SSLify_GetCipher( $sslified_sock ) . "\n"; NOTE: Doing this immediately after Client_SSLify or Server_SSLify will - result in "(NONE)" because the SSL handshake is not done yet. The socket - is nonblocking, so you will have to wait a little bit for it to get - ready. + result in "(NONE)" because the SSL handshake is not done yet. The + socket is nonblocking, so you will have to wait a little bit for it to + get ready. apoc@blackhole:~/mygit/perl-poe-sslify/examples$ perl serverclient.pl got connection from: 127.0.0.1 - commencing Server_SSLify() @@ -233,21 +245,24 @@ Input: ^C stopped at serverclient.pl line 126. - SSLify_GetSocket + SSLify_GetSocket + Returns the actual socket used by the SSLified socket, useful for stuff like getpeername()/getsockname() print "Remote IP is: " . inet_ntoa( ( unpack_sockaddr_in( getpeername( SSLify_GetSocket( $sslified_sock ) ) ) )[1] ) . "\n"; - SSLify_GetSSL + SSLify_GetSSL + Returns the actual Net::SSLeay object so you can call methods on it print Net::SSLeay::dump_peer_certificate( SSLify_GetSSL( $sslified_sock ) ); - SSLify_GetStatus + SSLify_GetStatus + Returns the status of the SSL negotiation/handshake/connection. See - for - more info. + http://www.openssl.org/docs/ssl/SSL_connect.html#RETURN_VALUES for more + info. my $status = SSLify_GetStatus( $socket ); -1 = still in negotiation stage ( or error ) @@ -255,16 +270,19 @@ 1 = negotiation successful NOTES - Socket methods doesn't work + + Socket methods doesn't work + The new socket this module gives you actually is tied socket magic, so - you cannot do stuff like getpeername() or getsockname(). The only way to - do it is to use "SSLify_GetSocket" and then operate on the socket it + you cannot do stuff like getpeername() or getsockname(). The only way + to do it is to use "SSLify_GetSocket" and then operate on the socket it returns. - Dying everywhere... + Dying everywhere... + This module will die() if Net::SSLeay could not be loaded or it is not - the version we want. So, it is recommended that you check for errors and - not use SSL, like so: + the version we want. So, it is recommended that you check for errors + and not use SSL, like so: eval { use POE::Component::SSLify }; if ( $@ ) { @@ -272,7 +290,7 @@ } else { $sslavailable = 1; } - + # Make socket SSL! if ( $sslavailable ) { eval { $socket = POE::Component::SSLify::Client_SSLify( $socket ) }; @@ -281,11 +299,13 @@ } } - $IGNORE_SSL_ERRORS - 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 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. Here's an example: + $IGNORE_SSL_ERRORS + + 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 + 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. Here's an + example: { local $POE::Component::SSLify::IGNORE_SSL_ERRORS=1; @@ -293,40 +313,48 @@ #Some more stuff } - OpenSSL functions + OpenSSL functions + Theoretically you can do anything that Net::SSLeay exports from the OpenSSL libs on the socket. However, I have not tested every possible function against SSLify, so use them carefully! - Net::SSLeay::renegotiate - This function has been tested ( it's in "t/2_renegotiate_client.t" ) but - it doesn't work on FreeBSD! I tracked it down to this security advisory: - which + Net::SSLeay::renegotiate + + This function has been tested ( it's in t/2_renegotiate_client.t ) but + it doesn't work on FreeBSD! I tracked it down to this security + advisory: + http://security.freebsd.org/advisories/FreeBSD-SA-09:15.ssl.asc which explains it in detail. The test will skip this function 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. + that you're on a broken system. However, if you have the updated + OpenSSL library that fixes this you can use it. NOTE: Calling this means the callback function you passed in "Client_SSLify" or "Server_SSLify" will not fire! If you need this please let me know and we can come up with a way to make it work. - Upgrading a non-ssl socket to SSL + Upgrading a non-ssl socket to SSL + 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 at - the same time, or they will be waiting on each other forever! See - "t/3_upgrade.t" for an example of how this works. + Just keep in mind that the client and the server must agree to sslify + at the same time, or they will be waiting on each other forever! See + t/3_upgrade.t for an example of how this works. + + Downgrading a SSL socket to non-ssl - Downgrading a SSL socket to non-ssl As of now this is unsupported. If you need this feature please let us know and we'll work on it together! - MSWin32 is not supported - 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 - 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! + MSWin32 is not supported + + 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 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! + + LOAD_SSL_ENGINES - LOAD_SSL_ENGINES OpenSSL supports loading ENGINEs to accelerate the crypto algorithms. SSLify v1.004 automatically loaded the engines, but there was some problems on certain platforms that caused coredumps. A big shout-out to @@ -337,141 +365,158 @@ use POE::Component::SSLify qw( Client::SSLify ); EXPORT + Stuffs all of the functions in @EXPORT_OK so you have to request them directly. SEE ALSO + Please see those modules/websites for more information related to this module. - * POE + * POE - * Net::SSLeay + * Net::SSLeay SUPPORT - Perldoc + + Perldoc + You can find documentation for this module with the perldoc command. perldoc POE::Component::SSLify - Websites + Websites + The following websites have more information about this module, and may be of help to you. As always, in addition to those websites please use your favorite search engine to discover more resources. - * Search CPAN + * MetaCPAN + + A modern, open-source CPAN search engine, useful to view POD in HTML + format. - The default CPAN search engine, useful to view POD in HTML format. + http://metacpan.org/release/POE-Component-SSLify - + * Search CPAN - * RT: CPAN's Bug Tracker + The default CPAN search engine, useful to view POD in HTML format. - The RT ( Request Tracker ) website is the default bug/issue tracking - system for CPAN. + http://search.cpan.org/dist/POE-Component-SSLify - + * RT: CPAN's Bug Tracker - * AnnoCPAN + The RT ( Request Tracker ) website is the default bug/issue tracking + system for CPAN. - The AnnoCPAN is a website that allows community annonations of Perl - module documentation. + http://rt.cpan.org/NoAuth/Bugs.html?Dist=POE-Component-SSLify - + * AnnoCPAN - * CPAN Ratings + The AnnoCPAN is a website that allows community annotations of Perl + module documentation. - The CPAN Ratings is a website that allows community ratings and - reviews of Perl modules. + http://annocpan.org/dist/POE-Component-SSLify - + * CPAN Ratings - * CPAN Forum + The CPAN Ratings is a website that allows community ratings and + reviews of Perl modules. - The CPAN Forum is a web forum for discussing Perl modules. + http://cpanratings.perl.org/d/POE-Component-SSLify - + * CPAN Forum - * CPANTS + The CPAN Forum is a web forum for discussing Perl modules. - The CPANTS is a website that analyzes the Kwalitee ( code metrics ) - of a distribution. + http://cpanforum.com/dist/POE-Component-SSLify - + * CPANTS - * CPAN Testers + The CPANTS is a website that analyzes the Kwalitee ( code metrics ) + of a distribution. - The CPAN Testers is a network of smokers who run automated tests on - uploaded CPAN distributions. + http://cpants.cpanauthors.org/dist/overview/POE-Component-SSLify - + * CPAN Testers - * CPAN Testers Matrix + The CPAN Testers is a network of smokers who run automated tests on + uploaded CPAN distributions. - The CPAN Testers Matrix is a website that provides a visual way to - determine what Perls/platforms PASSed for a distribution. + http://www.cpantesters.org/distro/P/POE-Component-SSLify - + * CPAN Testers Matrix - * CPAN Testers Dependencies + The CPAN Testers Matrix is a website that provides a visual overview + of the test results for a distribution on various Perls/platforms. - The CPAN Testers Dependencies is a website that shows a chart of the - test results of all dependencies for a distribution. + http://matrix.cpantesters.org/?dist=POE-Component-SSLify - + * CPAN Testers Dependencies - Email - You can email the author of this module at "APOCAL at cpan.org" asking + The CPAN Testers Dependencies is a website that shows a chart of the + test results of all dependencies for a distribution. + + http://deps.cpantesters.org/?module=POE::Component::SSLify + + Email + + You can email the author of this module at APOCAL at cpan.org asking for help with any problems you have. - Internet Relay Chat - You can get live help by using IRC ( Internet Relay Chat ). If you don't - know what IRC is, please read this excellent guide: - . Please be courteous - and patient when talking to us, as we might be busy or sleeping! You can - join those networks/channels and get help: + Internet Relay Chat + + You can get live help by using IRC ( Internet Relay Chat ). If you + don't know what IRC is, please read this excellent guide: + http://en.wikipedia.org/wiki/Internet_Relay_Chat. Please be courteous + and patient when talking to us, as we might be busy or sleeping! You + can join those networks/channels and get help: - * irc.perl.org + * irc.perl.org - You can connect to the server at 'irc.perl.org' and join this - channel: #perl-help then talk to this person for help: Apocalypse. + You can connect to the server at 'irc.perl.org' and join this + channel: #perl-help then talk to this person for help: Apocalypse. - * irc.freenode.net + * irc.freenode.net - You can connect to the server at 'irc.freenode.net' and join this - channel: #perl then talk to this person for help: Apocal. + You can connect to the server at 'irc.freenode.net' and join this + channel: #perl then talk to this person for help: Apocal. - * irc.efnet.org + * irc.efnet.org - You can connect to the server at 'irc.efnet.org' and join this - channel: #perl then talk to this person for help: Ap0cal. + You can connect to the server at 'irc.efnet.org' and join this + channel: #perl then talk to this person for help: Ap0cal. + + Bugs / Feature Requests - Bugs / Feature Requests Please report any bugs or feature requests by email to - "bug-poe-component-sslify at rt.cpan.org", or through the web interface - at - . - You will be automatically notified of any progress on the request by the - system. + bug-poe-component-sslify at rt.cpan.org, or through the web interface + at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=POE-Component-SSLify. + You will be automatically notified of any progress on the request by + the system. + + Source Code - Source Code The code is open to the world, and available for you to hack on. Please feel free to browse it and play with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull from your repository :) - + https://github.com/apocalypse/perl-poe-sslify - git clone git://github.com/apocalypse/perl-poe-sslify.git + git clone https://github.com/apocalypse/perl-poe-sslify.git AUTHOR + Apocalypse ACKNOWLEDGEMENTS + Original code is entirely Rocco Caputo ( Creator of POE ) -> I simply packaged up the code into something everyone could use and accepted the burden of maintaining it :) - + From the PoCo::Client::HTTP code =] # This code should probably become a POE::Kernel method, # seeing as it's rather baroque and potentially useful in a number @@ -484,7 +529,8 @@ the changelog for more detail. COPYRIGHT AND LICENSE - This software is copyright (c) 2011 by Apocalypse. + + This software is copyright (c) 2014 by Apocalypse. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. @@ -493,24 +539,23 @@ with this distribution. DISCLAIMER OF WARRANTY - BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY - FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN - OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES - PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER - EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE - ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH - YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL - NECESSARY SERVICING, REPAIR, OR CORRECTION. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY + APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT + HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT + WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE + OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU + ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING - WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR - REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE - TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR - CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE - SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING - RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A - FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF - SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH - DAMAGES. + WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR + CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, + INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES + ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT + NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES + SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO + OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY + HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. diff -Nru libpoe-component-sslify-perl-1.008/SIGNATURE libpoe-component-sslify-perl-1.012/SIGNATURE --- libpoe-component-sslify-perl-1.008/SIGNATURE 2011-05-04 21:55:38.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/SIGNATURE 2014-11-14 20:20:01.000000000 +0000 @@ -1,5 +1,5 @@ This file contains message digests of all files listed in MANIFEST, -signed via the Module::Signature module, version 0.66. +signed via the Module::Signature module, version 0.73. To verify the content in this distribution, first make sure you have Module::Signature installed, then type: @@ -14,43 +14,53 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 -SHA1 db814b600c64a9dbf43916f952d61724c9cb5629 Build.PL -SHA1 6f3f477a7be6adda1715f4f6232d1c23f1b0c73a Changes -SHA1 6a0020176172c6097eb86b34ef42014654df64f3 CommitLog -SHA1 e3edc44697d1770c65fec99f6ebdb6ea55fb3050 INSTALL -SHA1 263360e99a0de4d587fedefe1a919dcf61af1d10 LICENSE -SHA1 3117aae7a178cf1a5ef1c6fbbd9af19a36462dbc MANIFEST -SHA1 9dfc07c5655b958e800189837f3ddd37ca050bfe MANIFEST.SKIP -SHA1 e248fce45784dc1e74a6632ae73dab4408806755 META.json -SHA1 b7979650243be1fb48f457c7f3ad7ec6ee9fd424 META.yml -SHA1 88399f5f9ea5f4cff1f2899fde9b6434fa6525fb Makefile.PL -SHA1 013286bba5f5a9bdbefd457b13cb150f53c87711 README +SHA1 427e6e41b255d709de381b943da559e76480ef19 AUTHOR_PLEDGE +SHA1 45bfb1662ceb2f539b7a84e8a83c63ac74e4b112 Build.PL +SHA1 b7bce2ca389897293c272733fdddd18e620b7c7d Changes +SHA1 a86ef10da1561a868fb7eec3aeb2931f69835fea CommitLog +SHA1 b75af39c9fe42eaafb41179a5848d50323b92b6c INSTALL +SHA1 e6514e4bc5abd3d1a8c7bd2a782c2f8737b413e7 LICENSE +SHA1 751a1dbea35cb81ab2d14f6afa7c5e1013d85379 MANIFEST +SHA1 69b8a0accb85effa4bd5f4ea93e4f2386d10ac8b MANIFEST.SKIP +SHA1 18ccc7e7ef8eeeb5aae26e3fb6bac1dca6b80533 META.json +SHA1 105d53c413f245dff657ba0f36bcbc442ae6b912 META.yml +SHA1 f0cd277fa23c2796786f34caab90778c74adec80 Makefile.PL +SHA1 02145222e7316163bab8ce9b886b1348f4f380fc README +SHA1 d20aeaa271c3d6abe4a55112b6197a0d78b44257 cpanfile SHA1 41a5da1356107d097f6bbf72c62ee4da83e4119f dist.ini -SHA1 96decb1c51052f9b024b6d069e428b4ccc19e909 examples/client.pl -SHA1 d8f9b44df461cdcf6cbd7cffd79a9d49aade3947 examples/server.pl -SHA1 c4a936c75d1d566e936dfb1776c9a01ea244c618 examples/serverclient.pl -SHA1 7c470b55e86d0fc80ca4b60ba3dfb0ab1781591d lib/POE/Component/SSLify.pm -SHA1 ee5c6b2eb8109cc96d9f60c2eb993da305f959cf lib/POE/Component/SSLify/ClientHandle.pm -SHA1 9ee769ea86ff4ad984bfba8c643e74cc0bcfaaba lib/POE/Component/SSLify/ServerHandle.pm +SHA1 9ca4ef12f3325b2fbcd3847a30066bd22fea1acb doap.xml +SHA1 7f8e80e0f34831ee62d37236e72d14ff994517f6 examples/client.pl +SHA1 e9802b791af652351422884f5899a07bb84ef2ec examples/server.pl +SHA1 a7fd612bed4ef287fe7820ce86f56d6a4a8ea43b examples/serverclient.pl +SHA1 2f80c76a50a07e5fffaff3c9ace7b9b60f8ac5fd lib/POE/Component/SSLify.pm +SHA1 e2bd7e88034f6ec148855d0f65f6a82f88ba9c73 lib/POE/Component/SSLify/ClientHandle.pm +SHA1 1c6f932e367fe9b910af853e85a79e850fb27eaa lib/POE/Component/SSLify/ServerHandle.pm SHA1 59afa28f138a14b956443f915d60a891d5b306b8 mylib/example.crt SHA1 f2ba02d28cfb207e0a86be7cb4f3c570f257bf93 mylib/example.key -SHA1 fd48b12e3df15fb55695e7d1b4ee95dc3c0cd766 t/00-compile.t -SHA1 4788d9aa069d03cc4c94ef15e11e8a0e0527561c t/000-report-versions-tiny.t -SHA1 9ade9d7296a3511f42ce3010dd7d215630d51c80 t/1_simple.t -SHA1 949de479ef156e3845bf64adb21a9556af0420a6 t/2_renegotiate_client.t -SHA1 73790060e55b0189540d898a97c485e187f05ae9 t/3_upgrade.t -SHA1 3c6e64d27262d54d7b31c2d4f2e65f5d6cab87cf t/4_connect_hook.t -SHA1 520cb166745d10fa749372ce686240dafd0da543 t/5_connfail_client.t -SHA1 295f221b5001822ac23244030fb1b8be1bd838e8 t/6_connfail_server.t -SHA1 156f6b65482911b3be5c8f3ce8c07071c5308d1b t/7_connect_hook_nodata.t -SHA1 377a10c6d96cd1a23922526c44c43cd723dafcfd t/8_renegotiate_server.t -SHA1 5bb02868a0a8d995272800bc945f6db2669d291e t/98_renegotiate.t -SHA1 8f73eec992bcb37639f49945d986ff5a59a1ca36 t/99_mire_test.t -SHA1 e3b390873d4de642e25fcfb4b7d16c00b096d24a t/apocalypse.t +SHA1 36b0e0fc225ff13e639e9a11671ea67e3179fcd8 t/00-compile.t +SHA1 8b29673d89e159edc8a2e01ec6927b6119837b08 t/00-report-prereqs.dd +SHA1 0f795aaaadd9edd61eb9ad9933f443802b6f77c3 t/00-report-prereqs.t +SHA1 1cf17c9c22e93bf1577f02450a568c61212f03f2 t/00-ssleay-info.t +SHA1 17a2d0baef2231e391c26517ee3f919827b9fdfb t/99_mire_test.t +SHA1 a42f89f63552797bf82457d864affdb5c74ff000 t/apocalypse.t +SHA1 f0488f2a7600b6a56261387f1b2554a859f4bd8f t/connect_hook.t +SHA1 b1018a80aec2289255d9620e740335c8cf6355af t/connect_hook_nodata.t +SHA1 61c6dc760d6ba8f3c0672cd37c5326796592f340 t/connfail_client.t +SHA1 a93284eec5af5e074cabc2499e2151e9f05b2d85 t/connfail_server.t +SHA1 6c177f33cdf46a2b9b2e3e348c78566cea7b7fd6 t/renegotiate_client.t +SHA1 4382dd4d3340057e840fdf2a2ab65c2d6d1a61b4 t/renegotiate_client_pings.t +SHA1 0c29c30bee832d33b4af6b71e5caa812b9e8004c t/renegotiate_server.t +SHA1 cdb3bcc592ea5775b06474c82bc3ff58c812c47d t/simple.t +SHA1 c88eae9b29402c0f3cc59a4e9e6e9a192f114585 t/simple_large.t +SHA1 5db5fb734853185c1b66d98aad41181e071803df t/simple_parallel.t +SHA1 2ccf516fbfa01550546426b560bd9009ef947221 t/simple_parallel_large.t +SHA1 23dca4da565c773cd934714add8781822771f6fb t/simple_parallel_superbig.t +SHA1 45a15084faaa845989f038b8f2e6b4242b570b45 t/simple_superbig.t +SHA1 a2983a2e0b87fc1c4d220f5bf52e7bede374f130 t/upgrade.t -----BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.9 (GNU/Linux) +Version: GnuPG v1 -iEYEARECAAYFAk3By1oACgkQGfr7vsGKgxx47ACfTzDqglDL4xb266x3RMOBG3AJ -xj0AoNyF1h2KqHOYNVVImQmGy6UIw8D5 -=qxVp +iEYEARECAAYFAlRmY/EACgkQGfr7vsGKgxwVbwCg1jqDFkbib8f3MCrMsCVrqB1E +fFcAoL/1YQl9RjHzzm9Jizzs2Sc5zgbd +=KGeN -----END PGP SIGNATURE----- diff -Nru libpoe-component-sslify-perl-1.008/t/000-report-versions-tiny.t libpoe-component-sslify-perl-1.012/t/000-report-versions-tiny.t --- libpoe-component-sslify-perl-1.008/t/000-report-versions-tiny.t 2011-05-04 21:55:38.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/t/000-report-versions-tiny.t 1970-01-01 00:00:00.000000000 +0000 @@ -1,88 +0,0 @@ -use strict; -use warnings; -use Test::More 0.88; -# This is a relatively nice way to avoid Test::NoWarnings breaking our -# expectations by adding extra tests, without using no_plan. It also helps -# avoid any other test module that feels introducing random tests, or even -# test plans, is a nice idea. -our $success = 0; -END { $success && done_testing; } - -my $v = "\n"; - -# List our own version used to generate this -$v .= "Generated by Dist::Zilla::Plugin::ReportVersions::Tiny v1.03\n"; - -eval { # no excuses! - # report our Perl details - my $want = '5.006'; - my $pv = ($^V || $]); - $v .= "perl: $pv (wanted $want) on $^O from $^X\n\n"; -}; -defined($@) and diag("$@"); - -# Now, our module version dependencies: -sub pmver { - my ($module, $wanted) = @_; - $wanted = " (want $wanted)"; - my $pmver; - eval "require $module;"; - if ($@) { - if ($@ =~ m/Can't locate .* in \@INC/) { - $pmver = 'module not found.'; - } else { - diag("${module}: $@"); - $pmver = 'died during require.'; - } - } else { - my $version; - eval { $version = $module->VERSION; }; - if ($@) { - diag("${module}: $@"); - $pmver = 'died during VERSION check.'; - } elsif (defined $version) { - $pmver = "$version"; - } else { - $pmver = ''; - } - } - - # So, we should be good, right? - return sprintf('%-45s => %-10s%-15s%s', $module, $pmver, $wanted, "\n"); -} - -eval { $v .= pmver('Exporter','any version') }; -eval { $v .= pmver('File::Find','any version') }; -eval { $v .= pmver('File::Temp','any version') }; -eval { $v .= pmver('IO::Handle','1.28') }; -eval { $v .= pmver('Module::Build','0.3601') }; -eval { $v .= pmver('Net::SSLeay','1.36') }; -eval { $v .= pmver('POE','1.267') }; -eval { $v .= pmver('POE::Component::Client::TCP','any version') }; -eval { $v .= pmver('POE::Component::Server::TCP','any version') }; -eval { $v .= pmver('Scalar::Util','any version') }; -eval { $v .= pmver('Socket','any version') }; -eval { $v .= pmver('Symbol','any version') }; -eval { $v .= pmver('Task::Weaken','1.03') }; -eval { $v .= pmver('Test::More','0.88') }; -eval { $v .= pmver('parent','any version') }; - - - -# All done. -$v .= <<'EOT'; - -Thanks for using my code. I hope it works for you. -If not, please try and include this output in the bug report. -That will help me reproduce the issue and solve your problem. - -EOT - -diag($v); -ok(1, "we really didn't test anything, just reporting data"); -$success = 1; - -# Work around another nasty module on CPAN. :/ -no warnings 'once'; -$Template::Test::NO_FLUSH = 1; -exit 0; diff -Nru libpoe-component-sslify-perl-1.008/t/00-compile.t libpoe-component-sslify-perl-1.012/t/00-compile.t --- libpoe-component-sslify-perl-1.008/t/00-compile.t 2011-05-04 21:55:38.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/t/00-compile.t 2014-11-14 20:20:01.000000000 +0000 @@ -1,57 +1,56 @@ -#!perl -# -# This file is part of POE-Component-SSLify -# -# This software is copyright (c) 2011 by Apocalypse. -# -# This is free software; you can redistribute it and/or modify it under -# the same terms as the Perl 5 programming language system itself. -# -use strict; use warnings; - +use 5.006; use strict; use warnings; +# this test was generated with Dist::Zilla::Plugin::Test::Compile 2.051 + use Test::More; +plan tests => 3 + ($ENV{AUTHOR_TESTING} ? 1 : 0); +my @module_files = ( + 'POE/Component/SSLify.pm', + 'POE/Component/SSLify/ClientHandle.pm', + 'POE/Component/SSLify/ServerHandle.pm' +); -use File::Find; -use File::Temp qw{ tempdir }; -my @modules; -find( - sub { - return if $File::Find::name !~ /\.pm\z/; - my $found = $File::Find::name; - $found =~ s{^lib/}{}; - $found =~ s{[/\\]}{::}g; - $found =~ s/\.pm$//; - # nothing to skip - push @modules, $found; - }, - 'lib', -); -my @scripts = glob "bin/*"; +# fake home for cpan-testers +use File::Temp; +local $ENV{HOME} = File::Temp::tempdir( CLEANUP => 1 ); -my $plan = scalar(@modules) + scalar(@scripts); -$plan ? (plan tests => $plan) : (plan skip_all => "no tests to run"); -{ - # fake home for cpan-testers - local $ENV{HOME} = tempdir( CLEANUP => 1 ); +my $inc_switch = -d 'blib' ? '-Mblib' : '-Ilib'; + +use File::Spec; +use IPC::Open3; +use IO::Handle; - like( qx{ $^X -Ilib -e "require $_; print '$_ ok'" }, qr/^\s*$_ ok/s, "$_ loaded ok" ) - for sort @modules; +open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!"; - SKIP: { - eval "use Test::Script 1.05; 1;"; - skip "Test::Script needed to test script compilation", scalar(@scripts) if $@; - foreach my $file ( @scripts ) { - my $script = $file; - $script =~ s!.*/!!; - script_compiles( $file, "$script script compiles" ); - } +my @warnings; +for my $lib (@module_files) +{ + # see L + my $stderr = IO::Handle->new; + + my $pid = open3($stdin, '>&STDERR', $stderr, $^X, $inc_switch, '-e', "require q[$lib]"); + binmode $stderr, ':crlf' if $^O eq 'MSWin32'; + my @_warnings = <$stderr>; + waitpid($pid, 0); + is($?, 0, "$lib loaded ok"); + + if (@_warnings) + { + warn @_warnings; + push @warnings, @_warnings; } } + + + +is(scalar(@warnings), 0, 'no warnings found') + or diag 'got warnings: ', ( Test::More->can('explain') ? Test::More::explain(\@warnings) : join("\n", '', @warnings) ) if $ENV{AUTHOR_TESTING}; + + diff -Nru libpoe-component-sslify-perl-1.008/t/00-report-prereqs.dd libpoe-component-sslify-perl-1.012/t/00-report-prereqs.dd --- libpoe-component-sslify-perl-1.008/t/00-report-prereqs.dd 1970-01-01 00:00:00.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/t/00-report-prereqs.dd 2014-11-14 20:20:01.000000000 +0000 @@ -0,0 +1,46 @@ +do { my $x = { + 'configure' => { + 'requires' => { + 'ExtUtils::MakeMaker' => '0', + 'Module::Build::Tiny' => '0.039', + 'perl' => '5.006' + } + }, + 'runtime' => { + 'requires' => { + 'Exporter' => '0', + 'IO::Handle' => '1.28', + 'Net::SSLeay' => '1.36', + 'POE' => '1.267', + 'Scalar::Util' => '0', + 'Symbol' => '0', + 'Task::Weaken' => '1.03', + 'parent' => '0', + 'perl' => '5.006', + 'strict' => '0', + 'warnings' => '0' + } + }, + 'test' => { + 'recommends' => { + 'CPAN::Meta' => '2.120900' + }, + 'requires' => { + 'ExtUtils::MakeMaker' => '0', + 'File::Spec' => '0', + 'File::Temp' => '0', + 'IO::Handle' => '1.28', + 'IPC::Open3' => '0', + 'POE' => '1.267', + 'POE::Component::Client::TCP' => '0', + 'POE::Component::Server::TCP' => '0', + 'POE::Filter::Stream' => '0', + 'Socket' => '0', + 'Test::FailWarnings' => '0', + 'Test::More' => '1.001002', + 'perl' => '5.006' + } + } + }; + $x; + } \ No newline at end of file diff -Nru libpoe-component-sslify-perl-1.008/t/00-report-prereqs.t libpoe-component-sslify-perl-1.012/t/00-report-prereqs.t --- libpoe-component-sslify-perl-1.008/t/00-report-prereqs.t 1970-01-01 00:00:00.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/t/00-report-prereqs.t 2014-11-14 20:20:01.000000000 +0000 @@ -0,0 +1,185 @@ +#!perl +# +# This file is part of POE-Component-SSLify +# +# This software is copyright (c) 2014 by Apocalypse. +# +# This is free software; you can redistribute it and/or modify it under +# the same terms as the Perl 5 programming language system itself. +# +use strict; use warnings; + +use strict; +use warnings; + +# This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.019 + +use Test::More tests => 1; + +use ExtUtils::MakeMaker; +use File::Spec; + +# from $version::LAX +my $lax_version_re = + qr/(?: undef | (?: (?:[0-9]+) (?: \. | (?:\.[0-9]+) (?:_[0-9]+)? )? + | + (?:\.[0-9]+) (?:_[0-9]+)? + ) | (?: + v (?:[0-9]+) (?: (?:\.[0-9]+)+ (?:_[0-9]+)? )? + | + (?:[0-9]+)? (?:\.[0-9]+){2,} (?:_[0-9]+)? + ) + )/x; + +# hide optional CPAN::Meta modules from prereq scanner +# and check if they are available +my $cpan_meta = "CPAN::Meta"; +my $cpan_meta_pre = "CPAN::Meta::Prereqs"; +my $HAS_CPAN_META = eval "require $cpan_meta; $cpan_meta->VERSION('2.120900')" && eval "require $cpan_meta_pre"; ## no critic + +# Verify requirements? +my $DO_VERIFY_PREREQS = 1; + +sub _max { + my $max = shift; + $max = ( $_ > $max ) ? $_ : $max for @_; + return $max; +} + +sub _merge_prereqs { + my ($collector, $prereqs) = @_; + + # CPAN::Meta::Prereqs object + if (ref $collector eq $cpan_meta_pre) { + return $collector->with_merged_prereqs( + CPAN::Meta::Prereqs->new( $prereqs ) + ); + } + + # Raw hashrefs + for my $phase ( keys %$prereqs ) { + for my $type ( keys %{ $prereqs->{$phase} } ) { + for my $module ( keys %{ $prereqs->{$phase}{$type} } ) { + $collector->{$phase}{$type}{$module} = $prereqs->{$phase}{$type}{$module}; + } + } + } + + return $collector; +} + +my @include = qw( + +); + +my @exclude = qw( + +); + +# Add static prereqs to the included modules list +my $static_prereqs = do 't/00-report-prereqs.dd'; + +# Merge all prereqs (either with ::Prereqs or a hashref) +my $full_prereqs = _merge_prereqs( + ( $HAS_CPAN_META ? $cpan_meta_pre->new : {} ), + $static_prereqs +); + +# Add dynamic prereqs to the included modules list (if we can) +my ($source) = grep { -f } 'MYMETA.json', 'MYMETA.yml'; +if ( $source && $HAS_CPAN_META ) { + if ( my $meta = eval { CPAN::Meta->load_file($source) } ) { + $full_prereqs = _merge_prereqs($full_prereqs, $meta->prereqs); + } +} +else { + $source = 'static metadata'; +} + +my @full_reports; +my @dep_errors; +my $req_hash = $HAS_CPAN_META ? $full_prereqs->as_string_hash : $full_prereqs; + +# Add static includes into a fake section +for my $mod (@include) { + $req_hash->{other}{modules}{$mod} = 0; +} + +for my $phase ( qw(configure build test runtime develop other) ) { + next unless $req_hash->{$phase}; + next if ($phase eq 'develop' and not $ENV{AUTHOR_TESTING}); + + for my $type ( qw(requires recommends suggests conflicts modules) ) { + next unless $req_hash->{$phase}{$type}; + + my $title = ucfirst($phase).' '.ucfirst($type); + my @reports = [qw/Module Want Have/]; + + for my $mod ( sort keys %{ $req_hash->{$phase}{$type} } ) { + next if $mod eq 'perl'; + next if grep { $_ eq $mod } @exclude; + + my $file = $mod; + $file =~ s{::}{/}g; + $file .= ".pm"; + my ($prefix) = grep { -e File::Spec->catfile($_, $file) } @INC; + + my $want = $req_hash->{$phase}{$type}{$mod}; + $want = "undef" unless defined $want; + $want = "any" if !$want && $want == 0; + + my $req_string = $want eq 'any' ? 'any version required' : "version '$want' required"; + + if ($prefix) { + my $have = MM->parse_version( File::Spec->catfile($prefix, $file) ); + $have = "undef" unless defined $have; + push @reports, [$mod, $want, $have]; + + if ( $DO_VERIFY_PREREQS && $HAS_CPAN_META && $type eq 'requires' ) { + if ( $have !~ /\A$lax_version_re\z/ ) { + push @dep_errors, "$mod version '$have' cannot be parsed ($req_string)"; + } + elsif ( ! $full_prereqs->requirements_for( $phase, $type )->accepts_module( $mod => $have ) ) { + push @dep_errors, "$mod version '$have' is not in required range '$want'"; + } + } + } + else { + push @reports, [$mod, $want, "missing"]; + + if ( $DO_VERIFY_PREREQS && $type eq 'requires' ) { + push @dep_errors, "$mod is not installed ($req_string)"; + } + } + } + + if ( @reports ) { + push @full_reports, "=== $title ===\n\n"; + + my $ml = _max( map { length $_->[0] } @reports ); + my $wl = _max( map { length $_->[1] } @reports ); + my $hl = _max( map { length $_->[2] } @reports ); + splice @reports, 1, 0, ["-" x $ml, "-" x $wl, "-" x $hl]; + + push @full_reports, map { sprintf(" %*s %*s %*s\n", -$ml, $_->[0], $wl, $_->[1], $hl, $_->[2]) } @reports; + push @full_reports, "\n"; + } + } +} + +if ( @full_reports ) { + diag "\nVersions for all modules listed in $source (including optional ones):\n\n", @full_reports; +} + +if ( @dep_errors ) { + diag join("\n", + "\n*** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING ***\n", + "The following REQUIRED prerequisites were not satisfied:\n", + @dep_errors, + "\n" + ); +} + +pass; + +# vim: ts=4 sts=4 sw=4 et: diff -Nru libpoe-component-sslify-perl-1.008/t/00-ssleay-info.t libpoe-component-sslify-perl-1.012/t/00-ssleay-info.t --- libpoe-component-sslify-perl-1.008/t/00-ssleay-info.t 1970-01-01 00:00:00.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/t/00-ssleay-info.t 2014-11-14 20:20:01.000000000 +0000 @@ -0,0 +1,37 @@ +#!/usr/bin/perl +# +# This file is part of POE-Component-SSLify +# +# This software is copyright (c) 2014 by Apocalypse. +# +# This is free software; you can redistribute it and/or modify it under +# the same terms as the Perl 5 programming language system itself. +# +use strict; use warnings; +use strict; use warnings; + +# displays some basic info + +use Test::FailWarnings; +use Test::More 1.001002; # new enough for sanity in done_testing() + +use POE::Component::SSLify; + +# only available > 1.42 +eval { + diag( "\nNet::SSLeay::ver_number is 0x" . sprintf( "%x", Net::SSLeay::SSLeay() ) ); + diag( "\t" . Net::SSLeay::SSLeay_version( 0 ) ); + diag( "\t" . Net::SSLeay::SSLeay_version( 2 ) ); + diag( "\t" . Net::SSLeay::SSLeay_version( 3 ) ); + diag( "\t" . Net::SSLeay::SSLeay_version( 4 ) ); +}; + +# Idea taken from POE t/00_info.t :) +my $done = 0; +my $x = 0; +$SIG{ALRM} = sub { diag "\tpogomips: $x"; $done = 1; }; +alarm(1); +++$x until $done; + +ok(1, "fake test for info"); +done_testing; diff -Nru libpoe-component-sslify-perl-1.008/t/1_simple.t libpoe-component-sslify-perl-1.012/t/1_simple.t --- libpoe-component-sslify-perl-1.008/t/1_simple.t 2011-05-04 21:55:38.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/t/1_simple.t 1970-01-01 00:00:00.000000000 +0000 @@ -1,169 +0,0 @@ -#!/usr/bin/perl -# -# This file is part of POE-Component-SSLify -# -# This software is copyright (c) 2011 by Apocalypse. -# -# This is free software; you can redistribute it and/or modify it under -# the same terms as the Perl 5 programming language system itself. -# -use strict; use warnings; -use strict; use warnings; - -# Thanks to ASCENT for this test! -# This tests the basic functionality of sslify on client/server side - -my $numtests; -BEGIN { - $numtests = 16; - - eval "use Test::NoWarnings"; - if ( ! $@ ) { - # increment by one - $numtests++; - } -} - -use Test::More tests => $numtests; - -use POE 1.267; -use POE::Component::Client::TCP; -use POE::Component::Server::TCP; -use POE::Component::SSLify qw/Client_SSLify Server_SSLify SSLify_Options SSLify_GetCipher SSLify_ContextCreate SSLify_GetSocket SSLify_GetSSL/; - -# TODO rewrite this to use Test::POE::Server::TCP and stuff :) - -my $port; - -POE::Component::Server::TCP->new -( - Alias => 'myserver', - Address => '127.0.0.1', - Port => 0, - - Started => sub - { - use Socket qw/sockaddr_in/; - $port = (sockaddr_in($_[HEAP]->{listener}->getsockname))[0]; - }, - ClientConnected => sub - { - ok(1, 'SERVER: accepted'); - }, - ClientDisconnected => sub - { - ok(1, 'SERVER: client disconnected'); - $_[KERNEL]->post(myserver => 'shutdown'); - }, - ClientPreConnect => sub - { - eval { SSLify_Options('mylib/example.key', 'mylib/example.crt', 'sslv3') }; - eval { SSLify_Options('../mylib/example.key', '../mylib/example.crt', 'sslv3') } if ($@); - ok(!$@, "SERVER: SSLify_Options $@"); - - my $socket = eval { Server_SSLify($_[ARG0]) }; - ok(!$@, "SERVER: Server_SSLify $@"); - ok(1, 'SERVER: SSLify_GetCipher: '. SSLify_GetCipher($socket)); - - # We pray that IO::Handle is sane... - ok( SSLify_GetSocket( $socket )->blocking == 0, 'SERVER: SSLified socket is non-blocking?'); - - return ($socket); - }, - ClientInput => sub - { - my ($kernel, $heap, $line) = @_[KERNEL, HEAP, ARG0]; - - if ( $line eq 'ping' ) { - ok(1, "SERVER: recv: $line"); - - ## At this point, connection MUST be encrypted. - my $cipher = SSLify_GetCipher($heap->{client}->get_output_handle); - ok($cipher ne '(NONE)', "SERVER: SSLify_GetCipher: $cipher"); - - $heap->{client}->put("pong"); - } else { - die "Unknown line from CLIENT: $line"; - } - }, - ClientError => sub - { - # Thanks to H. Merijn Brand for spotting this FAIL in 5.12.0! - # The default PoCo::Server::TCP handler will throw a warning, which causes Test::NoWarnings to FAIL :( - my ($syscall, $errno, $error) = @_[ ARG0..ARG2 ]; - - # TODO are there other "errors" that is harmless? - $error = "Normal disconnection" unless $error; - my $msg = "Got SERVER $syscall error $errno: $error"; - unless ( $syscall eq 'read' and $errno == 0 ) { - fail( $msg ); - } else { - diag( $msg ) if $ENV{TEST_VERBOSE}; - } - }, -); - -POE::Component::Client::TCP->new -( - Alias => 'myclient', - RemoteAddress => '127.0.0.1', - RemotePort => $port, - - Connected => sub - { - ok(1, 'CLIENT: connected'); - - $_[HEAP]->{server}->put("ping"); - }, - PreConnect => sub - { - my $ctx = eval { SSLify_ContextCreate(undef, undef, 'sslv3') }; - ok(!$@, "CLIENT: SSLify_ContextCreate $@"); - my $socket = eval { Client_SSLify($_[ARG0], undef, undef, $ctx) }; - ok(!$@, "CLIENT: Client_SSLify $@"); - ok(1, 'CLIENT: SSLify_GetCipher: '. SSLify_GetCipher($socket)); - - # We pray that IO::Handle is sane... - ok( SSLify_GetSocket( $socket )->blocking == 0, 'CLIENT: SSLified socket is non-blocking?'); - - return ($socket); - }, - ServerInput => sub - { - my ($kernel, $heap, $line) = @_[KERNEL, HEAP, ARG0]; - - if ($line eq 'pong') { - ok(1, "CLIENT: recv: $line"); - - ## At this point, connection MUST be encrypted. - my $cipher = SSLify_GetCipher($heap->{server}->get_output_handle); - ok($cipher ne '(NONE)', "CLIENT: SSLify_GetCipher: $cipher"); - diag( Net::SSLeay::dump_peer_certificate( SSLify_GetSSL( $heap->{server}->get_output_handle ) ) ) if $ENV{TEST_VERBOSE}; - - $kernel->yield('shutdown'); - } else { - die "Unknown line from SERVER: $line"; - } - }, - ServerError => sub - { - # Thanks to H. Merijn Brand for spotting this FAIL in 5.12.0! - # The default PoCo::Client::TCP handler will throw a warning, which causes Test::NoWarnings to FAIL :( - my ($syscall, $errno, $error) = @_[ ARG0..ARG2 ]; - - # TODO are there other "errors" that is harmless? - $error = "Normal disconnection" unless $error; - my $msg = "Got CLIENT $syscall error $errno: $error"; - unless ( $syscall eq 'read' and $errno == 0 ) { - fail( $msg ); - } else { - diag( $msg ) if $ENV{TEST_VERBOSE}; - } - }, -); - -$poe_kernel->run(); - -pass( 'shut down sanely' ); - -exit 0; diff -Nru libpoe-component-sslify-perl-1.008/t/2_renegotiate_client.t libpoe-component-sslify-perl-1.012/t/2_renegotiate_client.t --- libpoe-component-sslify-perl-1.008/t/2_renegotiate_client.t 2011-05-04 21:55:38.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/t/2_renegotiate_client.t 1970-01-01 00:00:00.000000000 +0000 @@ -1,188 +0,0 @@ -#!/usr/bin/perl -# -# This file is part of POE-Component-SSLify -# -# This software is copyright (c) 2011 by Apocalypse. -# -# This is free software; you can redistribute it and/or modify it under -# the same terms as the Perl 5 programming language system itself. -# -use strict; use warnings; -use strict; use warnings; - -# Thanks to ASCENT for this test! -# This test adds renegotiation to the connection from client-side - -# In an older version of this test, there was ok() littered everywhere -# but dngor replied in http://rt.cpan.org/Public/Bug/Display.html?id=66741 -# that it's not going to work... how do I predict which ok() will fail and "simulate" them? -# the solution was to... only run a few tests and print the diag -# because the rest of the tests just redo what we already have in 1_simple.t and stuff... - -my $numtests; -BEGIN { - $numtests = 16; - - eval "use Test::NoWarnings"; - if ( ! $@ ) { - # increment by one - $numtests++; - } -} - -use Test::More tests => $numtests; - -use POE 1.267; -use POE::Component::Client::TCP; -use POE::Component::Server::TCP; -use POE::Component::SSLify qw/Client_SSLify Server_SSLify SSLify_Options SSLify_GetCipher SSLify_ContextCreate SSLify_GetSocket SSLify_GetSSL/; -use Net::SSLeay qw/ERROR_WANT_READ ERROR_WANT_WRITE/; - -# TODO rewrite this to use Test::POE::Server::TCP and stuff :) - -my $port; -my $server_ping2; -my $client_ping2; - -POE::Component::Server::TCP->new -( - Alias => 'myserver', - Address => '127.0.0.1', - Port => 0, - - Started => sub - { - use Socket qw/sockaddr_in/; - $port = (sockaddr_in($_[HEAP]->{listener}->getsockname))[0]; - }, - ClientConnected => sub - { - ok(1, 'SERVER: accepted'); - }, - ClientDisconnected => sub - { - ok(1, 'SERVER: client disconnected'); - $_[KERNEL]->post(myserver => 'shutdown'); - }, - ClientPreConnect => sub - { - eval { SSLify_Options('mylib/example.key', 'mylib/example.crt', 'sslv3') }; - eval { SSLify_Options('../mylib/example.key', '../mylib/example.crt', 'sslv3') } if ($@); - ok(!$@, "SERVER: SSLify_Options $@"); - - my $socket = eval { Server_SSLify($_[ARG0]) }; - ok(!$@, "SERVER: Server_SSLify $@"); - ok(1, 'SERVER: SSLify_GetCipher: '. SSLify_GetCipher($socket)); - - # We pray that IO::Handle is sane... - ok( SSLify_GetSocket( $socket )->blocking == 0, 'SERVER: SSLified socket is non-blocking?'); - - return ($socket); - }, - ClientInput => sub - { - my ($kernel, $heap, $line) = @_[KERNEL, HEAP, ARG0]; - - if ($line eq 'ping') { - ok(1, "SERVER: recv: $line"); - - ## At this point, connection MUST be encrypted. - my $cipher = SSLify_GetCipher($heap->{client}->get_output_handle); - ok($cipher ne '(NONE)', "SERVER: SSLify_GetCipher: $cipher"); - - $heap->{client}->put("pong"); - } elsif ($line eq 'ping2') { - $server_ping2++; - $heap->{client}->put("pong2"); - } else { - die "Unknown line from CLIENT: $line"; - } - }, - ClientError => sub - { - # Thanks to H. Merijn Brand for spotting this FAIL in 5.12.0! - # The default PoCo::Server::TCP handler will throw a warning, which causes Test::NoWarnings to FAIL :( - my ($syscall, $errno, $error) = @_[ ARG0..ARG2 ]; - - # TODO are there other "errors" that is harmless? - $error = "Normal disconnection" unless $error; - my $msg = "Got SERVER $syscall error $errno: $error"; - unless ( $syscall eq 'read' and $errno == 0 ) { -# fail( $msg ); - } else { - diag( $msg ) if $ENV{TEST_VERBOSE}; - } - }, -); - -POE::Component::Client::TCP->new -( - Alias => 'myclient', - RemoteAddress => '127.0.0.1', - RemotePort => $port, - - Connected => sub - { - ok(1, 'CLIENT: connected'); - - $_[HEAP]->{server}->put("ping"); - }, - PreConnect => sub - { - my $ctx = eval { SSLify_ContextCreate(undef, undef, 'sslv3') }; - ok(!$@, "CLIENT: SSLify_ContextCreate $@"); - my $socket = eval { Client_SSLify($_[ARG0], undef, undef, $ctx) }; - ok(!$@, "CLIENT: Client_SSLify $@"); - ok(1, 'CLIENT: SSLify_GetCipher: '. SSLify_GetCipher($socket)); - - # We pray that IO::Handle is sane... - ok( SSLify_GetSocket( $socket )->blocking == 0, 'CLIENT: SSLified socket is non-blocking?'); - - return ($socket); - }, - ServerInput => sub - { - my ($kernel, $heap, $line) = @_[KERNEL, HEAP, ARG0]; - - if ($line eq 'pong') { - ok(1, "CLIENT: recv: $line"); - - ## At this point, connection MUST be encrypted. - my $cipher = SSLify_GetCipher($heap->{server}->get_output_handle); - ok($cipher ne '(NONE)', "CLIENT: SSLify_GetCipher: $cipher"); - - # do the actual renegotiate - Net::SSLeay::renegotiate( SSLify_GetSSL( $heap->{server}->get_output_handle ) ); - - $heap->{server}->put('ping2'); - } elsif ($line eq 'pong2') { - $client_ping2++; - $kernel->yield('shutdown'); - } else { - die "Unknown line from SERVER: $line"; - } - }, - ServerError => sub - { - # Thanks to H. Merijn Brand for spotting this FAIL in 5.12.0! - # The default PoCo::Client::TCP handler will throw a warning, which causes Test::NoWarnings to FAIL :( - my ($syscall, $errno, $error) = @_[ ARG0..ARG2 ]; - - $error = "Normal disconnection" unless $error; - my $msg = "Got CLIENT $syscall error $errno: $error"; - diag( $msg ) if $ENV{TEST_VERBOSE}; - }, -); - -$poe_kernel->run(); - -if ( ! $server_ping2 or ! $client_ping2 ) { - diag( "WARNING: Your platform/SSL library does not support renegotiation of the SSL socket." ); - diag( "This test harness detected that trying to renegotiate resulted in a disconnected socket." ); - diag( "POE::Component::SSLify will work on your system, but please do not attempt a SSL renegotiate." ); - diag( "Please talk with the author to figure out if this issue can be worked around, thank you!" ); -} - -pass( 'shut down sanely' ); - -exit 0; diff -Nru libpoe-component-sslify-perl-1.008/t/3_upgrade.t libpoe-component-sslify-perl-1.012/t/3_upgrade.t --- libpoe-component-sslify-perl-1.008/t/3_upgrade.t 2011-05-04 21:55:38.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/t/3_upgrade.t 1970-01-01 00:00:00.000000000 +0000 @@ -1,193 +0,0 @@ -#!/usr/bin/perl -# -# This file is part of POE-Component-SSLify -# -# This software is copyright (c) 2011 by Apocalypse. -# -# This is free software; you can redistribute it and/or modify it under -# the same terms as the Perl 5 programming language system itself. -# -use strict; use warnings; -use strict; use warnings; - -# This tests in-situ sslification ( upgrade a non-ssl socket to ssl ) - -my $numtests; -BEGIN { - $numtests = 18; - - eval "use Test::NoWarnings"; - if ( ! $@ ) { - # increment by one - $numtests++; - } -} - -use Test::More tests => $numtests; - -use POE 1.267; -use POE::Component::Client::TCP; -use POE::Component::Server::TCP; -use POE::Component::SSLify qw/Client_SSLify Server_SSLify SSLify_Options SSLify_GetCipher SSLify_ContextCreate SSLify_GetSocket/; - -# TODO rewrite this to use Test::POE::Server::TCP and stuff :) - -my $port; - -POE::Component::Server::TCP->new -( - Alias => 'myserver', - Address => '127.0.0.1', - Port => 0, - - Started => sub - { - use Socket qw/sockaddr_in/; - $port = (sockaddr_in($_[HEAP]->{listener}->getsockname))[0]; - }, - ClientConnected => sub - { - ok(1, 'SERVER: accepted'); - }, - ClientDisconnected => sub - { - ok(1, 'SERVER: client disconnected'); - $_[KERNEL]->post(myserver => 'shutdown'); - }, - ClientInput => sub - { - my ($kernel, $heap, $line) = @_[KERNEL, HEAP, ARG0]; - - if ( $line eq 'plaintext_ping' ) { - ok(1, "SERVER: recv: $line"); - $heap->{client}->put('plaintext_pong'); - $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 ($@); - ok(!$@, "SERVER: SSLify_Options $@"); - my $socket = eval { Server_SSLify($heap->{client}->get_output_handle) }; - ok(!$@, "SERVER: Server_SSLify $@"); - ok(1, 'SERVER: SSLify_GetCipher: '. SSLify_GetCipher($socket)); - - # We pray that IO::Handle is sane... - ok( SSLify_GetSocket( $socket )->blocking == 0, 'SERVER: SSLified socket is non-blocking?'); - - # TODO evil code here, ha! - # Should I ask rcaputo to add a $rw->replace_handle($socket) method? - # if you don't do the undef and just replace it - you'll get a bad file descriptor error from POE! - # select error: Bad file descriptor (hits=-1) - undef $heap->{client}; - $heap->{client} = POE::Wheel::ReadWrite->new( - Handle => $socket, - InputEvent => 'tcp_server_got_input', - ErrorEvent => 'tcp_server_got_error', - FlushedEvent => 'tcp_server_got_flush', - ); - } elsif ( $line eq 'ssl_ping' ) { - ok(1, "SERVER: recv: $line"); - - ## At this point, connection MUST be encrypted. - my $cipher = SSLify_GetCipher($heap->{client}->get_output_handle); - ok($cipher ne '(NONE)', "SERVER: SSLify_GetCipher: $cipher"); - - $heap->{client}->put('ssl_pong'); - } else { - die "Unknown line from CLIENT: $line"; - } - }, - ClientError => sub - { - # Thanks to H. Merijn Brand for spotting this FAIL in 5.12.0! - # The default PoCo::Server::TCP handler will throw a warning, which causes Test::NoWarnings to FAIL :( - my ($syscall, $errno, $error) = @_[ ARG0..ARG2 ]; - - # TODO are there other "errors" that is harmless? - $error = "Normal disconnection" unless $error; - my $msg = "Got SERVER $syscall error $errno: $error"; - unless ( $syscall eq 'read' and $errno == 0 ) { - fail( $msg ); - } else { - diag( $msg ) if $ENV{TEST_VERBOSE}; - } - }, -); - -POE::Component::Client::TCP->new -( - Alias => 'myclient', - RemoteAddress => '127.0.0.1', - RemotePort => $port, - - Connected => sub - { - ok(1, 'CLIENT: connected'); - - $_[HEAP]->{server}->put("plaintext_ping"); - }, - ServerInput => sub - { - my ($kernel, $heap, $line) = @_[KERNEL, HEAP, ARG0]; - - if ( $line eq 'plaintext_pong' ) { - ok(1, "CLIENT: recv: $line"); - - # sslify it in-situ! - my $ctx = eval { SSLify_ContextCreate(undef, undef, 'sslv3') }; - ok(!$@, "CLIENT: SSLify_ContextCreate $@"); - my $socket = eval { Client_SSLify($heap->{server}->get_output_handle, undef, undef, $ctx) }; - ok(!$@, "CLIENT: Client_SSLify $@"); - ok(1, 'CLIENT: SSLify_GetCipher: '. SSLify_GetCipher($socket)); - - # We pray that IO::Handle is sane... - ok( SSLify_GetSocket( $socket )->blocking == 0, 'CLIENT: SSLified socket is non-blocking?'); - - # TODO evil code here, ha! - # Should I ask rcaputo to add a $rw->replace_handle($socket) method? - # if you don't do the undef and just replace it - you'll get a bad file descriptor error from POE! - # select error: Bad file descriptor (hits=-1) - undef $heap->{server}; - $heap->{server} = POE::Wheel::ReadWrite->new( - Handle => $socket, - InputEvent => 'got_server_input', - ErrorEvent => 'got_server_error', - FlushedEvent => 'got_server_flush', - ); - - # Send the ssl ping! - $heap->{server}->put('ssl_ping'); - } elsif ( $line eq 'ssl_pong' ) { - ok(1, "CLIENT: recv: $line"); - - ## At this point, connection MUST be encrypted. - my $cipher = SSLify_GetCipher($heap->{server}->get_output_handle); - ok($cipher ne '(NONE)', "CLIENT: SSLify_GetCipher: $cipher"); - - $kernel->yield('shutdown'); - } else { - die "Unknown line from SERVER: $line"; - } - }, - ServerError => sub - { - # Thanks to H. Merijn Brand for spotting this FAIL in 5.12.0! - # The default PoCo::Client::TCP handler will throw a warning, which causes Test::NoWarnings to FAIL :( - my ($syscall, $errno, $error) = @_[ ARG0..ARG2 ]; - - # TODO are there other "errors" that is harmless? - $error = "Normal disconnection" unless $error; - my $msg = "Got CLIENT $syscall error $errno: $error"; - unless ( $syscall eq 'read' and $errno == 0 ) { - fail( $msg ); - } else { - diag( $msg ) if $ENV{TEST_VERBOSE}; - } - }, -); - -$poe_kernel->run(); - -pass( 'shut down sanely' ); - -exit 0; diff -Nru libpoe-component-sslify-perl-1.008/t/4_connect_hook.t libpoe-component-sslify-perl-1.012/t/4_connect_hook.t --- libpoe-component-sslify-perl-1.008/t/4_connect_hook.t 2011-05-04 21:55:38.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/t/4_connect_hook.t 1970-01-01 00:00:00.000000000 +0000 @@ -1,168 +0,0 @@ -#!/usr/bin/perl -# -# This file is part of POE-Component-SSLify -# -# This software is copyright (c) 2011 by Apocalypse. -# -# This is free software; you can redistribute it and/or modify it under -# the same terms as the Perl 5 programming language system itself. -# -use strict; use warnings; -use strict; use warnings; - -# This tests the connection OK hook on both server/client - -my $numtests; -BEGIN { - $numtests = 19; - - eval "use Test::NoWarnings"; - if ( ! $@ ) { - # increment by one - $numtests++; - } -} - -use Test::More tests => $numtests; - -use POE 1.267; -use POE::Component::Client::TCP; -use POE::Component::Server::TCP; -use POE::Component::SSLify qw/Client_SSLify Server_SSLify SSLify_Options SSLify_GetCipher SSLify_GetSocket SSLify_GetStatus/; - -# TODO rewrite this to use Test::POE::Server::TCP and stuff :) - -my $port; - -POE::Component::Server::TCP->new -( - Alias => 'myserver', - Address => '127.0.0.1', - Port => 0, - - Started => sub - { - use Socket qw/sockaddr_in/; - $port = (sockaddr_in($_[HEAP]->{listener}->getsockname))[0]; - }, - ClientConnected => sub - { - ok(1, 'SERVER: accepted'); - }, - ClientDisconnected => sub - { - ok(1, 'SERVER: client disconnected'); - $_[KERNEL]->post( 'myserver' => 'shutdown'); - }, - ClientPreConnect => sub - { - eval { SSLify_Options('mylib/example.key', 'mylib/example.crt') }; - eval { SSLify_Options('../mylib/example.key', '../mylib/example.crt') } if ($@); - ok(!$@, "SERVER: SSLify_Options $@"); - - my $socket = eval { Server_SSLify( $_[ARG0], sub { - my( $socket, $status, $errval ) = @_; - - pass( "SERVER: Got callback hook" ); - is( $status, 1, "SERVER: Status received from callback is OK" ); - - ## At this point, connection MUST be encrypted. - my $cipher = SSLify_GetCipher($socket); - ok($cipher ne '(NONE)', "SERVER: SSLify_GetCipher: $cipher"); - ok( SSLify_GetStatus($socket) == 1, "SERVER: SSLify_GetStatus is done" ); - } ) }; - ok(!$@, "SERVER: Server_SSLify $@"); - ok( SSLify_GetStatus($socket) == -1, "SERVER: SSLify_GetStatus is pending" ); - - return ($socket); - }, - ClientInput => sub - { - my ($kernel, $heap, $line) = @_[KERNEL, HEAP, ARG0]; - - if ( $line ne 'ping' ) { - die "Unknown line from CLIENT: $line"; - } else { - ok(1, "SERVER: recv: $line"); - $_[HEAP]->{client}->put("pong"); - } - }, - ClientError => sub - { - # Thanks to H. Merijn Brand for spotting this FAIL in 5.12.0! - # The default PoCo::Server::TCP handler will throw a warning, which causes Test::NoWarnings to FAIL :( - my ($syscall, $errno, $error) = @_[ ARG0..ARG2 ]; - - # TODO are there other "errors" that is harmless? - $error = "Normal disconnection" unless $error; - my $msg = "Got SERVER $syscall error $errno: $error"; - unless ( $syscall eq 'read' and $errno == 0 ) { - fail( $msg ); - } else { - diag( $msg ) if $ENV{TEST_VERBOSE}; - } - }, -); - -POE::Component::Client::TCP->new -( - Alias => 'myclient', - RemoteAddress => '127.0.0.1', - RemotePort => $port, - - Connected => sub - { - ok(1, 'CLIENT: connected'); - $_[HEAP]->{server}->put("ping"); - }, - PreConnect => sub - { - my $socket = eval { Client_SSLify($_[ARG0], sub { - my( $socket, $status, $errval ) = @_; - - pass( "CLIENT: Got callback hook status" ); - is( $status, 1, "CLIENT: Status received from callback is OK" ); - - ## At this point, connection MUST be encrypted. - my $cipher = SSLify_GetCipher($socket); - ok($cipher ne '(NONE)', "CLIENT: SSLify_GetCipher: $cipher"); - ok( SSLify_GetStatus($socket) == 1, "CLIENT: SSLify_GetStatus is done" ); - }) }; - ok(!$@, "CLIENT: Client_SSLify $@"); - ok( SSLify_GetStatus($socket) == -1, "CLIENT: SSLify_GetStatus is pending" ); - - return ($socket); - }, - ServerInput => sub - { - my ($kernel, $heap, $line) = @_[KERNEL, HEAP, ARG0]; - - if ( $line ne 'pong' ) { - die "Unknown line from CLIENT: $line"; - } else { - ok(1, "CLIENT: recv: $line"); - $kernel->yield('shutdown'); - } - }, - ServerError => sub - { - # Thanks to H. Merijn Brand for spotting this FAIL in 5.12.0! - # The default PoCo::Client::TCP handler will throw a warning, which causes Test::NoWarnings to FAIL :( - my ($syscall, $errno, $error) = @_[ ARG0..ARG2 ]; - - # TODO are there other "errors" that is harmless? - $error = "Normal disconnection" unless $error; - my $msg = "Got CLIENT $syscall error $errno: $error"; - unless ( $syscall eq 'read' and $errno == 0 ) { - fail( $msg ); - } else { - diag( $msg ) if $ENV{TEST_VERBOSE}; - } - }, -); - -$poe_kernel->run(); - -pass( 'shut down sanely' ); - -exit 0; diff -Nru libpoe-component-sslify-perl-1.008/t/5_connfail_client.t libpoe-component-sslify-perl-1.012/t/5_connfail_client.t --- libpoe-component-sslify-perl-1.008/t/5_connfail_client.t 2011-05-04 21:55:38.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/t/5_connfail_client.t 1970-01-01 00:00:00.000000000 +0000 @@ -1,122 +0,0 @@ -#!/usr/bin/perl -# -# This file is part of POE-Component-SSLify -# -# This software is copyright (c) 2011 by Apocalypse. -# -# This is free software; you can redistribute it and/or modify it under -# the same terms as the Perl 5 programming language system itself. -# -use strict; use warnings; -use strict; use warnings; - -# this tests the connection fail hook on the client-side - -my $numtests; -BEGIN { - $numtests = 8; - - eval "use Test::NoWarnings"; - if ( ! $@ ) { - # increment by one - $numtests++; - } -} - -use Test::More tests => $numtests; - -use POE 1.267; -use POE::Component::Client::TCP; -use POE::Component::Server::TCP; -use POE::Component::SSLify qw/Client_SSLify SSLify_GetSocket SSLify_GetStatus/; - -# TODO rewrite this to use Test::POE::Server::TCP and stuff :) - -my $port; - -POE::Component::Server::TCP->new -( - Alias => 'myserver', - Address => '127.0.0.1', - Port => 0, - - Started => sub - { - use Socket qw/sockaddr_in/; - $port = (sockaddr_in($_[HEAP]->{listener}->getsockname))[0]; - }, - ClientConnected => sub - { - ok(1, 'SERVER: accepted'); - - # purposefully send garbage so we screw up the ssl connect on the client-side - $_[HEAP]->{client}->put( 'garbage in, garbage out' ); - }, - ClientDisconnected => sub - { - ok(1, 'SERVER: client disconnected'); - $_[KERNEL]->post( 'myserver' => 'shutdown'); - }, - ClientInput => sub - { - my ($kernel, $heap, $line) = @_[KERNEL, HEAP, ARG0]; - - # purposefully send garbage so we screw up the ssl connect on the client-side - $heap->{client}->put( 'garbage in, garbage out' ); - }, - ClientError => sub - { - # Thanks to H. Merijn Brand for spotting this FAIL in 5.12.0! - # The default PoCo::Server::TCP handler will throw a warning, which causes Test::NoWarnings to FAIL :( - my ($syscall, $errno, $error) = @_[ ARG0..ARG2 ]; - $error = "Normal disconnection" unless $error; - diag( "Got SERVER $syscall error $errno: $error" ) if $ENV{TEST_VERBOSE}; - }, -); - -POE::Component::Client::TCP->new -( - Alias => 'myclient', - RemoteAddress => '127.0.0.1', - RemotePort => $port, - - Connected => sub - { - ok(1, 'CLIENT: connected'); - }, - PreConnect => sub - { - my $socket = eval { Client_SSLify($_[ARG0], sub { - my( $socket, $status, $errval ) = @_; - - pass( "CLIENT: Got callback hook" ); - is( $status, 0, "CLIENT: Status received from callback is ERR - $errval" ); - - $poe_kernel->post( 'myclient' => 'shutdown' ); - }) }; - ok(!$@, "CLIENT: Client_SSLify $@"); - is( SSLify_GetStatus( $socket ), -1, "CLIENT: SSLify_GetStatus is pending" ); - - return ($socket); - }, - ServerInput => sub - { - my ($kernel, $heap, $line) = @_[KERNEL, HEAP, ARG0]; - - die "Should have never got any input from the server!"; - }, - ServerError => sub - { - # Thanks to H. Merijn Brand for spotting this FAIL in 5.12.0! - # The default PoCo::Client::TCP handler will throw a warning, which causes Test::NoWarnings to FAIL :( - my ($syscall, $errno, $error) = @_[ ARG0..ARG2 ]; - $error = "Normal disconnection" unless $error; - diag( "Got CLIENT $syscall error $errno: $error" ) if $ENV{TEST_VERBOSE}; - }, -); - -$poe_kernel->run(); - -pass( 'shut down sanely' ); - -exit 0; diff -Nru libpoe-component-sslify-perl-1.008/t/6_connfail_server.t libpoe-component-sslify-perl-1.012/t/6_connfail_server.t --- libpoe-component-sslify-perl-1.008/t/6_connfail_server.t 2011-05-04 21:55:38.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/t/6_connfail_server.t 1970-01-01 00:00:00.000000000 +0000 @@ -1,125 +0,0 @@ -#!/usr/bin/perl -# -# This file is part of POE-Component-SSLify -# -# This software is copyright (c) 2011 by Apocalypse. -# -# This is free software; you can redistribute it and/or modify it under -# the same terms as the Perl 5 programming language system itself. -# -use strict; use warnings; -use strict; use warnings; - -# this tests the connection fail hook on the server-side - -my $numtests; -BEGIN { - $numtests = 9; - - eval "use Test::NoWarnings"; - if ( ! $@ ) { - # increment by one - $numtests++; - } -} - -use Test::More tests => $numtests; - -use POE 1.267; -use POE::Component::Client::TCP; -use POE::Component::Server::TCP; -use POE::Component::SSLify qw/Server_SSLify SSLify_Options SSLify_GetSocket SSLify_GetStatus/; - -# TODO rewrite this to use Test::POE::Server::TCP and stuff :) - -my $port; - -POE::Component::Server::TCP->new -( - Alias => 'myserver', - Address => '127.0.0.1', - Port => 0, - - Started => sub - { - use Socket qw/sockaddr_in/; - $port = (sockaddr_in($_[HEAP]->{listener}->getsockname))[0]; - }, - ClientConnected => sub - { - ok(1, 'SERVER: accepted'); - }, - ClientPreConnect => sub - { - eval { SSLify_Options('mylib/example.key', 'mylib/example.crt') }; - eval { SSLify_Options('../mylib/example.key', '../mylib/example.crt') } if ($@); - ok(!$@, "SERVER: SSLify_Options $@"); - - my $socket = eval { Server_SSLify( $_[ARG0], sub { - my( $socket, $status, $errval ) = @_; - - pass( "SERVER: Got callback hook" ); - is( $status, 0, "SERVER: Status received from callback is ERR - $errval" ); - - $poe_kernel->post( 'myserver' => 'shutdown'); - } ) }; - ok(!$@, "SERVER: Server_SSLify $@"); - is( SSLify_GetStatus( $socket ), -1, "SERVER: SSLify_GetStatus is pending" ); - - return ($socket); - }, - ClientDisconnected => sub - { - ok(1, 'SERVER: client disconnected'); - }, - ClientInput => sub - { - my ($kernel, $heap, $line) = @_[KERNEL, HEAP, ARG0]; - - die "Should have never got any input from the client!"; - }, - ClientError => sub - { - # Thanks to H. Merijn Brand for spotting this FAIL in 5.12.0! - # The default PoCo::Server::TCP handler will throw a warning, which causes Test::NoWarnings to FAIL :( - my ($syscall, $errno, $error) = @_[ ARG0..ARG2 ]; - $error = "Normal disconnection" unless $error; - diag( "Got SERVER $syscall error $errno: $error" ) if $ENV{TEST_VERBOSE}; - }, -); - -POE::Component::Client::TCP->new -( - Alias => 'myclient', - RemoteAddress => '127.0.0.1', - RemotePort => $port, - - Connected => sub - { - ok(1, 'CLIENT: connected'); - - # purposefully send garbage so we screw up the ssl connect on the client-side - $_[HEAP]->{server}->put( 'garbage in, garbage out' ); - }, - ServerInput => sub - { - my ($kernel, $heap, $line) = @_[KERNEL, HEAP, ARG0]; - - # purposefully send garbage so we screw up the ssl connect on the client-side - $heap->{server}->put( 'garbage in, garbage out' ); - }, - ServerError => sub - { - # Thanks to H. Merijn Brand for spotting this FAIL in 5.12.0! - # The default PoCo::Client::TCP handler will throw a warning, which causes Test::NoWarnings to FAIL :( - my ($syscall, $errno, $error) = @_[ ARG0..ARG2 ]; - $error = "Normal disconnection" unless $error; - diag( "Got CLIENT $syscall error $errno: $error" ) if $ENV{TEST_VERBOSE}; - }, -); - -$poe_kernel->run(); - -pass( 'shut down sanely' ); - -exit 0; diff -Nru libpoe-component-sslify-perl-1.008/t/7_connect_hook_nodata.t libpoe-component-sslify-perl-1.012/t/7_connect_hook_nodata.t --- libpoe-component-sslify-perl-1.008/t/7_connect_hook_nodata.t 2011-05-04 21:55:38.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/t/7_connect_hook_nodata.t 1970-01-01 00:00:00.000000000 +0000 @@ -1,159 +0,0 @@ -#!/usr/bin/perl -# -# This file is part of POE-Component-SSLify -# -# This software is copyright (c) 2011 by Apocalypse. -# -# This is free software; you can redistribute it and/or modify it under -# the same terms as the Perl 5 programming language system itself. -# -use strict; use warnings; -use strict; use warnings; - -# This tests the connection OK hook on both server/client - -my $numtests; -BEGIN { - $numtests = 17; - - eval "use Test::NoWarnings"; - if ( ! $@ ) { - # increment by one - $numtests++; - } -} - -use Test::More tests => $numtests; - -use POE 1.267; -use POE::Component::Client::TCP; -use POE::Component::Server::TCP; -use POE::Component::SSLify qw/Client_SSLify Server_SSLify SSLify_Options SSLify_GetCipher SSLify_GetSocket SSLify_GetStatus/; - -# TODO rewrite this to use Test::POE::Server::TCP and stuff :) - -my $port; - -POE::Component::Server::TCP->new -( - Alias => 'myserver', - Address => '127.0.0.1', - Port => 0, - - Started => sub - { - use Socket qw/sockaddr_in/; - $port = (sockaddr_in($_[HEAP]->{listener}->getsockname))[0]; - }, - ClientConnected => sub - { - ok(1, 'SERVER: accepted'); - }, - ClientDisconnected => sub - { - ok(1, 'SERVER: client disconnected'); - $_[KERNEL]->post( 'myserver' => 'shutdown'); - }, - ClientPreConnect => sub - { - eval { SSLify_Options('mylib/example.key', 'mylib/example.crt') }; - eval { SSLify_Options('../mylib/example.key', '../mylib/example.crt') } if ($@); - ok(!$@, "SERVER: SSLify_Options $@"); - - my $socket = eval { Server_SSLify( $_[ARG0], sub { - my( $socket, $status, $errval ) = @_; - - pass( "SERVER: Got callback hook" ); - is( $status, 1, "SERVER: Status received from callback is OK" ); - - ## At this point, connection MUST be encrypted. - my $cipher = SSLify_GetCipher($socket); - ok($cipher ne '(NONE)', "SERVER: SSLify_GetCipher: $cipher"); - ok( SSLify_GetStatus($socket) == 1, "SERVER: SSLify_GetStatus is done" ); - } ) }; - ok(!$@, "SERVER: Server_SSLify $@"); - ok( SSLify_GetStatus($socket) == -1, "SERVER: SSLify_GetStatus is pending" ); - - return ($socket); - }, - ClientInput => sub - { - my ($kernel, $heap, $line) = @_[KERNEL, HEAP, ARG0]; - - die "Should have never got any input from the client!"; - }, - ClientError => sub - { - # Thanks to H. Merijn Brand for spotting this FAIL in 5.12.0! - # The default PoCo::Server::TCP handler will throw a warning, which causes Test::NoWarnings to FAIL :( - my ($syscall, $errno, $error) = @_[ ARG0..ARG2 ]; - - # TODO are there other "errors" that is harmless? - $error = "Normal disconnection" unless $error; - my $msg = "Got SERVER $syscall error $errno: $error"; - unless ( $syscall eq 'read' and $errno == 0 ) { - fail( $msg ); - } else { - diag( $msg ) if $ENV{TEST_VERBOSE}; - } - }, -); - -POE::Component::Client::TCP->new -( - Alias => 'myclient', - RemoteAddress => '127.0.0.1', - RemotePort => $port, - - Connected => sub - { - ok(1, 'CLIENT: connected'); - }, - PreConnect => sub - { - my $socket = eval { Client_SSLify($_[ARG0], sub { - my( $socket, $status, $errval ) = @_; - - pass( "CLIENT: Got callback hook" ); - is( $status, 1, "CLIENT: Status received from callback is OK" ); - - ## At this point, connection MUST be encrypted. - my $cipher = SSLify_GetCipher($socket); - ok($cipher ne '(NONE)', "CLIENT: SSLify_GetCipher: $cipher"); - ok( SSLify_GetStatus($socket) == 1, "CLIENT: SSLify_GetStatus is done" ); - - $poe_kernel->post( 'myclient' => 'shutdown' ); - }) }; - ok(!$@, "CLIENT: Client_SSLify $@"); - ok( SSLify_GetStatus($socket) == -1, "CLIENT: SSLify_GetStatus is pending" ); - - return ($socket); - }, - ServerInput => sub - { - my ($kernel, $heap, $line) = @_[KERNEL, HEAP, ARG0]; - - die "Should have never got any input from the server!"; - }, - ServerError => sub - { - # Thanks to H. Merijn Brand for spotting this FAIL in 5.12.0! - # The default PoCo::Client::TCP handler will throw a warning, which causes Test::NoWarnings to FAIL :( - my ($syscall, $errno, $error) = @_[ ARG0..ARG2 ]; - - # TODO are there other "errors" that is harmless? - $error = "Normal disconnection" unless $error; - my $msg = "Got CLIENT $syscall error $errno: $error"; - unless ( $syscall eq 'read' and $errno == 0 ) { - fail( $msg ); - } else { - diag( $msg ) if $ENV{TEST_VERBOSE}; - } - }, -); - -$poe_kernel->run(); - -pass( 'shut down sanely' ); - -exit 0; diff -Nru libpoe-component-sslify-perl-1.008/t/8_renegotiate_server.t libpoe-component-sslify-perl-1.012/t/8_renegotiate_server.t --- libpoe-component-sslify-perl-1.008/t/8_renegotiate_server.t 2011-05-04 21:55:38.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/t/8_renegotiate_server.t 1970-01-01 00:00:00.000000000 +0000 @@ -1,185 +0,0 @@ -#!/usr/bin/perl -# -# This file is part of POE-Component-SSLify -# -# This software is copyright (c) 2011 by Apocalypse. -# -# This is free software; you can redistribute it and/or modify it under -# the same terms as the Perl 5 programming language system itself. -# -use strict; use warnings; -use strict; use warnings; - -# Thanks to ASCENT for this test! -# This test adds renegotiation to the connection from server-side - -# In an older version of this test, there was ok() littered everywhere -# but dngor replied in http://rt.cpan.org/Public/Bug/Display.html?id=66741 -# that it's not going to work... how do I predict which ok() will fail and "simulate" them? -# the solution was to... only run a few tests and print the diag -# because the rest of the tests just redo what we already have in 1_simple.t and stuff... - -my $numtests; -BEGIN { - $numtests = 16; - - eval "use Test::NoWarnings"; - if ( ! $@ ) { - # increment by one - $numtests++; - } -} - -use Test::More tests => $numtests; - -use POE 1.267; -use POE::Component::Client::TCP; -use POE::Component::Server::TCP; -use POE::Component::SSLify qw/Client_SSLify Server_SSLify SSLify_Options SSLify_GetCipher SSLify_ContextCreate SSLify_GetSocket SSLify_GetSSL/; - -# TODO rewrite this to use Test::POE::Server::TCP and stuff :) - -my $port; -my $server_ping2; -my $client_ping2; - -POE::Component::Server::TCP->new -( - Alias => 'myserver', - Address => '127.0.0.1', - Port => 0, - - Started => sub - { - use Socket qw/sockaddr_in/; - $port = (sockaddr_in($_[HEAP]->{listener}->getsockname))[0]; - }, - ClientConnected => sub - { - ok(1, 'SERVER: accepted'); - $_[HEAP]->{client}->put("ping"); - }, - ClientDisconnected => sub - { - ok(1, 'SERVER: client disconnected'); - $_[KERNEL]->post(myserver => 'shutdown'); - }, - ClientPreConnect => sub - { - eval { SSLify_Options('mylib/example.key', 'mylib/example.crt', 'sslv3') }; - eval { SSLify_Options('../mylib/example.key', '../mylib/example.crt', 'sslv3') } if ($@); - ok(!$@, "SERVER: SSLify_Options $@"); - - my $socket = eval { Server_SSLify($_[ARG0]) }; - ok(!$@, "SERVER: Server_SSLify $@"); - ok(1, 'SERVER: SSLify_GetCipher: '. SSLify_GetCipher($socket)); - - # We pray that IO::Handle is sane... - ok( SSLify_GetSocket( $socket )->blocking == 0, 'SERVER: SSLified socket is non-blocking?'); - - return ($socket); - }, - ClientInput => sub - { - my ($kernel, $heap, $line) = @_[KERNEL, HEAP, ARG0]; - - if ($line eq 'pong') { - ok(1, "SERVER: recv: $line"); - - ## At this point, connection MUST be encrypted. - my $cipher = SSLify_GetCipher($heap->{client}->get_output_handle); - ok($cipher ne '(NONE)', "SERVER: SSLify_GetCipher: $cipher"); - - Net::SSLeay::renegotiate( SSLify_GetSSL( $heap->{client}->get_output_handle ) ); - - $heap->{client}->put("ping2"); - } elsif ($line eq 'pong2') { - $server_ping2++; - $kernel->yield( 'shutdown' ); - } else { - die "Unknown line from CLIENT: $line"; - } - }, - ClientError => sub - { - # Thanks to H. Merijn Brand for spotting this FAIL in 5.12.0! - # The default PoCo::Server::TCP handler will throw a warning, which causes Test::NoWarnings to FAIL :( - my ($syscall, $errno, $error) = @_[ ARG0..ARG2 ]; - - # TODO are there other "errors" that is harmless? - $error = "Normal disconnection" unless $error; - my $msg = "Got SERVER $syscall error $errno: $error"; - unless ( $syscall eq 'read' and $errno == 0 ) { -# fail( $msg ); - } else { - diag( $msg ) if $ENV{TEST_VERBOSE}; - } - }, -); - -POE::Component::Client::TCP->new -( - Alias => 'myclient', - RemoteAddress => '127.0.0.1', - RemotePort => $port, - - Connected => sub - { - ok(1, 'CLIENT: connected'); - }, - PreConnect => sub - { - my $ctx = eval { SSLify_ContextCreate(undef, undef, 'sslv3') }; - ok(!$@, "CLIENT: SSLify_ContextCreate $@"); - my $socket = eval { Client_SSLify($_[ARG0], undef, undef, $ctx) }; - ok(!$@, "CLIENT: Client_SSLify $@"); - ok(1, 'CLIENT: SSLify_GetCipher: '. SSLify_GetCipher($socket)); - - # We pray that IO::Handle is sane... - ok( SSLify_GetSocket( $socket )->blocking == 0, 'CLIENT: SSLified socket is non-blocking?'); - - return ($socket); - }, - ServerInput => sub - { - my ($kernel, $heap, $line) = @_[KERNEL, HEAP, ARG0]; - - if ($line eq 'ping') { - ok(1, "CLIENT: recv: $line"); - - ## At this point, connection MUST be encrypted. - my $cipher = SSLify_GetCipher($heap->{server}->get_output_handle); - ok($cipher ne '(NONE)', "CLIENT: SSLify_GetCipher: $cipher"); - - $_[HEAP]->{server}->put("pong"); - } elsif ( $line eq 'ping2' ) { - $client_ping2++; - $_[HEAP]->{server}->put("pong2"); - } else { - die "Unknown line from SERVER: $line"; - } - }, - ServerError => sub - { - # Thanks to H. Merijn Brand for spotting this FAIL in 5.12.0! - # The default PoCo::Client::TCP handler will throw a warning, which causes Test::NoWarnings to FAIL :( - my ($syscall, $errno, $error) = @_[ ARG0..ARG2 ]; - - $error = "Normal disconnection" unless $error; - my $msg = "Got CLIENT $syscall error $errno: $error"; - diag( $msg ) if $ENV{TEST_VERBOSE}; - }, -); - -$poe_kernel->run(); - -if ( ! $server_ping2 or ! $client_ping2 ) { - diag( "WARNING: Your platform/SSL library does not support renegotiation of the SSL socket." ); - diag( "This test harness detected that trying to renegotiate resulted in a disconnected socket." ); - diag( "POE::Component::SSLify will work on your system, but please do not attempt a SSL renegotiate." ); - diag( "Please talk with the author to figure out if this issue can be worked around, thank you!" ); -} - -pass( 'shut down sanely' ); - -exit 0; diff -Nru libpoe-component-sslify-perl-1.008/t/98_renegotiate.t libpoe-component-sslify-perl-1.012/t/98_renegotiate.t --- libpoe-component-sslify-perl-1.008/t/98_renegotiate.t 2011-05-04 21:55:38.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/t/98_renegotiate.t 1970-01-01 00:00:00.000000000 +0000 @@ -1,224 +0,0 @@ -#!/usr/bin/perl -# -# This file is part of POE-Component-SSLify -# -# This software is copyright (c) 2011 by Apocalypse. -# -# This is free software; you can redistribute it and/or modify it under -# the same terms as the Perl 5 programming language system itself. -# -use strict; use warnings; -use strict; use warnings; - -# Thanks to ASCENT for this test! -# This test adds renegotiation to the connection from client-side -# Since this is not supported on all platforms, it's marked TODO and adds custom logic -# to make sure it doesn't FAIL if it's not supported. - -# this version of the test doesn't work as reported in http://rt.cpan.org/Public/Bug/Display.html?id=66741 -# renamed it to this version for posterity and in case I need it for future analysis... - -#my $numtests; -#BEGIN { -# $numtests = 23; -# -# eval "use Test::NoWarnings"; -# if ( ! $@ ) { -# # increment by one -# $numtests++; -# } -#} - -#use Test::More tests => $numtests; -use Test::More; -BEGIN { - plan skip_all => "AUTHOR TEST"; -} - -use POE 1.267; -use POE::Component::Client::TCP; -use POE::Component::Server::TCP; -use POE::Component::SSLify qw/Client_SSLify Server_SSLify SSLify_Options SSLify_GetCipher SSLify_ContextCreate SSLify_GetSocket SSLify_GetSSL/; -use Net::SSLeay qw/ERROR_WANT_READ ERROR_WANT_WRITE/; - -# TODO rewrite this to use Test::POE::Server::TCP and stuff :) - -my $port; -my $server_ping2; -my $client_ping2; - -POE::Component::Server::TCP->new -( - Alias => 'myserver', - Address => '127.0.0.1', - Port => 0, - - Started => sub - { - use Socket qw/sockaddr_in/; - $port = (sockaddr_in($_[HEAP]->{listener}->getsockname))[0]; - }, - ClientConnected => sub - { - ok(1, 'SERVER: accepted'); - }, - ClientDisconnected => sub - { - ok(1, 'SERVER: client disconnected'); - $_[KERNEL]->post(myserver => 'shutdown'); - }, - ClientPreConnect => sub - { - eval { SSLify_Options('mylib/example.key', 'mylib/example.crt', 'sslv3') }; - eval { SSLify_Options('../mylib/example.key', '../mylib/example.crt', 'sslv3') } if ($@); - ok(!$@, "SERVER: SSLify_Options $@"); - - my $socket = eval { Server_SSLify($_[ARG0]) }; - ok(!$@, "SERVER: Server_SSLify $@"); - ok(1, 'SERVER: SSLify_GetCipher: '. SSLify_GetCipher($socket)); - - # We pray that IO::Handle is sane... - ok( SSLify_GetSocket( $socket )->blocking == 0, 'SERVER: SSLified socket is non-blocking?'); - - return ($socket); - }, - ClientInput => sub - { - my ($kernel, $heap, $request) = @_[KERNEL, HEAP, ARG0]; - - ## At this point, connection MUST be encrypted. - my $cipher = SSLify_GetCipher($heap->{client}->get_output_handle); - ok($cipher ne '(NONE)', "SERVER: SSLify_GetCipher: $cipher"); - - if ($request eq 'ping') - { - ok(1, "SERVER: recv: $request"); - $heap->{client}->put("pong"); - } - elsif ($request eq 'ping2') - { - ok(1, "SERVER: recv: $request"); - $server_ping2++; - $heap->{client}->put("pong2"); - } - }, - ClientError => sub - { - # Thanks to H. Merijn Brand for spotting this FAIL in 5.12.0! - # The default PoCo::Server::TCP handler will throw a warning, which causes Test::NoWarnings to FAIL :( - my ($syscall, $errno, $error) = @_[ ARG0..ARG2 ]; - - # TODO are there other "errors" that is harmless? - $error = "Normal disconnection" unless $error; - my $msg = "Got SERVER $syscall error $errno: $error"; - unless ( $syscall eq 'read' and $errno == 0 ) { - fail( $msg ); - } else { - diag( $msg ) if $ENV{TEST_VERBOSE}; - } - }, -); - -POE::Component::Client::TCP->new -( - Alias => 'myclient', - RemoteAddress => '127.0.0.1', - RemotePort => $port, - - Connected => sub - { - ok(1, 'CLIENT: connected'); - - $_[HEAP]->{server}->put("ping"); - }, - PreConnect => sub - { - my $ctx = eval { SSLify_ContextCreate(undef, undef, 'sslv3') }; - ok(!$@, "CLIENT: SSLify_ContextCreate $@"); - my $socket = eval { Client_SSLify($_[ARG0], undef, undef, $ctx) }; - ok(!$@, "CLIENT: Client_SSLify $@"); - ok(1, 'CLIENT: SSLify_GetCipher: '. SSLify_GetCipher($socket)); - - # We pray that IO::Handle is sane... - ok( SSLify_GetSocket( $socket )->blocking == 0, 'CLIENT: SSLified socket is non-blocking?'); - - return ($socket); - }, - ServerInput => sub - { - my ($kernel, $heap, $line) = @_[KERNEL, HEAP, ARG0]; - - ## At this point, connection MUST be encrypted. - my $cipher = SSLify_GetCipher($heap->{server}->get_output_handle); - ok($cipher ne '(NONE)', "CLIENT: SSLify_GetCipher: $cipher"); - - if ($line eq 'pong') - { - ok(1, "CLIENT: recv: $line"); - - # Skip 2 Net::SSLeay::renegotiate() tests on FreeBSD because of - # http://security.freebsd.org/advisories/FreeBSD-SA-09:15.ssl.asc - TODO: { - local $TODO = "Net::SSLeay::renegotiate() does not work on all platforms"; - - ## Force SSL renegotiation - my $ssl = SSLify_GetSSL( $heap->{server}->get_output_handle ); - my $reneg_num = Net::SSLeay::num_renegotiations($ssl); - - ok(1 == Net::SSLeay::renegotiate($ssl), 'CLIENT: SSL renegotiation'); - my $handshake = Net::SSLeay::do_handshake($ssl); - my $err = Net::SSLeay::get_error($ssl, $handshake); - - ## 1 == Successful handshake, ERROR_WANT_(READ|WRITE) == non-blocking. - ok($handshake == 1 || $err == ERROR_WANT_READ || $err == ERROR_WANT_WRITE, 'CLIENT: SSL handshake'); - ok($reneg_num < Net::SSLeay::num_renegotiations($ssl), 'CLIENT: Increased number of negotiations'); - } - - $heap->{server}->put('ping2'); - } - - elsif ($line eq 'pong2') - { - ok(1, "CLIENT: recv: $line"); - $client_ping2++; - $kernel->yield('shutdown'); - } - }, - ServerError => sub - { - # Thanks to H. Merijn Brand for spotting this FAIL in 5.12.0! - # The default PoCo::Client::TCP handler will throw a warning, which causes Test::NoWarnings to FAIL :( - my ($syscall, $errno, $error) = @_[ ARG0..ARG2 ]; - - # TODO are there other "errors" that is harmless? - $error = "Normal disconnection" unless $error; - my $msg = "Got CLIENT $syscall error $errno: $error"; - unless ( $syscall eq 'read' and $errno == 0 ) { - fail( $msg ); - } else { - diag( $msg ) if $ENV{TEST_VERBOSE}; - } - }, -); - -$poe_kernel->run(); - -# Add extra pass() to make the test harness happy if renegotiate did not work -if ( ! $server_ping2 ) { - local $TODO = "Net::SSLeay::renegotiate() does not work on all platforms"; - fail( "SERVER: Failed SSL renegotiation" ); -} -if ( ! $client_ping2 ) { - local $TODO = "Net::SSLeay::renegotiate() does not work on all platforms"; - fail( "CLIENT: Failed SSL renegotiation" ); -} -if ( ! $server_ping2 or ! $client_ping2 ) { - diag( "WARNING: Your platform/SSL library does not support renegotiation of the SSL socket." ); - diag( "This test harness detected that trying to renegotiate resulted in a disconnected socket." ); - diag( "POE::Component::SSLify will work on your system, but please do not attempt a SSL renegotiate." ); - diag( "Please talk with the author to figure out if this issue can be worked around, thank you!" ); -} - -pass( 'shut down sanely' ); - -exit 0; diff -Nru libpoe-component-sslify-perl-1.008/t/99_mire_test.t libpoe-component-sslify-perl-1.012/t/99_mire_test.t --- libpoe-component-sslify-perl-1.008/t/99_mire_test.t 2011-05-04 21:55:38.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/t/99_mire_test.t 2014-11-14 20:20:01.000000000 +0000 @@ -2,7 +2,7 @@ # # This file is part of POE-Component-SSLify # -# This software is copyright (c) 2011 by Apocalypse. +# This software is copyright (c) 2014 by Apocalypse. # # This is free software; you can redistribute it and/or modify it under # the same terms as the Perl 5 programming language system itself. @@ -20,15 +20,16 @@ # sub POE::Kernel::CATCH_EXCEPTIONS () { 0 } # make sure we die right away so it's easier to debug } -use strict; -use warnings; -use POE; - use Test::More; BEGIN { plan skip_all => "AUTHOR TEST"; } +use strict; +use warnings; +use POE; +use Test::FailWarnings; + our $DEBUG=0; package Ub; @@ -267,4 +268,4 @@ },)->ID; POE::Kernel->run(); -exit; +done_testing; diff -Nru libpoe-component-sslify-perl-1.008/t/apocalypse.t libpoe-component-sslify-perl-1.012/t/apocalypse.t --- libpoe-component-sslify-perl-1.008/t/apocalypse.t 2011-05-04 21:55:38.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/t/apocalypse.t 2014-11-14 20:20:01.000000000 +0000 @@ -2,7 +2,7 @@ # # This file is part of POE-Component-SSLify # -# This software is copyright (c) 2011 by Apocalypse. +# This software is copyright (c) 2014 by Apocalypse. # # This is free software; you can redistribute it and/or modify it under # the same terms as the Perl 5 programming language system itself. @@ -15,9 +15,6 @@ if ( $@ ) { plan skip_all => 'Test::Apocalypse required for validating the distribution'; } else { - # hack for Kwalitee ( zany require format so DZP::AutoPrereq will not pick it up ) - require 'Test/NoWarnings.pm'; require 'Test/Pod.pm'; require 'Test/Pod/Coverage.pm'; - is_apocalypse_here( { } ); diff -Nru libpoe-component-sslify-perl-1.008/t/connect_hook_nodata.t libpoe-component-sslify-perl-1.012/t/connect_hook_nodata.t --- libpoe-component-sslify-perl-1.008/t/connect_hook_nodata.t 1970-01-01 00:00:00.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/t/connect_hook_nodata.t 2014-11-14 20:20:01.000000000 +0000 @@ -0,0 +1,147 @@ +#!/usr/bin/perl +# +# This file is part of POE-Component-SSLify +# +# This software is copyright (c) 2014 by Apocalypse. +# +# This is free software; you can redistribute it and/or modify it under +# the same terms as the Perl 5 programming language system itself. +# +use strict; use warnings; +use strict; use warnings; + +# This tests the connection OK hook on both server/client + +use Test::FailWarnings; +use Test::More 1.001002; # new enough for sanity in done_testing() + +use POE 1.267; +use POE::Component::Client::TCP; +use POE::Component::Server::TCP; +use POE::Component::SSLify qw/Client_SSLify Server_SSLify SSLify_Options SSLify_GetCipher SSLify_GetSocket SSLify_GetStatus/; + +# TODO rewrite this to use Test::POE::Server::TCP and stuff :) + +my $port; + +POE::Component::Server::TCP->new +( + Alias => 'myserver', + Address => '127.0.0.1', + Port => 0, + + Started => sub + { + use Socket qw/sockaddr_in/; + $port = (sockaddr_in($_[HEAP]->{listener}->getsockname))[0]; + }, + ClientConnected => sub + { + ok(1, 'SERVER: accepted'); + }, + ClientDisconnected => sub + { + ok(1, 'SERVER: client disconnected'); + $_[KERNEL]->post( 'myserver' => 'shutdown'); + }, + ClientPreConnect => sub + { + eval { SSLify_Options('mylib/example.key', 'mylib/example.crt') }; + eval { SSLify_Options('../mylib/example.key', '../mylib/example.crt') } if ($@); + ok(!$@, "SERVER: SSLify_Options $@"); + + my $socket = eval { Server_SSLify( $_[ARG0], sub { + my( $socket, $status, $errval ) = @_; + + pass( "SERVER: Got callback hook" ); + is( $status, 1, "SERVER: Status received from callback is OK" ); + + ## At this point, connection MUST be encrypted. + my $cipher = SSLify_GetCipher($socket); + ok($cipher ne '(NONE)', "SERVER: SSLify_GetCipher: $cipher"); + ok( SSLify_GetStatus($socket) == 1, "SERVER: SSLify_GetStatus is done" ); + } ) }; + ok(!$@, "SERVER: Server_SSLify $@"); + ok( SSLify_GetStatus($socket) == -1, "SERVER: SSLify_GetStatus is pending" ); + + return ($socket); + }, + ClientInput => sub + { + my ($kernel, $heap, $line) = @_[KERNEL, HEAP, ARG0]; + + die "Should have never got any input from the client!"; + }, + ClientError => sub + { + # Thanks to H. Merijn Brand for spotting this FAIL in 5.12.0! + # The default PoCo::Server::TCP handler will throw a warning, which causes Test::NoWarnings to FAIL :( + my ($syscall, $errno, $error) = @_[ ARG0..ARG2 ]; + + # TODO are there other "errors" that is harmless? + $error = "Normal disconnection" unless $error; + my $msg = "Got SERVER $syscall error $errno: $error"; + unless ( $syscall eq 'read' and $errno == 0 ) { + fail( $msg ); + } else { + diag( $msg ) if $ENV{TEST_VERBOSE}; + } + }, +); + +POE::Component::Client::TCP->new +( + Alias => 'myclient', + RemoteAddress => '127.0.0.1', + RemotePort => $port, + + Connected => sub + { + ok(1, 'CLIENT: connected'); + }, + PreConnect => sub + { + my $socket = eval { Client_SSLify($_[ARG0], sub { + my( $socket, $status, $errval ) = @_; + + pass( "CLIENT: Got callback hook" ); + is( $status, 1, "CLIENT: Status received from callback is OK" ); + + ## At this point, connection MUST be encrypted. + my $cipher = SSLify_GetCipher($socket); + ok($cipher ne '(NONE)', "CLIENT: SSLify_GetCipher: $cipher"); + ok( SSLify_GetStatus($socket) == 1, "CLIENT: SSLify_GetStatus is done" ); + + $poe_kernel->post( 'myclient' => 'shutdown' ); + }) }; + ok(!$@, "CLIENT: Client_SSLify $@"); + ok( SSLify_GetStatus($socket) == -1, "CLIENT: SSLify_GetStatus is pending" ); + + return ($socket); + }, + ServerInput => sub + { + my ($kernel, $heap, $line) = @_[KERNEL, HEAP, ARG0]; + + die "Should have never got any input from the server!"; + }, + ServerError => sub + { + # Thanks to H. Merijn Brand for spotting this FAIL in 5.12.0! + # The default PoCo::Client::TCP handler will throw a warning, which causes Test::NoWarnings to FAIL :( + my ($syscall, $errno, $error) = @_[ ARG0..ARG2 ]; + + # TODO are there other "errors" that is harmless? + $error = "Normal disconnection" unless $error; + my $msg = "Got CLIENT $syscall error $errno: $error"; + unless ( $syscall eq 'read' and $errno == 0 ) { + fail( $msg ); + } else { + diag( $msg ) if $ENV{TEST_VERBOSE}; + } + }, +); + +$poe_kernel->run(); + +done_testing; diff -Nru libpoe-component-sslify-perl-1.008/t/connect_hook.t libpoe-component-sslify-perl-1.012/t/connect_hook.t --- libpoe-component-sslify-perl-1.008/t/connect_hook.t 1970-01-01 00:00:00.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/t/connect_hook.t 2014-11-14 20:20:01.000000000 +0000 @@ -0,0 +1,156 @@ +#!/usr/bin/perl +# +# This file is part of POE-Component-SSLify +# +# This software is copyright (c) 2014 by Apocalypse. +# +# This is free software; you can redistribute it and/or modify it under +# the same terms as the Perl 5 programming language system itself. +# +use strict; use warnings; +use strict; use warnings; + +# This tests the connection OK hook on both server/client + +use Test::FailWarnings; +use Test::More 1.001002; # new enough for sanity in done_testing() + +use POE 1.267; +use POE::Component::Client::TCP; +use POE::Component::Server::TCP; +use POE::Component::SSLify qw/Client_SSLify Server_SSLify SSLify_Options SSLify_GetCipher SSLify_GetSocket SSLify_GetStatus/; + +# TODO rewrite this to use Test::POE::Server::TCP and stuff :) + +my $port; + +POE::Component::Server::TCP->new +( + Alias => 'myserver', + Address => '127.0.0.1', + Port => 0, + + Started => sub + { + use Socket qw/sockaddr_in/; + $port = (sockaddr_in($_[HEAP]->{listener}->getsockname))[0]; + }, + ClientConnected => sub + { + ok(1, 'SERVER: accepted'); + }, + ClientDisconnected => sub + { + ok(1, 'SERVER: client disconnected'); + $_[KERNEL]->post( 'myserver' => 'shutdown'); + }, + ClientPreConnect => sub + { + eval { SSLify_Options('mylib/example.key', 'mylib/example.crt') }; + eval { SSLify_Options('../mylib/example.key', '../mylib/example.crt') } if ($@); + ok(!$@, "SERVER: SSLify_Options $@"); + + my $socket = eval { Server_SSLify( $_[ARG0], sub { + my( $socket, $status, $errval ) = @_; + + pass( "SERVER: Got callback hook" ); + is( $status, 1, "SERVER: Status received from callback is OK" ); + + ## At this point, connection MUST be encrypted. + my $cipher = SSLify_GetCipher($socket); + ok($cipher ne '(NONE)', "SERVER: SSLify_GetCipher: $cipher"); + ok( SSLify_GetStatus($socket) == 1, "SERVER: SSLify_GetStatus is done" ); + } ) }; + ok(!$@, "SERVER: Server_SSLify $@"); + ok( SSLify_GetStatus($socket) == -1, "SERVER: SSLify_GetStatus is pending" ); + + return ($socket); + }, + ClientInput => sub + { + my ($kernel, $heap, $line) = @_[KERNEL, HEAP, ARG0]; + + if ( $line ne 'ping' ) { + die "Unknown line from CLIENT: $line"; + } else { + ok(1, "SERVER: recv: $line"); + $_[HEAP]->{client}->put("pong"); + } + }, + ClientError => sub + { + # Thanks to H. Merijn Brand for spotting this FAIL in 5.12.0! + # The default PoCo::Server::TCP handler will throw a warning, which causes Test::NoWarnings to FAIL :( + my ($syscall, $errno, $error) = @_[ ARG0..ARG2 ]; + + # TODO are there other "errors" that is harmless? + $error = "Normal disconnection" unless $error; + my $msg = "Got SERVER $syscall error $errno: $error"; + unless ( $syscall eq 'read' and $errno == 0 ) { + fail( $msg ); + } else { + diag( $msg ) if $ENV{TEST_VERBOSE}; + } + }, +); + +POE::Component::Client::TCP->new +( + Alias => 'myclient', + RemoteAddress => '127.0.0.1', + RemotePort => $port, + + Connected => sub + { + ok(1, 'CLIENT: connected'); + $_[HEAP]->{server}->put("ping"); + }, + PreConnect => sub + { + my $socket = eval { Client_SSLify($_[ARG0], sub { + my( $socket, $status, $errval ) = @_; + + pass( "CLIENT: Got callback hook status" ); + is( $status, 1, "CLIENT: Status received from callback is OK" ); + + ## At this point, connection MUST be encrypted. + my $cipher = SSLify_GetCipher($socket); + ok($cipher ne '(NONE)', "CLIENT: SSLify_GetCipher: $cipher"); + ok( SSLify_GetStatus($socket) == 1, "CLIENT: SSLify_GetStatus is done" ); + }) }; + ok(!$@, "CLIENT: Client_SSLify $@"); + ok( SSLify_GetStatus($socket) == -1, "CLIENT: SSLify_GetStatus is pending" ); + + return ($socket); + }, + ServerInput => sub + { + my ($kernel, $heap, $line) = @_[KERNEL, HEAP, ARG0]; + + if ( $line ne 'pong' ) { + die "Unknown line from CLIENT: $line"; + } else { + ok(1, "CLIENT: recv: $line"); + $kernel->yield('shutdown'); + } + }, + ServerError => sub + { + # Thanks to H. Merijn Brand for spotting this FAIL in 5.12.0! + # The default PoCo::Client::TCP handler will throw a warning, which causes Test::NoWarnings to FAIL :( + my ($syscall, $errno, $error) = @_[ ARG0..ARG2 ]; + + # TODO are there other "errors" that is harmless? + $error = "Normal disconnection" unless $error; + my $msg = "Got CLIENT $syscall error $errno: $error"; + unless ( $syscall eq 'read' and $errno == 0 ) { + fail( $msg ); + } else { + diag( $msg ) if $ENV{TEST_VERBOSE}; + } + }, +); + +$poe_kernel->run(); + +done_testing; diff -Nru libpoe-component-sslify-perl-1.008/t/connfail_client.t libpoe-component-sslify-perl-1.012/t/connfail_client.t --- libpoe-component-sslify-perl-1.008/t/connfail_client.t 1970-01-01 00:00:00.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/t/connfail_client.t 2014-11-14 20:20:01.000000000 +0000 @@ -0,0 +1,110 @@ +#!/usr/bin/perl +# +# This file is part of POE-Component-SSLify +# +# This software is copyright (c) 2014 by Apocalypse. +# +# This is free software; you can redistribute it and/or modify it under +# the same terms as the Perl 5 programming language system itself. +# +use strict; use warnings; +use strict; use warnings; + +# this tests the connection fail hook on the client-side + +use Test::FailWarnings; +use Test::More 1.001002; # new enough for sanity in done_testing() + +use POE 1.267; +use POE::Component::Client::TCP; +use POE::Component::Server::TCP; +use POE::Component::SSLify qw/Client_SSLify SSLify_GetSocket SSLify_GetStatus/; + +# TODO rewrite this to use Test::POE::Server::TCP and stuff :) + +my $port; + +POE::Component::Server::TCP->new +( + Alias => 'myserver', + Address => '127.0.0.1', + Port => 0, + + Started => sub + { + use Socket qw/sockaddr_in/; + $port = (sockaddr_in($_[HEAP]->{listener}->getsockname))[0]; + }, + ClientConnected => sub + { + ok(1, 'SERVER: accepted'); + + # purposefully send garbage so we screw up the ssl connect on the client-side + $_[HEAP]->{client}->put( 'garbage in, garbage out' ); + }, + ClientDisconnected => sub + { + ok(1, 'SERVER: client disconnected'); + $_[KERNEL]->post( 'myserver' => 'shutdown'); + }, + ClientInput => sub + { + my ($kernel, $heap, $line) = @_[KERNEL, HEAP, ARG0]; + + # purposefully send garbage so we screw up the ssl connect on the client-side + $heap->{client}->put( 'garbage in, garbage out' ); + }, + ClientError => sub + { + # Thanks to H. Merijn Brand for spotting this FAIL in 5.12.0! + # The default PoCo::Server::TCP handler will throw a warning, which causes Test::NoWarnings to FAIL :( + my ($syscall, $errno, $error) = @_[ ARG0..ARG2 ]; + $error = "Normal disconnection" unless $error; + diag( "Got SERVER $syscall error $errno: $error" ) if $ENV{TEST_VERBOSE}; + }, +); + +POE::Component::Client::TCP->new +( + Alias => 'myclient', + RemoteAddress => '127.0.0.1', + RemotePort => $port, + + Connected => sub + { + ok(1, 'CLIENT: connected'); + }, + PreConnect => sub + { + my $socket = eval { Client_SSLify($_[ARG0], sub { + my( $socket, $status, $errval ) = @_; + + pass( "CLIENT: Got callback hook" ); + is( $status, 0, "CLIENT: Status received from callback is ERR - $errval" ); + + $poe_kernel->post( 'myclient' => 'shutdown' ); + }) }; + ok(!$@, "CLIENT: Client_SSLify $@"); + is( SSLify_GetStatus( $socket ), -1, "CLIENT: SSLify_GetStatus is pending" ); + + return ($socket); + }, + ServerInput => sub + { + my ($kernel, $heap, $line) = @_[KERNEL, HEAP, ARG0]; + + die "Should have never got any input from the server!"; + }, + ServerError => sub + { + # Thanks to H. Merijn Brand for spotting this FAIL in 5.12.0! + # The default PoCo::Client::TCP handler will throw a warning, which causes Test::NoWarnings to FAIL :( + my ($syscall, $errno, $error) = @_[ ARG0..ARG2 ]; + $error = "Normal disconnection" unless $error; + diag( "Got CLIENT $syscall error $errno: $error" ) if $ENV{TEST_VERBOSE}; + }, +); + +$poe_kernel->run(); + +done_testing; diff -Nru libpoe-component-sslify-perl-1.008/t/connfail_server.t libpoe-component-sslify-perl-1.012/t/connfail_server.t --- libpoe-component-sslify-perl-1.008/t/connfail_server.t 1970-01-01 00:00:00.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/t/connfail_server.t 2014-11-14 20:20:01.000000000 +0000 @@ -0,0 +1,113 @@ +#!/usr/bin/perl +# +# This file is part of POE-Component-SSLify +# +# This software is copyright (c) 2014 by Apocalypse. +# +# This is free software; you can redistribute it and/or modify it under +# the same terms as the Perl 5 programming language system itself. +# +use strict; use warnings; +use strict; use warnings; + +# this tests the connection fail hook on the server-side + +use Test::FailWarnings; +use Test::More 1.001002; # new enough for sanity in done_testing() + +use POE 1.267; +use POE::Component::Client::TCP; +use POE::Component::Server::TCP; +use POE::Component::SSLify qw/Server_SSLify SSLify_Options SSLify_GetSocket SSLify_GetStatus/; + +# TODO rewrite this to use Test::POE::Server::TCP and stuff :) + +my $port; + +POE::Component::Server::TCP->new +( + Alias => 'myserver', + Address => '127.0.0.1', + Port => 0, + + Started => sub + { + use Socket qw/sockaddr_in/; + $port = (sockaddr_in($_[HEAP]->{listener}->getsockname))[0]; + }, + ClientConnected => sub + { + ok(1, 'SERVER: accepted'); + }, + ClientPreConnect => sub + { + eval { SSLify_Options('mylib/example.key', 'mylib/example.crt') }; + eval { SSLify_Options('../mylib/example.key', '../mylib/example.crt') } if ($@); + ok(!$@, "SERVER: SSLify_Options $@"); + + my $socket = eval { Server_SSLify( $_[ARG0], sub { + my( $socket, $status, $errval ) = @_; + + pass( "SERVER: Got callback hook" ); + is( $status, 0, "SERVER: Status received from callback is ERR - $errval" ); + + $poe_kernel->post( 'myserver' => 'shutdown'); + } ) }; + ok(!$@, "SERVER: Server_SSLify $@"); + is( SSLify_GetStatus( $socket ), -1, "SERVER: SSLify_GetStatus is pending" ); + + return ($socket); + }, + ClientDisconnected => sub + { + ok(1, 'SERVER: client disconnected'); + }, + ClientInput => sub + { + my ($kernel, $heap, $line) = @_[KERNEL, HEAP, ARG0]; + + die "Should have never got any input from the client!"; + }, + ClientError => sub + { + # Thanks to H. Merijn Brand for spotting this FAIL in 5.12.0! + # The default PoCo::Server::TCP handler will throw a warning, which causes Test::NoWarnings to FAIL :( + my ($syscall, $errno, $error) = @_[ ARG0..ARG2 ]; + $error = "Normal disconnection" unless $error; + diag( "Got SERVER $syscall error $errno: $error" ) if $ENV{TEST_VERBOSE}; + }, +); + +POE::Component::Client::TCP->new +( + Alias => 'myclient', + RemoteAddress => '127.0.0.1', + RemotePort => $port, + + Connected => sub + { + ok(1, 'CLIENT: connected'); + + # purposefully send garbage so we screw up the ssl connect on the client-side + $_[HEAP]->{server}->put( 'garbage in, garbage out' ); + }, + ServerInput => sub + { + my ($kernel, $heap, $line) = @_[KERNEL, HEAP, ARG0]; + + # purposefully send garbage so we screw up the ssl connect on the client-side + $heap->{server}->put( 'garbage in, garbage out' ); + }, + ServerError => sub + { + # Thanks to H. Merijn Brand for spotting this FAIL in 5.12.0! + # The default PoCo::Client::TCP handler will throw a warning, which causes Test::NoWarnings to FAIL :( + my ($syscall, $errno, $error) = @_[ ARG0..ARG2 ]; + $error = "Normal disconnection" unless $error; + diag( "Got CLIENT $syscall error $errno: $error" ) if $ENV{TEST_VERBOSE}; + }, +); + +$poe_kernel->run(); + +done_testing; diff -Nru libpoe-component-sslify-perl-1.008/t/renegotiate_client_pings.t libpoe-component-sslify-perl-1.012/t/renegotiate_client_pings.t --- libpoe-component-sslify-perl-1.008/t/renegotiate_client_pings.t 1970-01-01 00:00:00.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/t/renegotiate_client_pings.t 2014-11-14 20:20:01.000000000 +0000 @@ -0,0 +1,205 @@ +#!/usr/bin/perl +# +# This file is part of POE-Component-SSLify +# +# This software is copyright (c) 2014 by Apocalypse. +# +# This is free software; you can redistribute it and/or modify it under +# the same terms as the Perl 5 programming language system itself. +# +use strict; use warnings; +use strict; use warnings; + +# Thanks to ASCENT for this test! +# This test adds renegotiation to the connection from client-side +# Since this is not supported on all platforms, it's marked TODO and adds custom logic +# to make sure it doesn't FAIL if it's not supported. + +use Test::FailWarnings; +use Test::More 1.001002; # new enough for sanity in done_testing() + +use POE 1.267; +use POE::Component::Client::TCP; +use POE::Component::Server::TCP; +use POE::Component::SSLify qw/Client_SSLify Server_SSLify SSLify_Options SSLify_GetCipher SSLify_ContextCreate SSLify_GetSocket SSLify_GetSSL/; +use Net::SSLeay qw/ERROR_WANT_READ ERROR_WANT_WRITE/; + +# TODO rewrite this to use Test::POE::Server::TCP and stuff :) + +my $port; +my $server_ping2; +my $client_ping2; + +POE::Component::Server::TCP->new +( + Alias => 'myserver', + Address => '127.0.0.1', + Port => 0, + + Started => sub + { + use Socket qw/sockaddr_in/; + $port = (sockaddr_in($_[HEAP]->{listener}->getsockname))[0]; + }, + ClientConnected => sub + { + ok(1, 'SERVER: accepted'); + }, + ClientDisconnected => sub + { + ok(1, 'SERVER: client disconnected'); + $_[KERNEL]->post(myserver => 'shutdown'); + }, + ClientPreConnect => sub + { + eval { SSLify_Options('mylib/example.key', 'mylib/example.crt', 'sslv3') }; + eval { SSLify_Options('../mylib/example.key', '../mylib/example.crt', 'sslv3') } if ($@); + ok(!$@, "SERVER: SSLify_Options $@"); + + my $socket = eval { Server_SSLify($_[ARG0]) }; + ok(!$@, "SERVER: Server_SSLify $@"); + ok(1, 'SERVER: SSLify_GetCipher: '. SSLify_GetCipher($socket)); + + # We pray that IO::Handle is sane... + ok( SSLify_GetSocket( $socket )->blocking == 0, 'SERVER: SSLified socket is non-blocking?') if $^O ne 'MSWin32'; + + return ($socket); + }, + ClientInput => sub + { + my ($kernel, $heap, $request) = @_[KERNEL, HEAP, ARG0]; + + ## At this point, connection MUST be encrypted. + my $cipher = SSLify_GetCipher($heap->{client}->get_output_handle); + ok($cipher ne '(NONE)', "SERVER: SSLify_GetCipher: $cipher"); + + if ($request eq 'ping') + { + ok(1, "SERVER: recv: $request"); + $heap->{client}->put("pong"); + } + elsif ($request eq 'ping2') + { + ok(1, "SERVER: recv: $request"); + $server_ping2++; + $heap->{client}->put("pong2"); + } + }, + ClientError => sub + { + # Thanks to H. Merijn Brand for spotting this FAIL in 5.12.0! + # The default PoCo::Server::TCP handler will throw a warning, which causes Test::NoWarnings to FAIL :( + my ($syscall, $errno, $error) = @_[ ARG0..ARG2 ]; + + # TODO are there other "errors" that is harmless? + $error = "Normal disconnection" unless $error; + my $msg = "Got SERVER $syscall error $errno: $error"; + unless ( $syscall eq 'read' and $errno == 0 ) { + fail( $msg ); + } else { + diag( $msg ) if $ENV{TEST_VERBOSE}; + } + }, +); + +POE::Component::Client::TCP->new +( + Alias => 'myclient', + RemoteAddress => '127.0.0.1', + RemotePort => $port, + + Connected => sub + { + ok(1, 'CLIENT: connected'); + + $_[HEAP]->{server}->put("ping"); + }, + PreConnect => sub + { + my $ctx = eval { SSLify_ContextCreate(undef, undef, 'sslv3') }; + ok(!$@, "CLIENT: SSLify_ContextCreate $@"); + my $socket = eval { Client_SSLify($_[ARG0], undef, undef, $ctx) }; + ok(!$@, "CLIENT: Client_SSLify $@"); + ok(1, 'CLIENT: SSLify_GetCipher: '. SSLify_GetCipher($socket)); + + # We pray that IO::Handle is sane... + ok( SSLify_GetSocket( $socket )->blocking == 0, 'CLIENT: SSLified socket is non-blocking?') if $^O ne 'MSWin32'; + + return ($socket); + }, + ServerInput => sub + { + my ($kernel, $heap, $line) = @_[KERNEL, HEAP, ARG0]; + + ## At this point, connection MUST be encrypted. + my $cipher = SSLify_GetCipher($heap->{server}->get_output_handle); + ok($cipher ne '(NONE)', "CLIENT: SSLify_GetCipher: $cipher"); + + if ($line eq 'pong') + { + ok(1, "CLIENT: recv: $line"); + + # Skip 2 Net::SSLeay::renegotiate() tests on FreeBSD because of + # http://security.freebsd.org/advisories/FreeBSD-SA-09:15.ssl.asc + TODO: { + local $TODO = "Net::SSLeay::renegotiate() does not work on all platforms"; + + ## Force SSL renegotiation + my $ssl = SSLify_GetSSL( $heap->{server}->get_output_handle ); + my $reneg_num = Net::SSLeay::num_renegotiations($ssl); + + ok(1 == Net::SSLeay::renegotiate($ssl), 'CLIENT: SSL renegotiation'); + my $handshake = Net::SSLeay::do_handshake($ssl); + my $err = Net::SSLeay::get_error($ssl, $handshake); + + ## 1 == Successful handshake, ERROR_WANT_(READ|WRITE) == non-blocking. + ok($handshake == 1 || $err == ERROR_WANT_READ || $err == ERROR_WANT_WRITE, 'CLIENT: SSL handshake'); + ok($reneg_num < Net::SSLeay::num_renegotiations($ssl), 'CLIENT: Increased number of negotiations'); + } + + $heap->{server}->put('ping2'); + } + + elsif ($line eq 'pong2') + { + ok(1, "CLIENT: recv: $line"); + $client_ping2++; + $kernel->yield('shutdown'); + } + }, + ServerError => sub + { + # Thanks to H. Merijn Brand for spotting this FAIL in 5.12.0! + # The default PoCo::Client::TCP handler will throw a warning, which causes Test::NoWarnings to FAIL :( + my ($syscall, $errno, $error) = @_[ ARG0..ARG2 ]; + + # TODO are there other "errors" that is harmless? + $error = "Normal disconnection" unless $error; + my $msg = "Got CLIENT $syscall error $errno: $error"; + unless ( $syscall eq 'read' and $errno == 0 ) { + fail( $msg ); + } else { + diag( $msg ) if $ENV{TEST_VERBOSE}; + } + }, +); + +$poe_kernel->run(); + +# Add extra pass() to make the test harness happy if renegotiate did not work +if ( ! $server_ping2 ) { + local $TODO = "Net::SSLeay::renegotiate() does not work on all platforms"; + fail( "SERVER: Failed SSL renegotiation" ); +} +if ( ! $client_ping2 ) { + local $TODO = "Net::SSLeay::renegotiate() does not work on all platforms"; + fail( "CLIENT: Failed SSL renegotiation" ); +} +if ( ! $server_ping2 or ! $client_ping2 ) { + diag( "WARNING: Your platform/SSL library does not support renegotiation of the SSL socket." ); + diag( "This test harness detected that trying to renegotiate resulted in a disconnected socket." ); + diag( "POE::Component::SSLify will work on your system, but please do not attempt a SSL renegotiate." ); + diag( "Please talk with the author to figure out if this issue can be worked around, thank you!" ); +} + +done_testing; diff -Nru libpoe-component-sslify-perl-1.008/t/renegotiate_client.t libpoe-component-sslify-perl-1.012/t/renegotiate_client.t --- libpoe-component-sslify-perl-1.008/t/renegotiate_client.t 1970-01-01 00:00:00.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/t/renegotiate_client.t 2014-11-14 20:20:01.000000000 +0000 @@ -0,0 +1,170 @@ +#!/usr/bin/perl +# +# This file is part of POE-Component-SSLify +# +# This software is copyright (c) 2014 by Apocalypse. +# +# This is free software; you can redistribute it and/or modify it under +# the same terms as the Perl 5 programming language system itself. +# +use strict; use warnings; +use strict; use warnings; + +# Thanks to ASCENT for this test! +# This test adds renegotiation to the connection from client-side + +use Test::FailWarnings; +use Test::More 1.001002; # new enough for sanity in done_testing() + +use POE 1.267; +use POE::Component::Client::TCP; +use POE::Component::Server::TCP; +use POE::Component::SSLify qw/Client_SSLify Server_SSLify SSLify_Options SSLify_GetCipher SSLify_ContextCreate SSLify_GetSocket SSLify_GetSSL/; +use Net::SSLeay qw/ERROR_WANT_READ ERROR_WANT_WRITE/; + +# TODO rewrite this to use Test::POE::Server::TCP and stuff :) + +my $port; +my $server_ping2; +my $client_ping2; + +POE::Component::Server::TCP->new +( + Alias => 'myserver', + Address => '127.0.0.1', + Port => 0, + + Started => sub + { + use Socket qw/sockaddr_in/; + $port = (sockaddr_in($_[HEAP]->{listener}->getsockname))[0]; + }, + ClientConnected => sub + { + ok(1, 'SERVER: accepted'); + }, + ClientDisconnected => sub + { + ok(1, 'SERVER: client disconnected'); + $_[KERNEL]->post(myserver => 'shutdown'); + }, + ClientPreConnect => sub + { + eval { SSLify_Options('mylib/example.key', 'mylib/example.crt', 'sslv3') }; + eval { SSLify_Options('../mylib/example.key', '../mylib/example.crt', 'sslv3') } if ($@); + ok(!$@, "SERVER: SSLify_Options $@"); + + my $socket = eval { Server_SSLify($_[ARG0]) }; + ok(!$@, "SERVER: Server_SSLify $@"); + ok(1, 'SERVER: SSLify_GetCipher: '. SSLify_GetCipher($socket)); + + # We pray that IO::Handle is sane... + ok( SSLify_GetSocket( $socket )->blocking == 0, 'SERVER: SSLified socket is non-blocking?') if $^O ne 'MSWin32'; + + return ($socket); + }, + ClientInput => sub + { + my ($kernel, $heap, $line) = @_[KERNEL, HEAP, ARG0]; + + if ($line eq 'ping') { + ok(1, "SERVER: recv: $line"); + + ## At this point, connection MUST be encrypted. + my $cipher = SSLify_GetCipher($heap->{client}->get_output_handle); + ok($cipher ne '(NONE)', "SERVER: SSLify_GetCipher: $cipher"); + + $heap->{client}->put("pong"); + } elsif ($line eq 'ping2') { + $server_ping2++; + $heap->{client}->put("pong2"); + } else { + die "Unknown line from CLIENT: $line"; + } + }, + ClientError => sub + { + # Thanks to H. Merijn Brand for spotting this FAIL in 5.12.0! + # The default PoCo::Server::TCP handler will throw a warning, which causes Test::NoWarnings to FAIL :( + my ($syscall, $errno, $error) = @_[ ARG0..ARG2 ]; + + # TODO are there other "errors" that is harmless? + $error = "Normal disconnection" unless $error; + my $msg = "Got SERVER $syscall error $errno: $error"; + unless ( $syscall eq 'read' and $errno == 0 ) { +# fail( $msg ); + } else { + diag( $msg ) if $ENV{TEST_VERBOSE}; + } + }, +); + +POE::Component::Client::TCP->new +( + Alias => 'myclient', + RemoteAddress => '127.0.0.1', + RemotePort => $port, + + Connected => sub + { + ok(1, 'CLIENT: connected'); + + $_[HEAP]->{server}->put("ping"); + }, + PreConnect => sub + { + my $ctx = eval { SSLify_ContextCreate(undef, undef, 'sslv3') }; + ok(!$@, "CLIENT: SSLify_ContextCreate $@"); + my $socket = eval { Client_SSLify($_[ARG0], undef, undef, $ctx) }; + ok(!$@, "CLIENT: Client_SSLify $@"); + ok(1, 'CLIENT: SSLify_GetCipher: '. SSLify_GetCipher($socket)); + + # We pray that IO::Handle is sane... + ok( SSLify_GetSocket( $socket )->blocking == 0, 'CLIENT: SSLified socket is non-blocking?') if $^O ne 'MSWin32'; + + return ($socket); + }, + ServerInput => sub + { + my ($kernel, $heap, $line) = @_[KERNEL, HEAP, ARG0]; + + if ($line eq 'pong') { + ok(1, "CLIENT: recv: $line"); + + ## At this point, connection MUST be encrypted. + my $cipher = SSLify_GetCipher($heap->{server}->get_output_handle); + ok($cipher ne '(NONE)', "CLIENT: SSLify_GetCipher: $cipher"); + + # do the actual renegotiate + Net::SSLeay::renegotiate( SSLify_GetSSL( $heap->{server}->get_output_handle ) ); + + $heap->{server}->put('ping2'); + } elsif ($line eq 'pong2') { + $client_ping2++; + $kernel->yield('shutdown'); + } else { + die "Unknown line from SERVER: $line"; + } + }, + ServerError => sub + { + # Thanks to H. Merijn Brand for spotting this FAIL in 5.12.0! + # The default PoCo::Client::TCP handler will throw a warning, which causes Test::NoWarnings to FAIL :( + my ($syscall, $errno, $error) = @_[ ARG0..ARG2 ]; + + $error = "Normal disconnection" unless $error; + my $msg = "Got CLIENT $syscall error $errno: $error"; + diag( $msg ) if $ENV{TEST_VERBOSE}; + }, +); + +$poe_kernel->run(); + +if ( ! $server_ping2 or ! $client_ping2 ) { + diag( "WARNING: Your platform/SSL library does not support renegotiation of the SSL socket." ); + diag( "This test harness detected that trying to renegotiate resulted in a disconnected socket." ); + diag( "POE::Component::SSLify will work on your system, but please do not attempt a SSL renegotiate." ); + diag( "Please talk with the author to figure out if this issue can be worked around, thank you!" ); +} + +done_testing; diff -Nru libpoe-component-sslify-perl-1.008/t/renegotiate_server.t libpoe-component-sslify-perl-1.012/t/renegotiate_server.t --- libpoe-component-sslify-perl-1.008/t/renegotiate_server.t 1970-01-01 00:00:00.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/t/renegotiate_server.t 2014-11-14 20:20:01.000000000 +0000 @@ -0,0 +1,167 @@ +#!/usr/bin/perl +# +# This file is part of POE-Component-SSLify +# +# This software is copyright (c) 2014 by Apocalypse. +# +# This is free software; you can redistribute it and/or modify it under +# the same terms as the Perl 5 programming language system itself. +# +use strict; use warnings; +use strict; use warnings; + +# Thanks to ASCENT for this test! +# This test adds renegotiation to the connection from server-side + +use Test::FailWarnings; +use Test::More 1.001002; # new enough for sanity in done_testing() + +use POE 1.267; +use POE::Component::Client::TCP; +use POE::Component::Server::TCP; +use POE::Component::SSLify qw/Client_SSLify Server_SSLify SSLify_Options SSLify_GetCipher SSLify_ContextCreate SSLify_GetSocket SSLify_GetSSL/; + +# TODO rewrite this to use Test::POE::Server::TCP and stuff :) + +my $port; +my $server_ping2; +my $client_ping2; + +POE::Component::Server::TCP->new +( + Alias => 'myserver', + Address => '127.0.0.1', + Port => 0, + + Started => sub + { + use Socket qw/sockaddr_in/; + $port = (sockaddr_in($_[HEAP]->{listener}->getsockname))[0]; + }, + ClientConnected => sub + { + ok(1, 'SERVER: accepted'); + $_[HEAP]->{client}->put("ping"); + }, + ClientDisconnected => sub + { + ok(1, 'SERVER: client disconnected'); + $_[KERNEL]->post(myserver => 'shutdown'); + }, + ClientPreConnect => sub + { + eval { SSLify_Options('mylib/example.key', 'mylib/example.crt', 'sslv3') }; + eval { SSLify_Options('../mylib/example.key', '../mylib/example.crt', 'sslv3') } if ($@); + ok(!$@, "SERVER: SSLify_Options $@"); + + my $socket = eval { Server_SSLify($_[ARG0]) }; + ok(!$@, "SERVER: Server_SSLify $@"); + ok(1, 'SERVER: SSLify_GetCipher: '. SSLify_GetCipher($socket)); + + # We pray that IO::Handle is sane... + ok( SSLify_GetSocket( $socket )->blocking == 0, 'SERVER: SSLified socket is non-blocking?') if $^O ne 'MSWin32'; + + return ($socket); + }, + ClientInput => sub + { + my ($kernel, $heap, $line) = @_[KERNEL, HEAP, ARG0]; + + if ($line eq 'pong') { + ok(1, "SERVER: recv: $line"); + + ## At this point, connection MUST be encrypted. + my $cipher = SSLify_GetCipher($heap->{client}->get_output_handle); + ok($cipher ne '(NONE)', "SERVER: SSLify_GetCipher: $cipher"); + + Net::SSLeay::renegotiate( SSLify_GetSSL( $heap->{client}->get_output_handle ) ); + + $heap->{client}->put("ping2"); + } elsif ($line eq 'pong2') { + $server_ping2++; + $kernel->yield( 'shutdown' ); + } else { + die "Unknown line from CLIENT: $line"; + } + }, + ClientError => sub + { + # Thanks to H. Merijn Brand for spotting this FAIL in 5.12.0! + # The default PoCo::Server::TCP handler will throw a warning, which causes Test::NoWarnings to FAIL :( + my ($syscall, $errno, $error) = @_[ ARG0..ARG2 ]; + + # TODO are there other "errors" that is harmless? + $error = "Normal disconnection" unless $error; + my $msg = "Got SERVER $syscall error $errno: $error"; + unless ( $syscall eq 'read' and $errno == 0 ) { +# fail( $msg ); + } else { + diag( $msg ) if $ENV{TEST_VERBOSE}; + } + }, +); + +POE::Component::Client::TCP->new +( + Alias => 'myclient', + RemoteAddress => '127.0.0.1', + RemotePort => $port, + + Connected => sub + { + ok(1, 'CLIENT: connected'); + }, + PreConnect => sub + { + my $ctx = eval { SSLify_ContextCreate(undef, undef, 'sslv3') }; + ok(!$@, "CLIENT: SSLify_ContextCreate $@"); + my $socket = eval { Client_SSLify($_[ARG0], undef, undef, $ctx) }; + ok(!$@, "CLIENT: Client_SSLify $@"); + ok(1, 'CLIENT: SSLify_GetCipher: '. SSLify_GetCipher($socket)); + + # We pray that IO::Handle is sane... + ok( SSLify_GetSocket( $socket )->blocking == 0, 'CLIENT: SSLified socket is non-blocking?') if $^O ne 'MSWin32'; + + return ($socket); + }, + ServerInput => sub + { + my ($kernel, $heap, $line) = @_[KERNEL, HEAP, ARG0]; + + if ($line eq 'ping') { + ok(1, "CLIENT: recv: $line"); + + ## At this point, connection MUST be encrypted. + my $cipher = SSLify_GetCipher($heap->{server}->get_output_handle); + ok($cipher ne '(NONE)', "CLIENT: SSLify_GetCipher: $cipher"); + + $_[HEAP]->{server}->put("pong"); + } elsif ( $line eq 'ping2' ) { + $client_ping2++; + $_[HEAP]->{server}->put("pong2"); + } else { + die "Unknown line from SERVER: $line"; + } + }, + ServerError => sub + { + # Thanks to H. Merijn Brand for spotting this FAIL in 5.12.0! + # The default PoCo::Client::TCP handler will throw a warning, which causes Test::NoWarnings to FAIL :( + my ($syscall, $errno, $error) = @_[ ARG0..ARG2 ]; + + $error = "Normal disconnection" unless $error; + my $msg = "Got CLIENT $syscall error $errno: $error"; + diag( $msg ) if $ENV{TEST_VERBOSE}; + }, +); + +$poe_kernel->run(); + +if ( ! $server_ping2 or ! $client_ping2 ) { + diag( "WARNING: Your platform/SSL library does not support renegotiation of the SSL socket." ); + diag( "This test harness detected that trying to renegotiate resulted in a disconnected socket." ); + diag( "POE::Component::SSLify will work on your system, but please do not attempt a SSL renegotiate." ); + diag( "Please talk with the author to figure out if this issue can be worked around, thank you!" ); +} + +done_testing; diff -Nru libpoe-component-sslify-perl-1.008/t/simple_large.t libpoe-component-sslify-perl-1.012/t/simple_large.t --- libpoe-component-sslify-perl-1.008/t/simple_large.t 1970-01-01 00:00:00.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/t/simple_large.t 2014-11-14 20:20:01.000000000 +0000 @@ -0,0 +1,159 @@ +#!/usr/bin/perl +# +# This file is part of POE-Component-SSLify +# +# This software is copyright (c) 2014 by Apocalypse. +# +# This is free software; you can redistribute it and/or modify it under +# the same terms as the Perl 5 programming language system itself. +# +use strict; use warnings; +use strict; use warnings; + +# This is an extension of the simple.t test to test for large responses + +use Test::FailWarnings; +use Test::More 1.001002; # new enough for sanity in done_testing() + +use POE 1.267; +use POE::Component::Client::TCP; +use POE::Component::Server::TCP; +use POE::Component::SSLify qw/Client_SSLify Server_SSLify SSLify_Options SSLify_GetCipher SSLify_ContextCreate SSLify_GetSocket SSLify_GetSSL/; + +# TODO rewrite this to use Test::POE::Server::TCP and stuff :) + +my $port; + +# length $bigpacket = 2079998 ( just need to go over 42643B as reported in RT#58243 but... =) +my $bigpacket = join( '-', ('a' .. 'z') x 10000, ('A' .. 'Z') x 10000 ) x 2; + +POE::Component::Server::TCP->new +( + Alias => 'myserver', + Address => '127.0.0.1', + Port => 0, + ClientFilter => ['POE::Filter::Block', 'BlockSize' => length $bigpacket], + Started => sub + { + use Socket qw/sockaddr_in/; + $port = (sockaddr_in($_[HEAP]->{listener}->getsockname))[0]; + }, + ClientConnected => sub + { + ok(1, 'SERVER: accepted'); + }, + ClientDisconnected => sub + { + ok(1, 'SERVER: client disconnected'); + $_[KERNEL]->post(myserver => 'shutdown'); + }, + ClientPreConnect => sub + { + eval { SSLify_Options('mylib/example.key', 'mylib/example.crt', 'sslv3') }; + eval { SSLify_Options('../mylib/example.key', '../mylib/example.crt', 'sslv3') } if ($@); + ok(!$@, "SERVER: SSLify_Options $@"); + + my $socket = eval { Server_SSLify($_[ARG0]) }; + ok(!$@, "SERVER: Server_SSLify $@"); + ok(1, 'SERVER: SSLify_GetCipher: '. SSLify_GetCipher($socket)); + + # We pray that IO::Handle is sane... + ok( SSLify_GetSocket( $socket )->blocking == 0, 'SERVER: SSLified socket is non-blocking?') if $^O ne 'MSWin32'; + + return ($socket); + }, + ClientInput => sub + { + my ($kernel, $heap, $line) = @_[KERNEL, HEAP, ARG0]; + + if ( $line eq $bigpacket ) { + ok(1, "SERVER: recv BIGPACKET"); + + ## At this point, connection MUST be encrypted. + my $cipher = SSLify_GetCipher($heap->{client}->get_output_handle); + ok($cipher ne '(NONE)', "SERVER: SSLify_GetCipher: $cipher"); + + $heap->{client}->put($bigpacket); + } else { + die "Unknown line from CLIENT: $line"; + } + }, + ClientError => sub + { + # Thanks to H. Merijn Brand for spotting this FAIL in 5.12.0! + # The default PoCo::Server::TCP handler will throw a warning, which causes Test::NoWarnings to FAIL :( + my ($syscall, $errno, $error) = @_[ ARG0..ARG2 ]; + + # TODO are there other "errors" that is harmless? + $error = "Normal disconnection" unless $error; + my $msg = "Got SERVER $syscall error $errno: $error"; + unless ( $syscall eq 'read' and $errno == 0 ) { + fail( $msg ); + } else { + diag( $msg ) if $ENV{TEST_VERBOSE}; + } + }, +); + +POE::Component::Client::TCP->new +( + Alias => 'myclient', + RemoteAddress => '127.0.0.1', + RemotePort => $port, + Filter => ['POE::Filter::Block', 'BlockSize' => length $bigpacket], + Connected => sub + { + ok(1, 'CLIENT: connected'); + + $_[HEAP]->{server}->put($bigpacket); + }, + PreConnect => sub + { + my $ctx = eval { SSLify_ContextCreate(undef, undef, 'sslv3') }; + ok(!$@, "CLIENT: SSLify_ContextCreate $@"); + my $socket = eval { Client_SSLify($_[ARG0], undef, undef, $ctx) }; + ok(!$@, "CLIENT: Client_SSLify $@"); + ok(1, 'CLIENT: SSLify_GetCipher: '. SSLify_GetCipher($socket)); + + # We pray that IO::Handle is sane... + ok( SSLify_GetSocket( $socket )->blocking == 0, 'CLIENT: SSLified socket is non-blocking?') if $^O ne 'MSWin32'; + + return ($socket); + }, + ServerInput => sub + { + my ($kernel, $heap, $line) = @_[KERNEL, HEAP, ARG0]; + + if ($line eq $bigpacket) { + ok(1, "CLIENT: recv BIGPACKET"); + + ## At this point, connection MUST be encrypted. + my $cipher = SSLify_GetCipher($heap->{server}->get_output_handle); + ok($cipher ne '(NONE)', "CLIENT: SSLify_GetCipher: $cipher"); + diag( Net::SSLeay::dump_peer_certificate( SSLify_GetSSL( $heap->{server}->get_output_handle ) ) ) if $ENV{TEST_VERBOSE}; + + $kernel->yield('shutdown'); + } else { + die "Unknown line from SERVER: $line"; + } + }, + ServerError => sub + { + # Thanks to H. Merijn Brand for spotting this FAIL in 5.12.0! + # The default PoCo::Client::TCP handler will throw a warning, which causes Test::NoWarnings to FAIL :( + my ($syscall, $errno, $error) = @_[ ARG0..ARG2 ]; + + # TODO are there other "errors" that is harmless? + $error = "Normal disconnection" unless $error; + my $msg = "Got CLIENT $syscall error $errno: $error"; + unless ( $syscall eq 'read' and $errno == 0 ) { + fail( $msg ); + } else { + diag( $msg ) if $ENV{TEST_VERBOSE}; + } + }, +); + +$poe_kernel->run(); + +done_testing; diff -Nru libpoe-component-sslify-perl-1.008/t/simple_parallel_large.t libpoe-component-sslify-perl-1.012/t/simple_parallel_large.t --- libpoe-component-sslify-perl-1.008/t/simple_parallel_large.t 1970-01-01 00:00:00.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/t/simple_parallel_large.t 2014-11-14 20:20:01.000000000 +0000 @@ -0,0 +1,157 @@ +#!/usr/bin/perl +# +# This file is part of POE-Component-SSLify +# +# This software is copyright (c) 2014 by Apocalypse. +# +# This is free software; you can redistribute it and/or modify it under +# the same terms as the Perl 5 programming language system itself. +# +use strict; use warnings; +use strict; use warnings; + +# This is an extension of the simple_parallel.t test to test for large responses + +use Test::FailWarnings; +use Test::More 1.001002; # new enough for sanity in done_testing() + +use POE 1.267; +use POE::Component::Client::TCP; +use POE::Component::Server::TCP; +use POE::Component::SSLify qw/Client_SSLify Server_SSLify SSLify_Options SSLify_GetCipher SSLify_ContextCreate SSLify_GetSocket SSLify_GetSSL/; + +# TODO rewrite this to use Test::POE::Server::TCP and stuff :) + +my $port; +my $replies = 0; + +my $bigpacket = join( '-', ('a' .. 'z') x 10000, ('A' .. 'Z') x 10000 ) x 2; + +POE::Component::Server::TCP->new +( + Alias => 'myserver', + Address => '127.0.0.1', + Port => 0, + ClientFilter => ['POE::Filter::Block', 'BlockSize' => length $bigpacket], + Started => sub + { + use Socket qw/sockaddr_in/; + $port = (sockaddr_in($_[HEAP]->{listener}->getsockname))[0]; + }, + ClientConnected => sub + { + ok(1, 'SERVER: accepted'); + }, + ClientDisconnected => sub + { + ok(1, 'SERVER: client disconnected'); + $_[KERNEL]->post(myserver => 'shutdown') if $replies == 10; + }, + ClientPreConnect => sub + { + eval { SSLify_Options('mylib/example.key', 'mylib/example.crt', 'sslv3') }; + eval { SSLify_Options('../mylib/example.key', '../mylib/example.crt', 'sslv3') } if ($@); + ok(!$@, "SERVER: SSLify_Options $@"); + + my $socket = eval { Server_SSLify($_[ARG0]) }; + ok(!$@, "SERVER: Server_SSLify $@"); + ok(1, 'SERVER: SSLify_GetCipher: '. SSLify_GetCipher($socket)); + + # We pray that IO::Handle is sane... + ok( SSLify_GetSocket( $socket )->blocking == 0, 'SERVER: SSLified socket is non-blocking?') if $^O ne 'MSWin32'; + + return ($socket); + }, + ClientInput => sub + { + my ($kernel, $heap, $line) = @_[KERNEL, HEAP, ARG0]; + + if ( $line eq $bigpacket ) { + ## At this point, connection MUST be encrypted. + my $cipher = SSLify_GetCipher($heap->{client}->get_output_handle); + ok($cipher ne '(NONE)', "SERVER: SSLify_GetCipher: $cipher"); + + $heap->{client}->put($bigpacket); + } else { + die "Unknown line from CLIENT: $line"; + } + }, + ClientError => sub + { + # Thanks to H. Merijn Brand for spotting this FAIL in 5.12.0! + # The default PoCo::Server::TCP handler will throw a warning, which causes Test::NoWarnings to FAIL :( + my ($syscall, $errno, $error) = @_[ ARG0..ARG2 ]; + + # TODO are there other "errors" that is harmless? + $error = "Normal disconnection" unless $error; + my $msg = "Got SERVER $syscall error $errno: $error"; + unless ( $syscall eq 'read' and $errno == 0 ) { + fail( $msg ); + } else { + diag( $msg ) if $ENV{TEST_VERBOSE}; + } + }, +); + +POE::Component::Client::TCP->new +( + Alias => 'myclient', + RemoteAddress => '127.0.0.1', + RemotePort => $port, + Filter => ['POE::Filter::Block', 'BlockSize' => length $bigpacket], + Connected => sub + { + ok(1, 'CLIENT: connected'); + + $_[HEAP]->{server}->put($bigpacket); + }, + PreConnect => sub + { + my $ctx = eval { SSLify_ContextCreate(undef, undef, 'sslv3') }; + ok(!$@, "CLIENT: SSLify_ContextCreate $@"); + my $socket = eval { Client_SSLify($_[ARG0], undef, undef, $ctx) }; + ok(!$@, "CLIENT: Client_SSLify $@"); + ok(1, 'CLIENT: SSLify_GetCipher: '. SSLify_GetCipher($socket)); + + # We pray that IO::Handle is sane... + ok( SSLify_GetSocket( $socket )->blocking == 0, 'CLIENT: SSLified socket is non-blocking?') if $^O ne 'MSWin32'; + + return ($socket); + }, + ServerInput => sub + { + my ($kernel, $heap, $line) = @_[KERNEL, HEAP, ARG0]; + + if ($line eq $bigpacket) { + ## At this point, connection MUST be encrypted. + my $cipher = SSLify_GetCipher($heap->{server}->get_output_handle); + ok($cipher ne '(NONE)', "CLIENT: SSLify_GetCipher: $cipher"); + diag( Net::SSLeay::dump_peer_certificate( SSLify_GetSSL( $heap->{server}->get_output_handle ) ) ) if $ENV{TEST_VERBOSE}; + $replies++; + $kernel->yield('shutdown'); + } else { + die "Unknown line from SERVER: $line"; + } + }, + ServerError => sub + { + # Thanks to H. Merijn Brand for spotting this FAIL in 5.12.0! + # The default PoCo::Client::TCP handler will throw a warning, which causes Test::NoWarnings to FAIL :( + my ($syscall, $errno, $error) = @_[ ARG0..ARG2 ]; + + # TODO are there other "errors" that is harmless? + $error = "Normal disconnection" unless $error; + my $msg = "Got CLIENT $syscall error $errno: $error"; + unless ( $syscall eq 'read' and $errno == 0 ) { + fail( $msg ); + } else { + diag( $msg ) if $ENV{TEST_VERBOSE}; + } + }, +) for 1 .. 10; + +$poe_kernel->run(); + +is( $replies, 10, "Make sure we got 10 replies back!" ); + +done_testing; diff -Nru libpoe-component-sslify-perl-1.008/t/simple_parallel_superbig.t libpoe-component-sslify-perl-1.012/t/simple_parallel_superbig.t --- libpoe-component-sslify-perl-1.008/t/simple_parallel_superbig.t 1970-01-01 00:00:00.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/t/simple_parallel_superbig.t 2014-11-14 20:20:01.000000000 +0000 @@ -0,0 +1,175 @@ +#!/usr/bin/perl +# +# This file is part of POE-Component-SSLify +# +# This software is copyright (c) 2014 by Apocalypse. +# +# This is free software; you can redistribute it and/or modify it under +# the same terms as the Perl 5 programming language system itself. +# +use strict; use warnings; +use strict; use warnings; + +# This is an extension of the simple_parallel_large.t test for even LARGER message sizes! +# and thus is marked as TODO and a watchdog timer of 2m is set in case we lock up - see RT#95071 + +use Test::FailWarnings; +use Test::More 1.001002; # new enough for sanity in done_testing() + +BEGIN { + eval 'use IO::Prompt::Tiny qw/prompt/; my $ans = prompt("This is a long test, do you want to run it? (y/n)", ($ENV{"AUTOMATED_TESTING"} ? "y" : "n")); die "NO" if $ans ne "y";'; + if ( $@ ) { + plan skip_all => "AUTHOR TEST: $@"; + } +} + +use POE 1.267; +use POE::Component::Client::TCP; +use POE::Component::Server::TCP; +use POE::Component::SSLify qw/Client_SSLify Server_SSLify SSLify_Options SSLify_GetCipher SSLify_ContextCreate SSLify_GetSocket SSLify_GetSSL/; + +# TODO rewrite this to use Test::POE::Server::TCP and stuff :) + +my $port; +my $replies = 0; + +# TODO interestingly, x3 goes over some sort of buffer size and this explodes! +my $bigpacket = join( '-', ('a' .. 'z') x 10000, ('A' .. 'Z') x 10000 ) x 10; + +POE::Component::Server::TCP->new +( + Alias => 'myserver', + Address => '127.0.0.1', + Port => 0, + ClientFilter => ['POE::Filter::Block', 'BlockSize' => length $bigpacket], + Started => sub + { + use Socket qw/sockaddr_in/; + $port = (sockaddr_in($_[HEAP]->{listener}->getsockname))[0]; + }, + ClientConnected => sub + { + ok(1, 'SERVER: accepted'); + }, + ClientDisconnected => sub + { + ok(1, 'SERVER: client disconnected'); + $_[KERNEL]->post(myserver => 'shutdown') if $replies == 10; + }, + ClientPreConnect => sub + { + eval { SSLify_Options('mylib/example.key', 'mylib/example.crt', 'sslv3') }; + eval { SSLify_Options('../mylib/example.key', '../mylib/example.crt', 'sslv3') } if ($@); + ok(!$@, "SERVER: SSLify_Options $@"); + + my $socket = eval { Server_SSLify($_[ARG0]) }; + ok(!$@, "SERVER: Server_SSLify $@"); + ok(1, 'SERVER: SSLify_GetCipher: '. SSLify_GetCipher($socket)); + + # We pray that IO::Handle is sane... + ok( SSLify_GetSocket( $socket )->blocking == 0, 'SERVER: SSLified socket is non-blocking?') if $^O ne 'MSWin32'; + + return ($socket); + }, + ClientInput => sub + { + my ($kernel, $heap, $line) = @_[KERNEL, HEAP, ARG0]; + + if ( $line eq $bigpacket ) { + ## At this point, connection MUST be encrypted. + my $cipher = SSLify_GetCipher($heap->{client}->get_output_handle); + ok($cipher ne '(NONE)', "SERVER: SSLify_GetCipher: $cipher"); + + $heap->{client}->put($bigpacket); + } else { + die "Unknown line from CLIENT: $line"; + } + }, + ClientError => sub + { + # Thanks to H. Merijn Brand for spotting this FAIL in 5.12.0! + # The default PoCo::Server::TCP handler will throw a warning, which causes Test::NoWarnings to FAIL :( + my ($syscall, $errno, $error) = @_[ ARG0..ARG2 ]; + + # TODO are there other "errors" that is harmless? + $error = "Normal disconnection" unless $error; + my $msg = "Got SERVER $syscall error $errno: $error"; + unless ( $syscall eq 'read' and $errno == 0 ) { + fail( $msg ); + } else { + diag( $msg ) if $ENV{TEST_VERBOSE}; + } + }, +); + +POE::Component::Client::TCP->new +( + Alias => 'myclient', + RemoteAddress => '127.0.0.1', + RemotePort => $port, + Filter => ['POE::Filter::Block', 'BlockSize' => length $bigpacket], + Connected => sub + { + ok(1, 'CLIENT: connected'); + + $_[HEAP]->{server}->put($bigpacket); + }, + PreConnect => sub + { + my $ctx = eval { SSLify_ContextCreate(undef, undef, 'sslv3') }; + ok(!$@, "CLIENT: SSLify_ContextCreate $@"); + my $socket = eval { Client_SSLify($_[ARG0], undef, undef, $ctx) }; + ok(!$@, "CLIENT: Client_SSLify $@"); + ok(1, 'CLIENT: SSLify_GetCipher: '. SSLify_GetCipher($socket)); + + # We pray that IO::Handle is sane... + ok( SSLify_GetSocket( $socket )->blocking == 0, 'CLIENT: SSLified socket is non-blocking?') if $^O ne 'MSWin32'; + + return ($socket); + }, + ServerInput => sub + { + my ($kernel, $heap, $line) = @_[KERNEL, HEAP, ARG0]; + + if ($line eq $bigpacket) { + ## At this point, connection MUST be encrypted. + my $cipher = SSLify_GetCipher($heap->{server}->get_output_handle); + ok($cipher ne '(NONE)', "CLIENT: SSLify_GetCipher: $cipher"); + diag( Net::SSLeay::dump_peer_certificate( SSLify_GetSSL( $heap->{server}->get_output_handle ) ) ) if $ENV{TEST_VERBOSE}; + $replies++; + $kernel->yield('shutdown'); + } else { + die "Unknown line from SERVER: $line"; + } + }, + ServerError => sub + { + # Thanks to H. Merijn Brand for spotting this FAIL in 5.12.0! + # The default PoCo::Client::TCP handler will throw a warning, which causes Test::NoWarnings to FAIL :( + my ($syscall, $errno, $error) = @_[ ARG0..ARG2 ]; + + # TODO are there other "errors" that is harmless? + $error = "Normal disconnection" unless $error; + my $msg = "Got CLIENT $syscall error $errno: $error"; + unless ( $syscall eq 'read' and $errno == 0 ) { + fail( $msg ); + } else { + diag( $msg ) if $ENV{TEST_VERBOSE}; + } + }, +) for 1 .. 10; + +# the watchdog session +POE::Session->create( + inline_states => { + _start => sub { $_[KERNEL]->delay( 'dog' => 300 ); $_[KERNEL]->yield( 'check' ); }, + dog => sub { fail "WATCHDOG TRIGGERED"; done_testing; exit; }, + check => sub { $_[KERNEL]->delay( 'check' => 1 ); $_[KERNEL]->alarm_remove_all if $replies == 10; }, + }, +); + +$poe_kernel->run(); + +is( $replies, 10, "Make sure we got 10 replies back!" ); + +done_testing; diff -Nru libpoe-component-sslify-perl-1.008/t/simple_parallel.t libpoe-component-sslify-perl-1.012/t/simple_parallel.t --- libpoe-component-sslify-perl-1.008/t/simple_parallel.t 1970-01-01 00:00:00.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/t/simple_parallel.t 2014-11-14 20:20:01.000000000 +0000 @@ -0,0 +1,159 @@ +#!/usr/bin/perl +# +# This file is part of POE-Component-SSLify +# +# This software is copyright (c) 2014 by Apocalypse. +# +# This is free software; you can redistribute it and/or modify it under +# the same terms as the Perl 5 programming language system itself. +# +use strict; use warnings; +use strict; use warnings; + +# This is an extension of the simple.t to test requests in parallel + +use Test::FailWarnings; +use Test::More 1.001002; # new enough for sanity in done_testing() + +use POE 1.267; +use POE::Component::Client::TCP; +use POE::Component::Server::TCP; +use POE::Component::SSLify qw/Client_SSLify Server_SSLify SSLify_Options SSLify_GetCipher SSLify_ContextCreate SSLify_GetSocket SSLify_GetSSL/; + +# TODO rewrite this to use Test::POE::Server::TCP and stuff :) + +my $port; +my $replies = 0; + +POE::Component::Server::TCP->new +( + Alias => 'myserver', + Address => '127.0.0.1', + Port => 0, + + Started => sub + { + use Socket qw/sockaddr_in/; + $port = (sockaddr_in($_[HEAP]->{listener}->getsockname))[0]; + }, + ClientConnected => sub + { + ok(1, 'SERVER: accepted'); + }, + ClientDisconnected => sub + { + ok(1, 'SERVER: client disconnected'); + $_[KERNEL]->post(myserver => 'shutdown') if $replies == 10; + }, + ClientPreConnect => sub + { + eval { SSLify_Options('mylib/example.key', 'mylib/example.crt', 'sslv3') }; + eval { SSLify_Options('../mylib/example.key', '../mylib/example.crt', 'sslv3') } if ($@); + ok(!$@, "SERVER: SSLify_Options $@"); + + my $socket = eval { Server_SSLify($_[ARG0]) }; + ok(!$@, "SERVER: Server_SSLify $@"); + ok(1, 'SERVER: SSLify_GetCipher: '. SSLify_GetCipher($socket)); + + # We pray that IO::Handle is sane... + ok( SSLify_GetSocket( $socket )->blocking == 0, 'SERVER: SSLified socket is non-blocking?') if $^O ne 'MSWin32'; + + return ($socket); + }, + ClientInput => sub + { + my ($kernel, $heap, $line) = @_[KERNEL, HEAP, ARG0]; + + if ( $line eq 'ping' ) { + ok(1, "SERVER: recv: $line"); + + ## At this point, connection MUST be encrypted. + my $cipher = SSLify_GetCipher($heap->{client}->get_output_handle); + ok($cipher ne '(NONE)', "SERVER: SSLify_GetCipher: $cipher"); + + $heap->{client}->put('pong'); + } else { + die "Unknown line from CLIENT: $line"; + } + }, + ClientError => sub + { + # Thanks to H. Merijn Brand for spotting this FAIL in 5.12.0! + # The default PoCo::Server::TCP handler will throw a warning, which causes Test::NoWarnings to FAIL :( + my ($syscall, $errno, $error) = @_[ ARG0..ARG2 ]; + + # TODO are there other "errors" that is harmless? + $error = "Normal disconnection" unless $error; + my $msg = "Got SERVER $syscall error $errno: $error"; + unless ( $syscall eq 'read' and $errno == 0 ) { + fail( $msg ); + } else { + diag( $msg ) if $ENV{TEST_VERBOSE}; + } + }, +); + +POE::Component::Client::TCP->new +( + Alias => 'myclient', + RemoteAddress => '127.0.0.1', + RemotePort => $port, + + Connected => sub + { + ok(1, 'CLIENT: connected'); + + $_[HEAP]->{server}->put('ping'); + }, + PreConnect => sub + { + my $ctx = eval { SSLify_ContextCreate(undef, undef, 'sslv3') }; + ok(!$@, "CLIENT: SSLify_ContextCreate $@"); + my $socket = eval { Client_SSLify($_[ARG0], undef, undef, $ctx) }; + ok(!$@, "CLIENT: Client_SSLify $@"); + ok(1, 'CLIENT: SSLify_GetCipher: '. SSLify_GetCipher($socket)); + + # We pray that IO::Handle is sane... + ok( SSLify_GetSocket( $socket )->blocking == 0, 'CLIENT: SSLified socket is non-blocking?') if $^O ne 'MSWin32'; + + return ($socket); + }, + ServerInput => sub + { + my ($kernel, $heap, $line) = @_[KERNEL, HEAP, ARG0]; + + if ($line eq 'pong') { + ok(1, "CLIENT: recv: $line"); + + ## At this point, connection MUST be encrypted. + my $cipher = SSLify_GetCipher($heap->{server}->get_output_handle); + ok($cipher ne '(NONE)', "CLIENT: SSLify_GetCipher: $cipher"); + diag( Net::SSLeay::dump_peer_certificate( SSLify_GetSSL( $heap->{server}->get_output_handle ) ) ) if $ENV{TEST_VERBOSE}; + $replies++; + $kernel->yield('shutdown'); + } else { + die "Unknown line from SERVER: $line"; + } + }, + ServerError => sub + { + # Thanks to H. Merijn Brand for spotting this FAIL in 5.12.0! + # The default PoCo::Client::TCP handler will throw a warning, which causes Test::NoWarnings to FAIL :( + my ($syscall, $errno, $error) = @_[ ARG0..ARG2 ]; + + # TODO are there other "errors" that is harmless? + $error = "Normal disconnection" unless $error; + my $msg = "Got CLIENT $syscall error $errno: $error"; + unless ( $syscall eq 'read' and $errno == 0 ) { + fail( $msg ); + } else { + diag( $msg ) if $ENV{TEST_VERBOSE}; + } + }, +) for 1 .. 10; + +$poe_kernel->run(); + +is( $replies, 10, "Make sure we got 10 replies back!" ); + +done_testing; diff -Nru libpoe-component-sslify-perl-1.008/t/simple_superbig.t libpoe-component-sslify-perl-1.012/t/simple_superbig.t --- libpoe-component-sslify-perl-1.008/t/simple_superbig.t 1970-01-01 00:00:00.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/t/simple_superbig.t 2014-11-14 20:20:01.000000000 +0000 @@ -0,0 +1,178 @@ +#!/usr/bin/perl +# +# This file is part of POE-Component-SSLify +# +# This software is copyright (c) 2014 by Apocalypse. +# +# This is free software; you can redistribute it and/or modify it under +# the same terms as the Perl 5 programming language system itself. +# +use strict; use warnings; +use strict; use warnings; + +# This is an extension of the simple_large.t test for even LARGER message sizes! +# and thus is marked as TODO and a watchdog timer is set in case we lock up - see RT#95071 + +use Test::FailWarnings; +use Test::More 1.001002; # new enough for sanity in done_testing() + +BEGIN { + eval 'use IO::Prompt::Tiny qw/prompt/; my $ans = prompt("This is a long test, do you want to run it? (y/n)", ($ENV{"AUTOMATED_TESTING"} ? "y" : "n")); die "NO" if $ans ne "y";'; + if ( $@ ) { + plan skip_all => "AUTHOR TEST: $@"; + } +} + +use POE 1.267; +use POE::Component::Client::TCP; +use POE::Component::Server::TCP; +use POE::Component::SSLify qw/Client_SSLify Server_SSLify SSLify_Options SSLify_GetCipher SSLify_ContextCreate SSLify_GetSocket SSLify_GetSSL/; + +# TODO rewrite this to use Test::POE::Server::TCP and stuff :) + +my $port; + +# TODO interestingly, x3 goes over some sort of buffer size and this explodes! +my $bigpacket = join( '-', ('a' .. 'z') x 10000, ('A' .. 'Z') x 10000 ) x 10; + +POE::Component::Server::TCP->new +( + Alias => 'myserver', + Address => '127.0.0.1', + Port => 0, + ClientFilter => ['POE::Filter::Block', 'BlockSize' => length $bigpacket], + Started => sub + { + use Socket qw/sockaddr_in/; + $port = (sockaddr_in($_[HEAP]->{listener}->getsockname))[0]; + }, + ClientConnected => sub + { + ok(1, 'SERVER: accepted'); + }, + ClientDisconnected => sub + { + ok(1, 'SERVER: client disconnected'); + $_[KERNEL]->post(myserver => 'shutdown'); + }, + ClientPreConnect => sub + { + eval { SSLify_Options('mylib/example.key', 'mylib/example.crt', 'sslv3') }; + eval { SSLify_Options('../mylib/example.key', '../mylib/example.crt', 'sslv3') } if ($@); + ok(!$@, "SERVER: SSLify_Options $@"); + + my $socket = eval { Server_SSLify($_[ARG0]) }; + ok(!$@, "SERVER: Server_SSLify $@"); + ok(1, 'SERVER: SSLify_GetCipher: '. SSLify_GetCipher($socket)); + + # We pray that IO::Handle is sane... + ok( SSLify_GetSocket( $socket )->blocking == 0, 'SERVER: SSLified socket is non-blocking?') if $^O ne 'MSWin32'; + + return ($socket); + }, + ClientInput => sub + { + my ($kernel, $heap, $line) = @_[KERNEL, HEAP, ARG0]; + + if ( $line eq $bigpacket ) { + ok(1, "SERVER: recv BIGPACKET"); + + ## At this point, connection MUST be encrypted. + my $cipher = SSLify_GetCipher($heap->{client}->get_output_handle); + ok($cipher ne '(NONE)', "SERVER: SSLify_GetCipher: $cipher"); + + $heap->{client}->put($bigpacket); + } else { + die "Unknown line from CLIENT: $line"; + } + }, + ClientError => sub + { + # Thanks to H. Merijn Brand for spotting this FAIL in 5.12.0! + # The default PoCo::Server::TCP handler will throw a warning, which causes Test::NoWarnings to FAIL :( + my ($syscall, $errno, $error) = @_[ ARG0..ARG2 ]; + + # TODO are there other "errors" that is harmless? + $error = "Normal disconnection" unless $error; + my $msg = "Got SERVER $syscall error $errno: $error"; + unless ( $syscall eq 'read' and $errno == 0 ) { + fail( $msg ); + } else { + diag( $msg ) if $ENV{TEST_VERBOSE}; + } + }, +); + +my $replies = 0; + +POE::Component::Client::TCP->new +( + Alias => 'myclient', + RemoteAddress => '127.0.0.1', + RemotePort => $port, + Filter => ['POE::Filter::Block', 'BlockSize' => length $bigpacket], + Connected => sub + { + ok(1, 'CLIENT: connected'); + + $_[HEAP]->{server}->put($bigpacket); + }, + PreConnect => sub + { + my $ctx = eval { SSLify_ContextCreate(undef, undef, 'sslv3') }; + ok(!$@, "CLIENT: SSLify_ContextCreate $@"); + my $socket = eval { Client_SSLify($_[ARG0], undef, undef, $ctx) }; + ok(!$@, "CLIENT: Client_SSLify $@"); + ok(1, 'CLIENT: SSLify_GetCipher: '. SSLify_GetCipher($socket)); + + # We pray that IO::Handle is sane... + ok( SSLify_GetSocket( $socket )->blocking == 0, 'CLIENT: SSLified socket is non-blocking?') if $^O ne 'MSWin32'; + + return ($socket); + }, + ServerInput => sub + { + my ($kernel, $heap, $line) = @_[KERNEL, HEAP, ARG0]; + + if ($line eq $bigpacket) { + ok(1, "CLIENT: recv BIGPACKET"); + + ## At this point, connection MUST be encrypted. + my $cipher = SSLify_GetCipher($heap->{server}->get_output_handle); + ok($cipher ne '(NONE)', "CLIENT: SSLify_GetCipher: $cipher"); + diag( Net::SSLeay::dump_peer_certificate( SSLify_GetSSL( $heap->{server}->get_output_handle ) ) ) if $ENV{TEST_VERBOSE}; + $replies++; + $kernel->yield('shutdown'); + } else { + die "Unknown line from SERVER: $line"; + } + }, + ServerError => sub + { + # Thanks to H. Merijn Brand for spotting this FAIL in 5.12.0! + # The default PoCo::Client::TCP handler will throw a warning, which causes Test::NoWarnings to FAIL :( + my ($syscall, $errno, $error) = @_[ ARG0..ARG2 ]; + + # TODO are there other "errors" that is harmless? + $error = "Normal disconnection" unless $error; + my $msg = "Got CLIENT $syscall error $errno: $error"; + unless ( $syscall eq 'read' and $errno == 0 ) { + fail( $msg ); + } else { + diag( $msg ) if $ENV{TEST_VERBOSE}; + } + }, +); + +# the watchdog session +POE::Session->create( + inline_states => { + _start => sub { $_[KERNEL]->delay( 'dog' => 300 ); $_[KERNEL]->yield( 'check' ); }, + dog => sub { fail "WATCHDOG TRIGGERED"; done_testing; exit; }, + check => sub { $_[KERNEL]->delay( 'check' => 1 ); $_[KERNEL]->alarm_remove_all if $replies == 1 }, + }, +); + +$poe_kernel->run(); + +done_testing; diff -Nru libpoe-component-sslify-perl-1.008/t/simple.t libpoe-component-sslify-perl-1.012/t/simple.t --- libpoe-component-sslify-perl-1.008/t/simple.t 1970-01-01 00:00:00.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/t/simple.t 2014-11-14 20:20:01.000000000 +0000 @@ -0,0 +1,157 @@ +#!/usr/bin/perl +# +# This file is part of POE-Component-SSLify +# +# This software is copyright (c) 2014 by Apocalypse. +# +# This is free software; you can redistribute it and/or modify it under +# the same terms as the Perl 5 programming language system itself. +# +use strict; use warnings; +use strict; use warnings; + +# Thanks to ASCENT for this test! +# This tests the basic functionality of sslify on client/server side + +use Test::FailWarnings; +use Test::More 1.001002; # new enough for sanity in done_testing() + +use POE 1.267; +use POE::Component::Client::TCP; +use POE::Component::Server::TCP; +use POE::Component::SSLify qw/Client_SSLify Server_SSLify SSLify_Options SSLify_GetCipher SSLify_ContextCreate SSLify_GetSocket SSLify_GetSSL/; + +# TODO rewrite this to use Test::POE::Server::TCP and stuff :) + +my $port; + +POE::Component::Server::TCP->new +( + Alias => 'myserver', + Address => '127.0.0.1', + Port => 0, + + Started => sub + { + use Socket qw/sockaddr_in/; + $port = (sockaddr_in($_[HEAP]->{listener}->getsockname))[0]; + }, + ClientConnected => sub + { + ok(1, 'SERVER: accepted'); + }, + ClientDisconnected => sub + { + ok(1, 'SERVER: client disconnected'); + $_[KERNEL]->post(myserver => 'shutdown'); + }, + ClientPreConnect => sub + { + eval { SSLify_Options('mylib/example.key', 'mylib/example.crt', 'sslv3') }; + eval { SSLify_Options('../mylib/example.key', '../mylib/example.crt', 'sslv3') } if ($@); + ok(!$@, "SERVER: SSLify_Options $@"); + + my $socket = eval { Server_SSLify($_[ARG0]) }; + ok(!$@, "SERVER: Server_SSLify $@"); + ok(1, 'SERVER: SSLify_GetCipher: '. SSLify_GetCipher($socket)); + + # We pray that IO::Handle is sane... + ok( SSLify_GetSocket( $socket )->blocking == 0, 'SERVER: SSLified socket is non-blocking?') if $^O ne 'MSWin32'; + + return ($socket); + }, + ClientInput => sub + { + my ($kernel, $heap, $line) = @_[KERNEL, HEAP, ARG0]; + + if ( $line eq 'ping' ) { + ok(1, "SERVER: recv: $line"); + + ## At this point, connection MUST be encrypted. + my $cipher = SSLify_GetCipher($heap->{client}->get_output_handle); + ok($cipher ne '(NONE)', "SERVER: SSLify_GetCipher: $cipher"); + + $heap->{client}->put("pong"); + } else { + die "Unknown line from CLIENT: $line"; + } + }, + ClientError => sub + { + # Thanks to H. Merijn Brand for spotting this FAIL in 5.12.0! + # The default PoCo::Server::TCP handler will throw a warning, which causes Test::NoWarnings to FAIL :( + my ($syscall, $errno, $error) = @_[ ARG0..ARG2 ]; + + # TODO are there other "errors" that is harmless? + $error = "Normal disconnection" unless $error; + my $msg = "Got SERVER $syscall error $errno: $error"; + unless ( $syscall eq 'read' and $errno == 0 ) { + fail( $msg ); + } else { + diag( $msg ) if $ENV{TEST_VERBOSE}; + } + }, +); + +POE::Component::Client::TCP->new +( + Alias => 'myclient', + RemoteAddress => '127.0.0.1', + RemotePort => $port, + + Connected => sub + { + ok(1, 'CLIENT: connected'); + + $_[HEAP]->{server}->put("ping"); + }, + PreConnect => sub + { + my $ctx = eval { SSLify_ContextCreate(undef, undef, 'sslv3') }; + ok(!$@, "CLIENT: SSLify_ContextCreate $@"); + my $socket = eval { Client_SSLify($_[ARG0], undef, undef, $ctx) }; + ok(!$@, "CLIENT: Client_SSLify $@"); + ok(1, 'CLIENT: SSLify_GetCipher: '. SSLify_GetCipher($socket)); + + # We pray that IO::Handle is sane... + ok( SSLify_GetSocket( $socket )->blocking == 0, 'CLIENT: SSLified socket is non-blocking?') if $^O ne 'MSWin32'; + + return ($socket); + }, + ServerInput => sub + { + my ($kernel, $heap, $line) = @_[KERNEL, HEAP, ARG0]; + + if ($line eq 'pong') { + ok(1, "CLIENT: recv: $line"); + + ## At this point, connection MUST be encrypted. + my $cipher = SSLify_GetCipher($heap->{server}->get_output_handle); + ok($cipher ne '(NONE)', "CLIENT: SSLify_GetCipher: $cipher"); + diag( Net::SSLeay::dump_peer_certificate( SSLify_GetSSL( $heap->{server}->get_output_handle ) ) ) if $ENV{TEST_VERBOSE}; + + $kernel->yield('shutdown'); + } else { + die "Unknown line from SERVER: $line"; + } + }, + ServerError => sub + { + # Thanks to H. Merijn Brand for spotting this FAIL in 5.12.0! + # The default PoCo::Client::TCP handler will throw a warning, which causes Test::NoWarnings to FAIL :( + my ($syscall, $errno, $error) = @_[ ARG0..ARG2 ]; + + # TODO are there other "errors" that is harmless? + $error = "Normal disconnection" unless $error; + my $msg = "Got CLIENT $syscall error $errno: $error"; + unless ( $syscall eq 'read' and $errno == 0 ) { + fail( $msg ); + } else { + diag( $msg ) if $ENV{TEST_VERBOSE}; + } + }, +); + +$poe_kernel->run(); + +done_testing; diff -Nru libpoe-component-sslify-perl-1.008/t/upgrade.t libpoe-component-sslify-perl-1.012/t/upgrade.t --- libpoe-component-sslify-perl-1.008/t/upgrade.t 1970-01-01 00:00:00.000000000 +0000 +++ libpoe-component-sslify-perl-1.012/t/upgrade.t 2014-11-14 20:20:01.000000000 +0000 @@ -0,0 +1,181 @@ +#!/usr/bin/perl +# +# This file is part of POE-Component-SSLify +# +# This software is copyright (c) 2014 by Apocalypse. +# +# This is free software; you can redistribute it and/or modify it under +# the same terms as the Perl 5 programming language system itself. +# +use strict; use warnings; +use strict; use warnings; + +# This tests in-situ sslification ( upgrade a non-ssl socket to ssl ) + +use Test::FailWarnings; +use Test::More 1.001002; # new enough for sanity in done_testing() + +use POE 1.267; +use POE::Component::Client::TCP; +use POE::Component::Server::TCP; +use POE::Component::SSLify qw/Client_SSLify Server_SSLify SSLify_Options SSLify_GetCipher SSLify_ContextCreate SSLify_GetSocket/; + +# TODO rewrite this to use Test::POE::Server::TCP and stuff :) + +my $port; + +POE::Component::Server::TCP->new +( + Alias => 'myserver', + Address => '127.0.0.1', + Port => 0, + + Started => sub + { + use Socket qw/sockaddr_in/; + $port = (sockaddr_in($_[HEAP]->{listener}->getsockname))[0]; + }, + ClientConnected => sub + { + ok(1, 'SERVER: accepted'); + }, + ClientDisconnected => sub + { + ok(1, 'SERVER: client disconnected'); + $_[KERNEL]->post(myserver => 'shutdown'); + }, + ClientInput => sub + { + my ($kernel, $heap, $line) = @_[KERNEL, HEAP, ARG0]; + + if ( $line eq 'plaintext_ping' ) { + ok(1, "SERVER: recv: $line"); + $heap->{client}->put('plaintext_pong'); + $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 ($@); + ok(!$@, "SERVER: SSLify_Options $@"); + my $socket = eval { Server_SSLify($heap->{client}->get_output_handle) }; + ok(!$@, "SERVER: Server_SSLify $@"); + ok(1, 'SERVER: SSLify_GetCipher: '. SSLify_GetCipher($socket)); + + # We pray that IO::Handle is sane... + ok( SSLify_GetSocket( $socket )->blocking == 0, 'SERVER: SSLified socket is non-blocking?') if $^O ne 'MSWin32'; + + # TODO evil code here, ha! + # Should I ask rcaputo to add a $rw->replace_handle($socket) method? + # if you don't do the undef and just replace it - you'll get a bad file descriptor error from POE! + # select error: Bad file descriptor (hits=-1) + undef $heap->{client}; + $heap->{client} = POE::Wheel::ReadWrite->new( + Handle => $socket, + InputEvent => 'tcp_server_got_input', + ErrorEvent => 'tcp_server_got_error', + FlushedEvent => 'tcp_server_got_flush', + ); + } elsif ( $line eq 'ssl_ping' ) { + ok(1, "SERVER: recv: $line"); + + ## At this point, connection MUST be encrypted. + my $cipher = SSLify_GetCipher($heap->{client}->get_output_handle); + ok($cipher ne '(NONE)', "SERVER: SSLify_GetCipher: $cipher"); + + $heap->{client}->put('ssl_pong'); + } else { + die "Unknown line from CLIENT: $line"; + } + }, + ClientError => sub + { + # Thanks to H. Merijn Brand for spotting this FAIL in 5.12.0! + # The default PoCo::Server::TCP handler will throw a warning, which causes Test::NoWarnings to FAIL :( + my ($syscall, $errno, $error) = @_[ ARG0..ARG2 ]; + + # TODO are there other "errors" that is harmless? + $error = "Normal disconnection" unless $error; + my $msg = "Got SERVER $syscall error $errno: $error"; + unless ( $syscall eq 'read' and $errno == 0 ) { + fail( $msg ); + } else { + diag( $msg ) if $ENV{TEST_VERBOSE}; + } + }, +); + +POE::Component::Client::TCP->new +( + Alias => 'myclient', + RemoteAddress => '127.0.0.1', + RemotePort => $port, + + Connected => sub + { + ok(1, 'CLIENT: connected'); + + $_[HEAP]->{server}->put("plaintext_ping"); + }, + ServerInput => sub + { + my ($kernel, $heap, $line) = @_[KERNEL, HEAP, ARG0]; + + if ( $line eq 'plaintext_pong' ) { + ok(1, "CLIENT: recv: $line"); + + # sslify it in-situ! + my $ctx = eval { SSLify_ContextCreate(undef, undef, 'sslv3') }; + ok(!$@, "CLIENT: SSLify_ContextCreate $@"); + my $socket = eval { Client_SSLify($heap->{server}->get_output_handle, undef, undef, $ctx) }; + ok(!$@, "CLIENT: Client_SSLify $@"); + ok(1, 'CLIENT: SSLify_GetCipher: '. SSLify_GetCipher($socket)); + + # We pray that IO::Handle is sane... + ok( SSLify_GetSocket( $socket )->blocking == 0, 'CLIENT: SSLified socket is non-blocking?') if $^O ne 'MSWin32'; + + # TODO evil code here, ha! + # Should I ask rcaputo to add a $rw->replace_handle($socket) method? + # if you don't do the undef and just replace it - you'll get a bad file descriptor error from POE! + # select error: Bad file descriptor (hits=-1) + undef $heap->{server}; + $heap->{server} = POE::Wheel::ReadWrite->new( + Handle => $socket, + InputEvent => 'got_server_input', + ErrorEvent => 'got_server_error', + FlushedEvent => 'got_server_flush', + ); + + # Send the ssl ping! + $heap->{server}->put('ssl_ping'); + } elsif ( $line eq 'ssl_pong' ) { + ok(1, "CLIENT: recv: $line"); + + ## At this point, connection MUST be encrypted. + my $cipher = SSLify_GetCipher($heap->{server}->get_output_handle); + ok($cipher ne '(NONE)', "CLIENT: SSLify_GetCipher: $cipher"); + + $kernel->yield('shutdown'); + } else { + die "Unknown line from SERVER: $line"; + } + }, + ServerError => sub + { + # Thanks to H. Merijn Brand for spotting this FAIL in 5.12.0! + # The default PoCo::Client::TCP handler will throw a warning, which causes Test::NoWarnings to FAIL :( + my ($syscall, $errno, $error) = @_[ ARG0..ARG2 ]; + + # TODO are there other "errors" that is harmless? + $error = "Normal disconnection" unless $error; + my $msg = "Got CLIENT $syscall error $errno: $error"; + unless ( $syscall eq 'read' and $errno == 0 ) { + fail( $msg ); + } else { + diag( $msg ) if $ENV{TEST_VERBOSE}; + } + }, +); + +$poe_kernel->run(); + +done_testing;