Skip Menu |

This queue is for tickets about the IO-Async-SSL CPAN distribution.

Report information
The Basics
Id: 97163
Status: rejected
Priority: 0/
Queue: IO-Async-SSL

People
Owner: Nobody in particular
Requestors: frioux [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: IO::Async::SSL should require IO::Async::SSLStream
IO::Async::SSL causes on_stream to use IO::Async::SSLStream methods, but fails to require it. This does not work: #!/usr/bin/env perl use 5.20.0; use warnings; use experimental 'signatures'; use IO::Async::Loop; use IO::Async::SSL; $IO::Socket::SSL::DEBUG = 3; my $loop = IO::Async::Loop->new; my $server = $loop->SSL_listen( addr => { family => 'inet', socktype => 'stream', port => 9932, ip => '127.0.0.1', }, SSL_key_file => './host.key', SSL_cert_file => './host.crt', on_stream => sub { my ( $stream ) = @_; $stream->configure( on_read => sub ($self, $buffref, $eof) { $stream->write($$buffref); $$buffref = ''; 0 }, ); $loop->add( $stream ); }, on_ssl_error => sub { print STDERR "Cannot negotiate SSL - $_[-1]\n"; }, on_resolve_error => sub { die "Cannot resolve - $_[1]\n"; }, on_listen_error => sub { die "Cannot listen - $_[1]\n"; }, ); $loop->run; this does: #!/usr/bin/env perl use 5.20.0; use warnings; use experimental 'signatures'; use IO::Async::Loop; use IO::Async::SSL; use IO::Async::SSLStream; $IO::Socket::SSL::DEBUG = 3; my $loop = IO::Async::Loop->new; my $server = $loop->SSL_listen( addr => { family => 'inet', socktype => 'stream', port => 9932, ip => '127.0.0.1', }, SSL_key_file => './host.key', SSL_cert_file => './host.crt', on_stream => sub { my ( $stream ) = @_; $stream->configure( on_read => sub ($self, $buffref, $eof) { $stream->write($$buffref); $$buffref = ''; 0 }, ); $loop->add( $stream ); }, on_ssl_error => sub { print STDERR "Cannot negotiate SSL - $_[-1]\n"; }, on_resolve_error => sub { die "Cannot resolve - $_[1]\n"; }, on_listen_error => sub { die "Cannot listen - $_[1]\n"; }, ); $loop->run;
Won'tfix. Next version removes most of the need for SSLStream anyway, switching to nicer setup on the reader/writer functions on any existing stream. -- Paul Evans