Skip to content

Weird SSL error: wrong ssl version on some web site #62

@Zer0-Tolerance

Description

@Zer0-Tolerance

Hi Jonathan,
Please have a look at this code:

use Cro::HTTP::Client;
my $resp = await Cro::HTTP::Client.get('https://218.97.11.2',ca => { :insecure });

it fails with:

Tried to get the result of a broken Promise
  in block  at /Users/xxx/.rakubrew/versions/moar-2021.07/share/perl6/site/sources/BF807DCA3C10D2DAA85ADF32F913D016057C1A06 (Cro::HTTP::Client) line 786

Original exception:
    Tried to get the result of a broken Promise
      in block  at /Users/xxx/.rakubrew/versions/moar-2021.07/share/perl6/site/sources/8F9CE57B4C9E54F00938F862E837CA40DCD18536 (Cro::TLS) line 110

    Original exception:
        An operation first awaited:
          in block  at /Users/xxx/.rakubrew/versions/moar-2021.07/share/perl6/site/sources/DC2535A0A8F9C376CD7A8C92E469C35747CBF671 (IO::Socket::Async::SSL) line 364

        Died with the exception:
            error:1425F10A:SSL routines:ssl_choose_client_version:wrong ssl version
              in sub check at /Users/xxx/.rakubrew/versions/moar-2021.07/share/perl6/site/sources/DC2535A0A8F9C376CD7A8C92E469C35747CBF671 (IO::Socket::Async::SSL) line 838
              in method handle-buffers at /Users/xxx/.rakubrew/versions/moar-2021.07/share/perl6/site/sources/DC2535A0A8F9C376CD7A8C92E469C35747CBF671 (IO::Socket::Async::SSL) line 653
              in block  at /Users/xxx/.rakubrew/versions/moar-2021.07/share/perl6/site/sources/DC2535A0A8F9C376CD7A8C92E469C35747CBF671 (IO::Socket::Async::SSL) line 270

while doing a curl or lwp-request works just fine.
I'm using Raku 2021.07 and OpenSSL 1.1.1k 25 Mar 2021 on OS X 11.5.1 but behavior is the same with a docker running linux alpine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions