in reply to Need correct command for the plackup and Thrall SSL enabling process.

You should link to the previous related questions. Not everyone follows everything that happens here, some people find the questions when searching for a solution to their problems without any clues about the context. At least, help Monks not to waste their time giving answers already given in the older variants of the same question.

Why have you decided to switch to Thrall? Do you know its SSL support depends on IO::Socket::SSL, i.e. the same module you had problems in the previous tries?

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
  • Comment on Re: Need correct command for the plackup and Thrall SSL enabling process.
  • Download Code

Replies are listed 'Best First'.
Re^2: Need correct command for the plackup and Thrall SSL enabling process.
by chandantul (Scribe) on May 07, 2021 at 22:10 UTC

    Hello Sir, The IO::Socket::SSL was installed an i was able to genarate the self signed certifiate through IO::SOcket::SSL::UTILs tool. The issue is there is the command contains certifcate generated by IO:Socket::SSL::Utils giving Invalid argument issue and other certificate genrated by OpenSSL giving different error. I will need to know where is the issue now as the cerrificated was generated as expected by IO::Socket::SSL::UTILS

    Command for Self-Signed certifcate generated by IO::Socker::SSL::UTILS

    C:\Users\Documents\Perl\webapp\bin>plackup -p 5001 --ssl --ssl-key-fil +e=self-signedkey.key --ssl-cert-file=self-signed.crt app.psgi code> <p>Error</p> <code>failed to listen to port 5001: Invalid argument at C:/Strawberry +/perl/site/lib/HTTP/Server/PSGI.pm line 103.</

    Command for Self-Signed certifcate generated by OpenSSL

    plackup -p 5001 --ssl --ssl-key-file=C:\Users\Documents\Private-Public\privateKey0506.key --ssl-cert-file=C:\Users\Documents\Private-Public\localhost.crt app.psgi

    Error

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

    Same command but different error. is that possible for you identify and help?

      Looking at the source of HTTP::Server::PSGI again (have you done so yet?) I can see that expects arguments named ssl_key_file and ssl_cert_file (https://metacpan.org/release/Plack/source/lib/HTTP/Server/PSGI.pm#L53). You seem to be passing the arguments with dashes instead of underscores.

      Try this:

      plackup -p 5001 -- --ssl --ssl_key_file=self-signedkey.key --ssl_cert_ +file=self-signed.crt --host localhost app.psgi

      Hope this helps!


      The way forward always starts with a minimal test.

        Thanks everyone for your patient and i was able to fix the issue by making ssl to true . Please check below command.

        plackup -p 5001 --ssl=1 --ssl_key_file=self-signedkey.key --ssl_cert_file=self-signed.crt --host localhost app.psgi

        Yes, Thanks for your help. I have found this and i was trying with "_" instead of "-" in SSL parameters but i did not update --host which is required arguments here. Thanks for identifying the issue but i am getting Unsupported TLS error now.

        C:\Users\Documents\Perl\webapp\bin>plackup -p 5001 --ssl --ssl_key_fil +e=self-signedkey.key --ssl_cert_file=self-signed.crt --host 127.0.0.1 + app.psgi [webapp:20468] core @2021-05-08 19:38:07> Built config from files: C:\ +Users\Documents\Perl\webapp\config.yml C:\Users\Documents\Perl\webapp +\environments\development.yml in (eval 272) l. 910 HTTP::Server::PSGI: Accepting connections at https://127.0.0.1:5001/

        Please check below error that i am getting while trying to access the site. I am trying to resolve this but if you have faced this issue let me know the solution if possible. I have tried in IE and Chrome

        Can’t connect securely to this page This might be because the site uses outdated or unsafe TLS security settings. If this keeps happening, try contacting the website’s owner. Try this: •Go back to the last page