Skip to content

Commit

Permalink
updated IO::Socket::SSL requirement to 1.84
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Mar 16, 2014
1 parent fef93ad commit 801901a
Show file tree
Hide file tree
Showing 15 changed files with 25 additions and 25 deletions.
2 changes: 2 additions & 0 deletions Changes
@@ -1,6 +1,8 @@

4.90 2014-03-16
- Removed deprecated to_rel method from Mojo::URL.
- Updated IO::Socket::SSL requirement to 1.84 due to breaking changes in
IO::Socket::SSL.
- Improved documentation browser with more accessible links and readable
inline code.
- Fixed textarea and title parsing bugs in Mojo::DOM::HTML.
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/IOLoop.pm
Expand Up @@ -311,7 +311,7 @@ is loaded.
For better scalability (epoll, kqueue) and to provide IPv6 as well as TLS
support, the optional modules L<EV> (4.0+), L<IO::Socket::IP> (0.20+) and
L<IO::Socket::SSL> (1.75+) will be used automatically if they are installed.
L<IO::Socket::SSL> (1.84+) will be used automatically if they are installed.
Individual features can also be disabled with the C<MOJO_NO_IPV6> and
C<MOJO_NO_TLS> environment variables.
Expand Down
14 changes: 7 additions & 7 deletions lib/Mojo/IOLoop/Client.pm
Expand Up @@ -14,7 +14,7 @@ use constant IPV6 => $ENV{MOJO_NO_IPV6}
# TLS support requires IO::Socket::SSL
use constant TLS => $ENV{MOJO_NO_TLS}
? 0
: eval 'use IO::Socket::SSL 1.75 (); 1';
: eval 'use IO::Socket::SSL 1.84 (); 1';
use constant TLS_READ => TLS ? IO::Socket::SSL::SSL_WANT_READ() : 0;
use constant TLS_WRITE => TLS ? IO::Socket::SSL::SSL_WANT_WRITE() : 0;

Expand Down Expand Up @@ -97,18 +97,18 @@ sub _try {

return $self->_cleanup->emit_safe(connect => $handle)
if !$args->{tls} || $handle->isa('IO::Socket::SSL');
return $self->emit(error => 'IO::Socket::SSL 1.75 required for TLS support')
return $self->emit(error => 'IO::Socket::SSL 1.84 required for TLS support')
unless TLS;

# Upgrade
weaken $self;
my %options = (
SSL_ca_file => $args->{tls_ca}
&& -T $args->{tls_ca} ? $args->{tls_ca} : undef,
SSL_cert_file => $args->{tls_cert},
SSL_error_trap => sub { $self->_cleanup->emit(error => $_[1]) },
SSL_hostname => $args->{address},
SSL_key_file => $args->{tls_key},
SSL_cert_file => $args->{tls_cert},
SSL_error_trap => sub { $self->_cleanup->emit(error => $_[1]) },
SSL_hostname => IO::Socket::SSL->can_client_sni ? $args->{address} : '',
SSL_key_file => $args->{tls_key},
SSL_startHandshake => 0,
SSL_verify_mode => $args->{tls_ca} ? 0x01 : 0x00,
SSL_verifycn_name => $args->{address},
Expand Down Expand Up @@ -197,7 +197,7 @@ implements the following new ones.
$client->connect(address => '127.0.0.1', port => 3000);
Open a socket connection to a remote host. Note that TLS support depends on
L<IO::Socket::SSL> (1.75+) and IPv6 support on L<IO::Socket::IP> (0.20+).
L<IO::Socket::SSL> (1.84+) and IPv6 support on L<IO::Socket::IP> (0.20+).
These options are currently available:
Expand Down
6 changes: 3 additions & 3 deletions lib/Mojo/IOLoop/Server.pm
Expand Up @@ -16,7 +16,7 @@ use constant IPV6 => $ENV{MOJO_NO_IPV6}
# TLS support requires IO::Socket::SSL
use constant TLS => $ENV{MOJO_NO_TLS}
? 0
: eval 'use IO::Socket::SSL 1.75 (); 1';
: eval 'use IO::Socket::SSL 1.84 (); 1';
use constant TLS_READ => TLS ? IO::Socket::SSL::SSL_WANT_READ() : 0;
use constant TLS_WRITE => TLS ? IO::Socket::SSL::SSL_WANT_WRITE() : 0;

Expand Down Expand Up @@ -87,7 +87,7 @@ sub listen {
$self->{handle} = $handle;

return unless $args->{tls};
croak "IO::Socket::SSL 1.75 required for TLS support" unless TLS;
croak "IO::Socket::SSL 1.84 required for TLS support" unless TLS;

# Prioritize RC4 to mitigate BEAST attack
$self->{tls} = {
Expand Down Expand Up @@ -235,7 +235,7 @@ Get handle for server.
$server->listen(port => 3000);
Create a new listen socket. Note that TLS support depends on
L<IO::Socket::SSL> (1.75+) and IPv6 support on L<IO::Socket::IP> (0.20+).
L<IO::Socket::SSL> (1.84+) and IPv6 support on L<IO::Socket::IP> (0.20+).
These options are currently available:
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/Server/Daemon.pm
Expand Up @@ -295,7 +295,7 @@ support.
For better scalability (epoll, kqueue) and to provide IPv6 as well as TLS
support, the optional modules L<EV> (4.0+), L<IO::Socket::IP> (0.20+) and
L<IO::Socket::SSL> (1.75+) will be used automatically by L<Mojo::IOLoop> if
L<IO::Socket::SSL> (1.84+) will be used automatically by L<Mojo::IOLoop> if
they are installed. Individual features can also be disabled with the
C<MOJO_NO_IPV6> and C<MOJO_NO_TLS> environment variables.
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/Server/Hypnotoad.pm
Expand Up @@ -186,7 +186,7 @@ file with it, and send a L</"USR2"> signal to the already running server.
For better scalability (epoll, kqueue) and to provide IPv6 as well as TLS
support, the optional modules L<EV> (4.0+), L<IO::Socket::IP> (0.20+) and
L<IO::Socket::SSL> (1.75+) will be used automatically by L<Mojo::IOLoop> if
L<IO::Socket::SSL> (1.84+) will be used automatically by L<Mojo::IOLoop> if
they are installed. Individual features can also be disabled with the
C<MOJO_NO_IPV6> and C<MOJO_NO_TLS> environment variables.
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/Server/Morbo.pm
Expand Up @@ -129,7 +129,7 @@ To start applications with it you can use the L<morbo> script.
For better scalability (epoll, kqueue) and to provide IPv6 as well as TLS
support, the optional modules L<EV> (4.0+), L<IO::Socket::IP> (0.20+) and
L<IO::Socket::SSL> (1.75+) will be used automatically by L<Mojo::IOLoop> if
L<IO::Socket::SSL> (1.84+) will be used automatically by L<Mojo::IOLoop> if
they are installed. Individual features can also be disabled with the
C<MOJO_NO_IPV6> and C<MOJO_NO_TLS> environment variables.
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/Server/Prefork.pm
Expand Up @@ -262,7 +262,7 @@ should avoid modifying signal handlers in your applications.
For better scalability (epoll, kqueue) and to provide IPv6 as well as TLS
support, the optional modules L<EV> (4.0+), L<IO::Socket::IP> (0.20+) and
L<IO::Socket::SSL> (1.75+) will be used automatically by L<Mojo::IOLoop> if
L<IO::Socket::SSL> (1.84+) will be used automatically by L<Mojo::IOLoop> if
they are installed. Individual features can also be disabled with the
C<MOJO_NO_IPV6> and C<MOJO_NO_TLS> environment variables.
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/UserAgent.pm
Expand Up @@ -473,7 +473,7 @@ safely.
For better scalability (epoll, kqueue) and to provide IPv6 as well as TLS
support, the optional modules L<EV> (4.0+), L<IO::Socket::IP> (0.20+) and
L<IO::Socket::SSL> (1.75+) will be used automatically by L<Mojo::IOLoop> if
L<IO::Socket::SSL> (1.84+) will be used automatically by L<Mojo::IOLoop> if
they are installed. Individual features can also be disabled with the
C<MOJO_NO_IPV6> and C<MOJO_NO_TLS> environment variables.
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious/Command/version.pm
Expand Up @@ -25,7 +25,7 @@ CORE
OPTIONAL
EV 4.0+ ($ev)
IO::Socket::IP 0.20+ ($ipv6)
IO::Socket::SSL 1.75+ ($tls)
IO::Socket::SSL 1.84+ ($tls)
EOF

Expand Down
2 changes: 1 addition & 1 deletion t/mojo/ioloop_tls.t
Expand Up @@ -10,7 +10,7 @@ use Mojo::IOLoop::Server;

plan skip_all => 'set TEST_TLS to enable this test (developer only!)'
unless $ENV{TEST_TLS};
plan skip_all => 'IO::Socket::SSL 1.75 required for this test!'
plan skip_all => 'IO::Socket::SSL 1.84 required for this test!'
unless Mojo::IOLoop::Server::TLS;

# To regenerate all required certificates run these commands (18.04.2012)
Expand Down
6 changes: 2 additions & 4 deletions t/mojo/user_agent_online.t
Expand Up @@ -12,7 +12,7 @@ plan skip_all => 'set TEST_ONLINE to enable this test (developer only!)'
unless $ENV{TEST_ONLINE};
plan skip_all => 'IO::Socket::IP 0.20 required for this test!'
unless Mojo::IOLoop::Server::IPV6;
plan skip_all => 'IO::Socket::SSL 1.75 required for this test!'
plan skip_all => 'IO::Socket::SSL 1.84 required for this test!'
unless Mojo::IOLoop::Server::TLS;

use IO::Socket::INET;
Expand Down Expand Up @@ -203,9 +203,7 @@ is $tx->res->code, 200, 'right status';

# HTTPS request that requires SNI
SKIP: {
skip 'SNI support required!', 1
unless IO::Socket::SSL->can('can_client_sni')
&& IO::Socket::SSL->can_client_sni;
skip 'SNI support required!', 1 unless IO::Socket::SSL->can_client_sni;

$tx = $ua->get('https://google.de');
like $ua->ioloop->stream($tx->connection)
Expand Down
2 changes: 1 addition & 1 deletion t/mojo/user_agent_tls.t
Expand Up @@ -10,7 +10,7 @@ use Mojo::IOLoop::Server;

plan skip_all => 'set TEST_TLS to enable this test (developer only!)'
unless $ENV{TEST_TLS};
plan skip_all => 'IO::Socket::SSL 1.75 required for this test!'
plan skip_all => 'IO::Socket::SSL 1.84 required for this test!'
unless Mojo::IOLoop::Server::TLS;

use Mojo::IOLoop;
Expand Down
2 changes: 1 addition & 1 deletion t/mojo/websocket_proxy_tls.t
Expand Up @@ -10,7 +10,7 @@ use Mojo::IOLoop::Server;

plan skip_all => 'set TEST_TLS to enable this test (developer only!)'
unless $ENV{TEST_TLS};
plan skip_all => 'IO::Socket::SSL 1.75 required for this test!'
plan skip_all => 'IO::Socket::SSL 1.84 required for this test!'
unless Mojo::IOLoop::Server::TLS;

use Mojo::IOLoop;
Expand Down
2 changes: 1 addition & 1 deletion t/mojolicious/tls_lite_app.t
Expand Up @@ -10,7 +10,7 @@ use Mojo::IOLoop::Server;

plan skip_all => 'set TEST_TLS to enable this test (developer only!)'
unless $ENV{TEST_TLS};
plan skip_all => 'IO::Socket::SSL 1.75 required for this test!'
plan skip_all => 'IO::Socket::SSL 1.84 required for this test!'
unless Mojo::IOLoop::Server::TLS;

use Mojo::IOLoop;
Expand Down

0 comments on commit 801901a

Please sign in to comment.