Stream: beginners

Topic: Do any of the roc platforms support client certificates


view this post on Zulip Henrik Larsson (Mar 12 2025 at 16:45):

My default toy project when trying out a new language starts with the following request:

curl -v -q -k --cert client-``2048``.crt --key client-``2048``.key 'https://identitysso-cert.betfair.com/api/certlogin' -H 'X-Application:{{appId}}' --data-urlencode 'username={{username}}' --data-urlencode 'password={{password}}'

However it is a bit unclear if the basic-cli platform actually has support for such a request?

view this post on Zulip Anton (Mar 12 2025 at 17:04):

Hi @Henrik Larsson,
basic-cli does not support passing certs, but we use rust hyper under the hood and it does support passing certs. This file would be where most of the modifications need to happen to support this. It is the first time someone has requested this feature so it seems out of scope for "basic"-cli but everyone is welcome to weigh in on that decision.

view this post on Zulip Henrik Larsson (Mar 12 2025 at 19:58):

@Anton thanks for the reply, I will look into that, another question is if the Tcp stream do support SSL sockets? I am trying to connect to a port 443 however im getting an error of (TcpReadErr ConnectionReset)

view this post on Zulip Anton (Mar 14 2025 at 10:27):

I would expect that to work, can you file an issue on the basic-cli repo with code to reproduce the problem?

view this post on Zulip Henrik Larsson (Mar 14 2025 at 10:37):

I have done changes to a local version basic-cli to get it to work, will make a proper fork and post here after work today.

view this post on Zulip Henrik Larsson (Mar 14 2025 at 15:37):

@Anton This is the changes I made to make basic-cli streams work with my use case (no changes for http was needed, I did not have to use certs) https://github.com/roc-lang/basic-cli/pull/331/files

This is far from mergable but it shows the changes. Sorry if a draft PR is not the right way to show this, then you can just close it.

view this post on Zulip Anton (Mar 14 2025 at 15:43):

No, this is great :)


Last updated: Jul 06 2025 at 12:14 UTC