[Bps-public-commit] Net-Server-Coro branch, master, updated. 0.9-9-gca829b2
Alex Vandiver
alexmv at bestpractical.com
Sat Oct 29 02:28:15 EDT 2011
The branch, master has been updated
via ca829b2aa27af18675d650d1d7f9624d1a07fee2 (commit)
via 7090fcfaaade4987388c255751d34967dd27ecf6 (commit)
via 93fbb024ce51772af78701a2c4f2daa54a3aeb79 (commit)
from b0bc8a618d43b0b0913864aeb72869d3a278317e (commit)
Summary of changes:
Changes | 3 +++
META.yml | 5 +++--
Makefile.PL | 3 ++-
SIGNATURE | 39 ---------------------------------------
lib/Net/Server/Coro.pm | 2 +-
lib/Net/Server/Proto/Coro.pm | 22 ++++++++++++++++------
6 files changed, 25 insertions(+), 49 deletions(-)
delete mode 100644 SIGNATURE
- Log -----------------------------------------------------------------
commit 93fbb024ce51772af78701a2c4f2daa54a3aeb79
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Sat Oct 29 02:09:06 2011 -0400
SIGNATURE is now generated during `make dist`
diff --git a/SIGNATURE b/SIGNATURE
deleted file mode 100644
index 2c6dcb5..0000000
--- a/SIGNATURE
+++ /dev/null
@@ -1,39 +0,0 @@
-This file contains message digests of all files listed in MANIFEST,
-signed via the Module::Signature module, version 0.68.
-
-To verify the content in this distribution, first make sure you have
-Module::Signature installed, then type:
-
- % cpansign -v
-
-It will check each file's integrity, as well as the signature's
-validity. If "==> Signature verified OK! <==" is not displayed,
-the distribution may already have been compromised, and you should
-not run its Makefile.PL or Build.PL.
-
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
-SHA1 ac7e68c653531d1ce2bd614f4f6323523ca3f13a Changes
-SHA1 6560e9fb53ffae9afbaddb4919987a778d7cfd88 MANIFEST
-SHA1 4aa331a928d60ab527995fd4ed691f0ee2b8c612 META.yml
-SHA1 bc22590cf5cc348fedc293e8ea39bcdc72ad897f Makefile.PL
-SHA1 f5333026061a6f347e7f2a3ce8bb6847081c200c certs/server-cert.pem
-SHA1 4b963cd4c2b0a7e073241b4bac727cb6f96276f8 certs/server-key.pem
-SHA1 7b4ae50ebac72d20761171c4c2b50c206344ea40 inc/Module/Install.pm
-SHA1 d9fe55a427fe2fd75b5029afeeaa61b592e07f79 inc/Module/Install/Base.pm
-SHA1 62d3922826d9f89f20c185e7031ac8f028504745 inc/Module/Install/Can.pm
-SHA1 dc809f64fb70a26b069a36f8d3d353d520dbb7e1 inc/Module/Install/Fetch.pm
-SHA1 73ab91490a628452cc140db72ef9d13a1326d211 inc/Module/Install/Makefile.pm
-SHA1 8ce3f2b414e4617e6233dd4ba10830f8c5d672ec inc/Module/Install/Metadata.pm
-SHA1 3b0acd2eeac93a0afe48120f5648f0db362e5bbf inc/Module/Install/Win32.pm
-SHA1 f08924f051e623f8e09fa6a121993c4a9cf7d9eb inc/Module/Install/WriteAll.pm
-SHA1 54655ac2ab1391198f3951d05eb5cc3df80dab8b lib/Net/Server/Coro.pm
-SHA1 b50d07e251da5fe7a638845d2881e02c776d8465 lib/Net/Server/Proto/Coro.pm
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.11 (GNU/Linux)
-
-iEYEARECAAYFAk5kX3QACgkQMflWJZZAbqDslgCgmV60MHIs64nSwzhvq/ZF6Nnr
-rHgAn3L7F4M/nt+LU533sUxi2fTrxSEu
-=FCqq
------END PGP SIGNATURE-----
commit 7090fcfaaade4987388c255751d34967dd27ecf6
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Sat Oct 29 02:21:50 2011 -0400
Make Net::SSLeay an optional dependency
If Net::SSLeay is not installed, attempting to use the SSL proto, or use
->start_ssl to negotiate an SSL handshake over an existing TCP
connection will result in a runtime error.
This allows installing Net::Server::Coro on a machine without
the OpenSSL header files, for instance.
diff --git a/META.yml b/META.yml
index 847db97..e41f2ba 100644
--- a/META.yml
+++ b/META.yml
@@ -16,10 +16,11 @@ name: Net-Server-Coro
no_index:
directory:
- inc
+recommends:
+ Net::SSLeay: 0
requires:
Coro: 0
EV: 0
- Net::SSLeay: 0
Net::Server: 0
resources:
license: http://opensource.org/licenses/mit-license.php
diff --git a/Makefile.PL b/Makefile.PL
index 5e96dbe..7616b77 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -9,7 +9,8 @@ license('MIT');
requires('Coro');
requires('EV');
requires('Net::Server');
-requires('Net::SSLeay');
+
+recommends('Net::SSLeay');
sign;
diff --git a/lib/Net/Server/Proto/Coro.pm b/lib/Net/Server/Proto/Coro.pm
index f716a84..934af79 100644
--- a/lib/Net/Server/Proto/Coro.pm
+++ b/lib/Net/Server/Proto/Coro.pm
@@ -4,8 +4,6 @@ use warnings;
package Net::Server::Proto::Coro;
use base qw/Coro::Socket/;
-use Net::SSLeay;
-
sub new_from_fh {
my $class = shift;
my $fh = shift or return;
@@ -68,15 +66,24 @@ sub close { Net::Server::Proto::Coro::FH::CLOSE ( tied *${$_[0]}) }
package Net::Server::Proto::Coro::FH;
use base qw/Coro::Handle::FH/;
+our $HAS_SSL;
+
BEGIN {
- Net::SSLeay::load_error_strings();
- Net::SSLeay::SSLeay_add_ssl_algorithms();
- Net::SSLeay::randomize();
+ $HAS_SSL = 0;
+ if (eval {require Net::SSLeay; 1} ) {
+ $HAS_SSL = 1;
+ Net::SSLeay::load_error_strings();
+ Net::SSLeay::SSLeay_add_ssl_algorithms();
+ Net::SSLeay::randomize();
+ }
}
sub TIEHANDLE {
my ( $class, %arg ) = @_;
+ die "Net::SSLeay is required for SSL sockets"
+ if $arg{expects_ssl} and not $HAS_SSL;
+
my $self = $class->SUPER::TIEHANDLE(%arg);
$self->[9] = $arg{expects_ssl};
$self->[10] = undef; # SSLeay object
@@ -236,6 +243,9 @@ use constant SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER => 2;
use vars qw/$CONTEXT/;
sub start_SSL {
+ die "Net::SSLeay is required for SSL sockets"
+ if not $HAS_SSL;
+
my $ctx;
$_[0][9] = 1;
my $server_cert = $_[1] || $_[0][12] || "certs/server-cert.pem";
@@ -244,7 +254,7 @@ sub start_SSL {
unless -r $server_cert and -r $server_key;
unless ($CONTEXT) {
- $ctx = $CONTEXT = Net::SSLeay::CTX_new;
+ $ctx = $CONTEXT = Net::SSLeay::CTX_new();
Net::SSLeay::CTX_set_options( $ctx, Net::SSLeay::OP_ALL() );
Net::SSLeay::CTX_set_mode( $ctx,
SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER
commit ca829b2aa27af18675d650d1d7f9624d1a07fee2
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Sat Oct 29 02:27:21 2011 -0400
Version 1.2 releng
diff --git a/Changes b/Changes
index 97b2c41..480f414 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,8 @@
Revision history for Net-Server-Coro
+1.2 Sat Oct 29 02:26:17 2011
+ * Net::SSLeay is now an optional dependency
+
1.1 Mon Sep 5 01:15:17 2011
* Fix SIGNATURE; no code changes
diff --git a/META.yml b/META.yml
index e41f2ba..2f44040 100644
--- a/META.yml
+++ b/META.yml
@@ -24,4 +24,4 @@ requires:
Net::Server: 0
resources:
license: http://opensource.org/licenses/mit-license.php
-version: 1.1
+version: 1.2
diff --git a/lib/Net/Server/Coro.pm b/lib/Net/Server/Coro.pm
index 1724460..2cd0acc 100644
--- a/lib/Net/Server/Coro.pm
+++ b/lib/Net/Server/Coro.pm
@@ -12,7 +12,7 @@ use Socket ();
use base qw(Net::Server);
use Net::Server::Proto::Coro;
-$VERSION = '1.1';
+$VERSION = '1.2';
=head1 NAME
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list