Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

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

by 1nickt (Canon)
on May 03, 2021 at 11:39 UTC ( [id://11131972]=note: print w/replies, xml ) Need Help??


in reply to Unable to enable SSL on Dancer2 application in my windows platform.

You will need IO::Socket::SSL in order to run https. But you are not encountering (yet) that error because you are passing a bad param, as the error message says. Try --ssl.

Hope this helps!


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

Replies are listed 'Best First'.
Re^3: Unable to enable SSL on Dancer2 application in my windows platform.
by chandantul (Scribe) on May 03, 2021 at 16:58 UTC

    I was not able to install IO::Socket::SSL in my Windows Strawberry and its giving below message and halting there. Do we have any solution here?

    t/protocol_version.t .............. 1/? # looks like OpenSSL was compi +led without SSLv3 support t/protocol_version.t .............. ok t/public_suffix_lib_encode_idn.t .. ok t/public_suffix_lib_libidn.t ...... ok t/public_suffix_lib_uri.t ......... ok t/public_suffix_ssl.t ............. ok t/readline.t ...................... ok t/session_cache.t ................. ok t/session_ticket.t ................ # listen at 127.0.0.1:50412 # listen at 127.0.0.1:50413 # connect to 0: success reuse=0 version=TLSv1_3 t/session_ticket.t ................ 1/6 # connect to 0: success reuse= +1 version=TLSv1_3 # connect to 1: success reuse=1 version=TLSv1_3 # connect to 1: success reuse=0 version=TLSv1_3 # connect to 0: success reuse=0 version=TLSv1_3 # connect to 0: success reuse=1 version=TLSv1_3 t/session_ticket.t ................ ok t/sessions.t ...................... ok t/set_curves.t .................... ok t/signal-readline.t ............... skipped: signals not relevant on t +his platform t/sni.t ........................... ok t/sni_verify.t .................... 1/17
      A reply falls below the community's threshold of quality. You may see it by logging in.
Re^2: Unable to enable SSL on Dancer2 application in my windows platform.
by Anonymous Monk on May 03, 2021 at 16:44 UTC
    Examination of the source-code of 'HTTP::Server::PSGI' in its 'prepare_socket_class' method indicates that a check for 'IO::Socket::SSL' is already being done if SSL is requested. But you'd need to trace through the calling code to see if it is being requested.
Re^2: Unable to enable SSL on Dancer2 application in my windows platform.
by chandantul (Scribe) on May 03, 2021 at 15:42 UTC

    Is this the below command correct?

    plackup --enable--ssl --ssl-key-file=C:\Users\Documents\Private-Public\privateKey.key --ssl-cert-file=C:\Users\Documents\Private-Public\certificate.crt app.psgi

    I have ran the below command but not port listening to http only. Please check below

    HTTP::Server::PSGI: Accepting connections at http://0:5000/

      No. That's not what I said. From reading the source code of the module HTTP::Server::PSGI, which you could do as well, I see that the expected param is called ssl. So try what I said:

      plackup --ssl --ssl-key-file=C:\Users\Documents\Private-Public\private +Key.key --ssl-cert-file=C:\Users\Documents\Private-Public\certificate +.crt bin/app.psgi
      This produces as expected a file error on my system:
      $ plackup --ssl --ssl-key-file=C:\Users\Documents\Private-Public\priva +teKey.key --ssl-cert-file=C:\Users\Documents\Private-Public\certifica +te.crt bin/app.psgi SSL_cert_file C:UsersDocumentsPrivate-Publiccertificate.crt can't be u +sed: No such file or directory at /Users/me/.perlbrew/libs/perl-5.32. +1@meta/lib/perl5/IO/Socket/SSL.pm line 2375.

      Hope this helps!


      The way forward always starts with a minimal test.

        I am getting below error now and i was unable to install IO::Socket::SSL in my Windows Strawberry Perl

        failed to listen to port 5000:  at C:/Strawberry/perl/site/lib/HTTP/Server/PSGI.pm line 103.

        I have the following issue with IO::Socket::SSL its hanging.

        t/plain_upgrade_downgrade.t ....... ok t/protocol_version.t .............. 1/? # looks like OpenSSL was compi +led without SSLv3 support t/protocol_version.t .............. ok t/public_suffix_lib_encode_idn.t .. ok t/public_suffix_lib_libidn.t ...... ok t/public_suffix_lib_uri.t ......... ok t/public_suffix_ssl.t ............. ok t/readline.t ...................... ok t/session_cache.t ................. ok t/session_ticket.t ................ # listen at 127.0.0.1:50412 # listen at 127.0.0.1:50413 # connect to 0: success reuse=0 version=TLSv1_3 t/session_ticket.t ................ 1/6 # connect to 0: success reuse= +1 version=TLSv1_3 # connect to 1: success reuse=1 version=TLSv1_3 # connect to 1: success reuse=0 version=TLSv1_3 # connect to 0: success reuse=0 version=TLSv1_3 # connect to 0: success reuse=1 version=TLSv1_3 t/session_ticket.t ................ ok t/sessions.t ...................... ok t/set_curves.t .................... ok t/signal-readline.t ............... skipped: signals not relevant on t +his platform t/sni.t ........................... ok t/sni_verify.t .................... 1/17

        There is some known issue i found but no solution on it. Can you please help if possible?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2024-04-19 23:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found