Skip to content

Commit

Permalink
removed undocumented and untested tls_args attribute from Mojo::IOLoo…
Browse files Browse the repository at this point in the history
…p::Client and Mojo::IOLoop::Server
  • Loading branch information
kraih committed Dec 19, 2011
1 parent c3b53bd commit 164a30d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
3 changes: 1 addition & 2 deletions lib/Mojo/IOLoop/Client.pm
Expand Up @@ -98,8 +98,7 @@ sub _connect {
SSL_cert_file => $args->{tls_cert},
SSL_key_file => $args->{tls_key},
SSL_verify_mode => 0x00,
Timeout => $timeout,
%{$args->{tls_args} || {}}
Timeout => $timeout
);
$self->{tls} = 1;
return $self->emit_safe(error => 'TLS upgrade failed.')
Expand Down
9 changes: 4 additions & 5 deletions lib/Mojo/IOLoop/Server.pm
Expand Up @@ -134,19 +134,18 @@ sub listen {
croak "IO::Socket::SSL 1.37 required for TLS support" unless TLS;

# Options
my %options = (
my $options = $self->{tls} = {
SSL_startHandshake => 0,
SSL_cert_file => $args->{tls_cert} || $self->_cert_file,
SSL_key_file => $args->{tls_key} || $self->_key_file,
);
%options = (
};
%$options = (
SSL_verify_callback => $args->{tls_verify},
SSL_ca_file => -T $args->{tls_ca} ? $args->{tls_ca} : undef,
SSL_ca_path => -d $args->{tls_ca} ? $args->{tls_ca} : undef,
SSL_verify_mode => $args->{tls_ca} ? 0x03 : undef,
%options
%$options
) if $args->{tls_ca};
$self->{tls} = {%options, %{$args->{tls_args} || {}}};
}

sub generate_port {
Expand Down

0 comments on commit 164a30d

Please sign in to comment.