Comment by hermesnikesas on 25/07/2024 at 20:20 UTC*

5 upvotes, 1 direct replies (showing 1)

View submission: Gemini in Godot?

I don't know anything about Godot, but if I'm reading the API correctly, it seems that the method you mentioned performs certificate verification. The "common_name" should be the FQDN of the site you want to access (for instance, if you want to access gemini://maiaforum.net/index.gmi, the FQDN would be "maiaforum.net"). For the 3rd argument, you will likely need to disable verification completely, or find an option that will allow self-signed certificates (which are standard for Gemini), since most TLS libraries don't accept those by default.

Replies

Comment by poeticAndroid at 25/07/2024 at 20:43 UTC

1 upvotes, 0 direct replies

I've tried that, using both `TLSOptions.client()` and `TLSOptions.client_unsafe()` as options. But the result is the same.

tcp = StreamPeerTCP.new()
print(host, ":", port)
tcp.connect_to_host(host, port)
tls = StreamPeerTLS.new()
tls.connect_to_stream(tcp, host, TLSOptions.client_unsafe())
print("status " + str(tls.get_status()))

Output:

geminiprotocol.net:1965
status 4