A simple/toy client in C
Omar Polo
op at omarpolo.com
Tue Sep 21 18:01:39 BST 2021
stack at tilde.club writes:
> [...]
>
> I am using BearSSL (for its minimalism). I started with the sample
> provided, modified for the Gemini request. I keep getting stuck with
> error 62 (probably because I don't understand how to deal with TLS).
> I attempted to generate the CA boilerplate code, but there are some
> ominous hints that the code is HTTPS-specific.
It's just a wild guess, I never touched BearSSL, but smell like a
possible failure in verifying the certificates. In geminispace the
usage of TOFU and self-signed certificates is way more popular than in
the web, and TLS libraries by defaults try to verify the certificate
against the installed CAs. For the record, on libtls is the function is
tls_config_insecure_noverifycert.
regarding the other mail: the code in gemini.c for telescope <= 0.4 is
probably a bit easier to grasp. With telescope 0.5 gemini.c renamed
net.c and handles gopher and finger too. Moreover, both telescope and
gmid use async I/O and relies a lot on libevent, so the code may seem a
bit harder to follow at first given how it's splitted in more functions.
The code in the test program gg.c uses blocking I/O and is a single
function in contrast.
HTH
Omar Polo
More information about the Gemini
mailing list