Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POD code fails on older MacOS (possible TLS1.2 requirement issue) #22

Open
jubilatious1 opened this issue Jan 12, 2021 · 0 comments
Open

Comments

@jubilatious1
Copy link

Hello, I tried running the POD code below with a fresh install of Rakudo_2020.10 on an older MacOS.

use IO::Socket::SSL;
    my $ssl = IO::Socket::SSL.new(:host<github.com>, :port(443));
    my $content = Buf.new;
    $ssl.print("GET /\r\n\r\n");
    while my $read = $ssl.recv {
        $content ~= $read;
    }
    say $content;

The code hangs with an SSL error, which I surmise has to do with a TLS1.2 requirement at http://github.com. I don't know if I can set an OS environment variable to overcome this issue, or whether the IO::SOCKET::SSL module in various other iterations (Perl5, etc.) accepts a TLS parameter.

user@mbook:~$ raku sergot_PODcode_IO-Socket-SSL.p6 
err code: 336032814
error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
Buf:0x<>
user@mbook:~$

Of course, it's unreasonable to expect that Raku modules support ancient OS versions, but it is useful for new users to know they can try out the Raku programming language with a reasonable expectation of success without running the 'latest-and-greatest' hardware. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant