Geopard icon indicating copy to clipboard operation
Geopard copied to clipboard

Certificate support

Open bjesus opened this issue 3 years ago • 10 comments

Going to a Gemini website that requires a certificate (e.g. gemini://feeds.drewdevault.com) currently just shows "Error: A certificate is required to access this page".

Is there a way to provide a certificate?

bjesus avatar May 26 '22 22:05 bjesus

Is there a way to provide a certificate?

Currently? No.

But I'm going to add it

ranfdev avatar May 27 '22 05:05 ranfdev

Ah okay! The error message made me think like I'm misunderstanding how to set the certificate. Glad to hear it will be added!

bjesus avatar May 27 '22 11:05 bjesus

Is there a rough timeframe for this?

I'm currently implementing a gemini client library in python, Do you want the code if i can make it work with certs? Maybe it helps you.

skutter-de avatar Jun 08 '22 23:06 skutter-de

Made it work in my python library... basically:

context: ssl.SSLContext = ssl.create_default_context()
    context.check_hostname = False

    def get(self, url: str, cert: str = None, key: str = None, verify_certs: bool = True) -> GeminiResponse:
        if cert is not None and key is not None:
            self.context.load_cert_chain(cert, key)

Try to find if there's anything similar in rust: https://docs.python.org/3/library/ssl.html#ssl.create_default_context

skutter-de avatar Jun 08 '22 23:06 skutter-de

The biggest problem I have right now is not technical, it's that I don't have enough time to do everything.

ranfdev avatar Jun 09 '22 16:06 ranfdev

Would you consider contributions? I only ask because I'm not very experienced with networks, but I could try to contribute.

LSeelig avatar Apr 28 '24 04:04 LSeelig

If anyone can provide a working implementation, I will gladly accept it and merge it.

ranfdev avatar Apr 28 '24 09:04 ranfdev