ranfdev / Geopard

Colorful, adaptive gemini browser
https://ranfdev.com/projects/Geopard/
GNU General Public License v3.0
150 stars 12 forks source link

Certificate support #19

Open bjesus opened 2 years ago

bjesus commented 2 years ago

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?

ranfdev commented 2 years ago

Is there a way to provide a certificate?

Currently? No.

But I'm going to add it

bjesus commented 2 years ago

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

Gaming4LifeDE commented 2 years ago

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.

Gaming4LifeDE commented 2 years ago

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

ranfdev commented 2 years ago

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

LSeelig commented 5 months ago

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

ranfdev commented 5 months ago

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