Try your test out with a built-in HelloWorld app: $ mojo daemon -l https://*:3000 Server available at https://127.0.0.1:3000 $ curl -k https://127.0.0.1:3000 Your Mojo is working!
I doubt there's a problem with Mojo's SSL implementation as it doesn't really have one -- it relies on IO::Socket::SSL. $ mojo version CORE Perl (v5.22.1, linux) Mojolicious (8.12, Supervillain) OPTIONAL Cpanel::JSON::XS 4.04+ (n/a) EV 4.0+ (n/a) IO::Socket::Socks 0.64+ (n/a) * IO::Socket::SSL 2.009+ (2.024)* Net::DNS::Native 0.15+ (n/a) Role::Tiny 2.000001+ (2.000006) You might want to update your Mojolicious to 8.16! Make sure everything is up to snuff with IO::Socket::SSL. On Tue, May 21, 2019 at 12:42 PM Celejar <cele...@gmail.com> wrote: > Hi, > > I'm trying to access my Mojolicious::Lite web app via HTTPS, but it's not > working: the SSL connection is apparently immediately reset by the server: > > ~$ perl/app.pl daemon -l https://*:3000 > [2019-05-21 13:40:24.49479] [10969] [info] Listening at "https://*:3000" > Server available at https://127.0.0.1:3000 > > ~$ curl -v -k https://127.0.0.1:3000 > * Expire in 0 ms for 6 (transfer 0x55d756de3dd0) > * Trying 127.0.0.1... > * TCP_NODELAY set > * Expire in 200 ms for 4 (transfer 0x55d756de3dd0) > * Connected to 127.0.0.1 (127.0.0.1) port 3000 (#0) > * ALPN, offering h2 > * ALPN, offering http/1.1 > * successfully set certificate verify locations: > * CAfile: none > CApath: /etc/ssl/certs > * TLSv1.3 (OUT), TLS handshake, Client hello (1): > * OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to 127.0.0.1:3000 > * Closing connection 0 > curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to > 127.0.0.1:3000 > > ~$ openssl s_client -connect localhost:3000 > CONNECTED(00000003) > write:errno=104 > --- > no peer certificate available > --- > No client certificate CA names sent > --- > SSL handshake has read 0 bytes and written 283 bytes > Verification: OK > --- > New, (NONE), Cipher is (NONE) > Secure Renegotiation IS NOT supported > Compression: NONE > Expansion: NONE > No ALPN negotiated > Early data was not sent > Verify return code: 0 (ok) > --- > > ~$ wget -v https://localhost:3000 > --2019-05-21 11:17:27-- https://localhost:3000/ > Resolving localhost (localhost)... ::1, 127.0.0.1 > Connecting to localhost (localhost)|::1|:3000... failed: Connection > refused. > Connecting to localhost (localhost)|127.0.0.1|:3000... connected. > GnuTLS: Error in the pull function. > Unable to establish SSL connection. > > Am I doing something wrong, or is something wrong with Mojo's SSL > implementation? > > -- > You received this message because you are subscribed to the Google Groups > "Mojolicious" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to mojolicious+unsubscr...@googlegroups.com. > To post to this group, send email to mojolicious@googlegroups.com. > Visit this group at https://groups.google.com/group/mojolicious. > To view this discussion on the web visit > https://groups.google.com/d/msgid/mojolicious/59b0dcdb-c5e2-47e9-9a61-72b9ee3bbd48%40googlegroups.com > <https://groups.google.com/d/msgid/mojolicious/59b0dcdb-c5e2-47e9-9a61-72b9ee3bbd48%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an email to mojolicious+unsubscr...@googlegroups.com. To post to this group, send email to mojolicious@googlegroups.com. Visit this group at https://groups.google.com/group/mojolicious. To view this discussion on the web visit https://groups.google.com/d/msgid/mojolicious/CACyQ%2BFSeBpf9LWd95xyZWpB_aGwke0_mxkSqybFzfphdkyiEEw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.