Small-NET / Dioscuri

A cross-platform TUI browser for Geminispace
GNU General Public License v3.0
1 stars 0 forks source link

Replace Pluralsight.Crypto library with a cross-platform alternative #1

Open markjamesm opened 1 year ago

markjamesm commented 1 year ago

Currently Dioscuri only builds on Windows. This is because the library used to generate an X.509 certificate (Pluralsight.Crypto) is on .NET Framework and makes win32 API calls:

Package 'Pluralsight.Crypto 1.1.0' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework 'net6.0'. This package may not be fully compatible with your project.

Need to replace this library, possibly by making use of the .NET CertificateRequest

markjamesm commented 1 year ago

Dioscuri now builds on Mac, but there's a bug in which a certificate validation error occurs. Need to investigate further.

markjamesm commented 1 year ago

When Gemini.Fetch is set to secure mode, the Client crashes on Mac when a new request is made. Looking at the code inside the SmolNetSharp library, I need to debug what might be happening with the certificate chain on Mac.

connectInsecure variable

AlwaysAccept:

https://github.com/markjamesm/Dioscuri/blob/master/SmolNetSharp/Gemini.cs#L139