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

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/

Replies are listed 'Best First'.
Re^3: Unable to enable SSL on Dancer2 application in my windows platform.
by 1nickt (Canon) on May 03, 2021 at 17:12 UTC

    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?