in reply to Re^15: Unable to enable SSL on Dancer2 application in my windows platform.
in thread Unable to enable SSL on Dancer2 application in my windows platform.
Have created SSL testing tools but its giving "No Socket" error
Did you actually read the code?
package IO::Socket::SSL; our $VERSION = '2.070'; ##### about a thousand lines omitted ##### #Call to accept occurs when a new client connects to a server using #IO::Socket::SSL sub accept { my $self = shift || return _invalid_object(); my $class = shift || 'IO::Socket::SSL'; my $socket = ${*$self}{'_SSL_opening'}; if ( ! $socket ) { # underlying socket not done $DEBUG>=2 && DEBUG('no socket yet' ); + ##### <--- this is line 1031 ##### $socket = $self->SUPER::accept($class) || return; $DEBUG>=2 && DEBUG('accept created normal socket '.$socket ); # don't continue with accept_SSL if SSL_startHandshake is set +to 0 my $sh = ${*$self}{_SSL_arguments}{SSL_startHandshake}; if (defined $sh && ! $sh) { ${*$socket}{_SSL_ctx} = ${*$self}{_SSL_ctx}; ${*$socket}{_SSL_arguments} = { %{${*$self}{_SSL_arguments}}, SSL_server => 0, }; $DEBUG>=2 && DEBUG('will not start SSL handshake yet'); return wantarray ? ($socket, getpeername($socket) ) : $soc +ket } } $self->accept_SSL($socket) || return; $DEBUG>=2 && DEBUG('accept_SSL ok' ); return wantarray ? ($socket, getpeername($socket) ) : $socket; }
"no socket yet" is not an error message. If it was, processing would abort, either by returning an error value or by die()ing. It is a diagnostic message to get a clue about which code is currently executing. Line 1031 was executed, now look what happens next: call the accept() method of the parent class, and either return (on error) or continue. accept() may block, given no output at all, and your program appears to hang. According to what you posted so far, that does not happen, so you should get the next diagnostic message from line 1033 ("accept created normal socket"). You did not post that line, so my guess is that $self->SUPER::accept($class) returned a false value and || return; in line 1032 was executed.
So, think about how you got to line 1031 and why $self->SUPER::accept($class) returned a false value.
Alexander
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^17: Unable to enable SSL on Dancer2 application in my windows platform.
by chandantul (Scribe) on May 06, 2021 at 13:08 UTC |