|
Thanks for your valuable suggestions and quick reply.
I still have one issue, I have update the script as per your suggestion but still seeing the same p
+roblem.
here is my client perl script
$sock = IO::Socket::INET->new(
PeerAddr => '12.31.22.14',
PeerPort => 38752,
Proto => "tcp",
Type => SOCK_STREAM,
);
IO::Socket::SSL->start_SSL(
$sock,
'SSL_startHandshake' => 0
) || die "Encountered an SSL handshake problem:".IO::Socket::SSL::errstr();
this fails with the following erro
"Encountered an SSL handshake problem:SSL connect attempt failed error:00000000:lib(0):func(0):re
+ason(0) at "
The server code is
/* initialize SSL library */
(void)SSL_library_init();
SSL_load_error_strings();
ssl_ctx = SSL_CTX_new(SSLv23_server_method());
(void)SSL_CTX_set_options(ssl_ctx, SSL_OP_ALL);
ssl = SSL_new(ssl_ctx);
(void)set_debug_state(ssl_ctx, NULL);
SSL_set_accept_state(ssl);
(void)SSL_set_session(ssl, NULL);
(void)SSL_clear(ssl);
ssl_bio = sslc_BIO_new_socket(acceptfd, BIO_NOCLOSE);
ssl_err = sslc_SIO_socket_ioctl(acceptfd, FIONBIO, &non_block); /* 1 = non-blocking */
SSL_set_bio(ssl, ssl_bio, ssl_bio);
if ( (ssl_err = SSL_do_handshake(ssl)) != 1)
the above if condition fails with the following message,
SSL_ERROR_WANT_READ:
I have handled the exceptions appropriately and loaded the server certificates using one of our
Api.
The version of the modules I am using are
Net::SSLeay '1.08'
IO::Socket::SSL '0.96'
DO I need to upgrade the above Perl modules.
Thanks
Amar
|