Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^17: Unable to enable SSL on Dancer2 application in my windows platform.

by chandantul (Scribe)
on May 06, 2021 at 13:08 UTC ( [id://11132150]=note: print w/replies, xml ) Need Help??


in reply to Re^16: Unable to enable SSL on Dancer2 application in my windows platform.
in thread Unable to enable SSL on Dancer2 application in my windows platform.

Thanks Alaxander, Please check below code that i have written for testing SSL

use strict; use warnings; #use IO::Socket::SSL::DEBUG::3; use IO::Socket::SSL qw(debug3); use Net::SSLeay; # simple server my $server = IO::Socket::SSL->new( # where to listen PeerAddr => '127.0.0.1:5061', #LocalAddr => '127.0.0.1', #LocalPort => 5001, #Listen => 10, # which certificate to offer # with SNI support there can be different certificates per hostnam +e verify_mode => Net::SSLeay->VERIFY_PEER(), SSL_cert_file => 'C:/Users/Documents/Private-Public-key-cert/Cert. +crt', SSL_key_file => 'C:/Users/Documents/Private-Public-key-cert/Privat +e0504.key', SSL_fingerprint => 'sha1$B151CE74BC550FF4FF173266B906F0FCF45FFCEB' +, ca_file => 'C:/Users/Documents/Private-Public-key-cert/cacerts', ) or die "failed to listen: $!"; # accept client my $client = $server->accept or die "failed to accept or ssl handshake: $!,$SSL_ERROR"; IO::Socket::SSL->start_SSL($client, SSL_server => 1, ) or die "failed to ssl handshake: $SSL_ERROR";

Please check below output.is this indicating my Self-Signed certificate is not working?

DEBUG: .../IO/Socket/SSL.pm:3010: new ctx 50401584 DEBUG: .../IO/Socket/SSL.pm:762: socket not yet connected DEBUG: .../lib/IO/Socket.pm:50: local error: IO::Socket::IP configurat +ion failed DEBUG: .../IO/Socket/SSL.pm:3059: free ctx 50401584 open=50401584 DEBUG: .../IO/Socket/SSL.pm:3063: free ctx 50401584 callback DEBUG: .../IO/Socket/SSL.pm:3070: OK free ctx 50401584 failed to listen: Bad file descriptor at SSL-cert-check2.pl line 9.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11132150]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-04-18 05:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found