Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

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

by 1nickt (Canon)
on May 05, 2021 at 16:49 UTC ( [id://11132076]=note: print w/replies, xml ) Need Help??


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

The doc for IO::Socket::SSL suggests setting the environment variable $IO::Socket::SSL::DEBUG to 1, 2 or 3.

Hope this helps!


The way forward always starts with a minimal test.
  • Comment on Re^12: Unable to enable SSL on Dancer2 application in my windows platform.
  • Download Code

Replies are listed 'Best First'.
Re^13: Unable to enable SSL on Dancer2 application in my windows platform.
by chandantul (Scribe) on May 05, 2021 at 20:51 UTC

    Hello Team, I have written a small program to verify my self-signed certificate. Please check below command that we are getting error.

    use IO::Socket::SSL qw(debug3); use Net::SSLeay; # simple server my $server = IO::Socket::SSL->new( # where to listen LocalAddr => '127.0.0.1', LocalPort => 5000, 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', 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";

    Output available

    DEBUG: .../IO/Socket/SSL.pm:3010: new ctx 43981520 DEBUG: .../IO/Socket/SSL.pm:1031: no socket yet

    Can you please let me know this is expected?

      Having read line 1031 of IO::Socket::SSL (have you?) I would say not expected.

      But I tried it on my Macbook and got the same result. Unfortunately I have not used this module directly nor do I know much about SSL, so I can't help. Keep at it though, you'll get there!


      The way forward always starts with a minimal test.

        Hello Smart monks, Did you enable SSL on the app by Self signed certificate for the Dancer2 Apps? If its so, please provide me the steps. I have created Self-signed certificate and imported the same in my Java keystore and defined them in the command as per the required parameters but its still giving error.

        C:\Users\Documents\Perl\webapp\bin>plackup -p 5001 --ssl --ssl-key-fil +e=C:\Users\Documents\Private-Public-key-cert\Private0504.key --ssl-ce +rt-file=C:\Users\Documents\Private-Public-key-cert\Cert.crt --ca_file +=C:\Users\Documents\Private-Public-key-cert\cacerts --ssl_fingerprint +=sha1$B151CE74BC550FF4FF173266B906F0FCF45FFCEB app.psgi [webapp:9108] core @2021-05-05 21:36:01> Built config from files: C:\U +sers\Documents\Perl\webapp\config.yml C:\Users\Documents\Perl\webapp\ +environments\development.yml in (eval 272) l. 910 failed to listen to port 5001: at C:/Strawberry/perl/site/lib/HTTP/Se +rver/PSGI.pm line 103..

        Have created SSL testing tools but its giving "No Socket" error

        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 => '192.168.1.8:5061', LocalAddr => '127.0.0.1', # LocalPort => '5001', Listen => '5001', # 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";

        Its giving below but not able to find the exact error after DABUG3

        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 => '192.168.1.8:5061', LocalAddr => '127.0.0.1', # LocalPort => '5001', Listen => '5001', # 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";

        Please help if its possible.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (9)
As of 2024-04-18 16:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found