Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I connect an ssl certificate to Leaf.xNet? #122

Open
unitlu opened this issue Apr 4, 2021 · 2 comments
Open

How can I connect an ssl certificate to Leaf.xNet? #122

unitlu opened this issue Apr 4, 2021 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@unitlu
Copy link

unitlu commented Apr 4, 2021

I tried several ways to connect the ssl certificate to Leaf.xNet but they all give me 403 status.

@unitlu
Copy link
Author

unitlu commented Apr 4, 2021

gives me some exception messages like this
Unable to establish SSL-connection with HTTP-server
and the protocol version is TLS v1.2

@unitlu
Copy link
Author

unitlu commented Apr 4, 2021

example:
HttpRequest httpRequest = new HttpRequest();
httpRequest.SslCertificateValidatorCallback += pinPublicKey;
httpRequest.SslProtocols = System.Security.Authentication.SslProtocols.Tls12;
var httpresponse = httpRequest.Get("https://...");

    public static bool pinPublicKey(object sender, X509Certificate cert, X509Chain chain, SslPolicyErrors sslPolicyErrors)
=> cert != null && cert.GetPublicKeyString() == IDCertificacionKey;

    public static string IDCertificacionKey = "Certificate here";

@grandsilence grandsilence added the help wanted Extra attention is needed label Jul 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants