C
C#2y ago
GenTwo

❔ X509Certificate Help

Am I doing something wrong here?
private static bool assertSSL(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors)
{
if (!certificate.Issuer.Contains("Google Trust Services LLC") || !certificate.Issuer.Contains("Cloudflare Inc") || sslPolicyErrors != SslPolicyErrors.None)
{
SixConsole.Error("SSL Certificate Error");
SixConsole.Error(certificate.Issuer);
return false;
}
return true;
}
private static bool assertSSL(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors)
{
if (!certificate.Issuer.Contains("Google Trust Services LLC") || !certificate.Issuer.Contains("Cloudflare Inc") || sslPolicyErrors != SslPolicyErrors.None)
{
SixConsole.Error("SSL Certificate Error");
SixConsole.Error(certificate.Issuer);
return false;
}
return true;
}
4 Replies
GenTwo
GenTwoOP2y ago
However, when I run it, it returns false
GenTwo
GenTwoOP2y ago
GenTwo
GenTwoOP2y ago
If i just do if (!certificate.Issuer.Contains("Google") returns harold i do this:
if (!certificate.Issuer.Contains("Google Trust Services LLC") || sslPolicyErrors != SslPolicyErrors.None)
if (!certificate.Issuer.Contains("Google Trust Services LLC") || sslPolicyErrors != SslPolicyErrors.None)
It's fine?
Accord
Accord2y ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server