private static bool CheckThumbprint(X509Certificate certificate) { var x509 = certificate as X509Certificate2; return(!String.IsNullOrEmpty(Thumbprint) && x509 != null && x509.Thumbprint.Equals(Thumbprint.Replace(":", ""), StringComparison.InvariantCultureIgnoreCase)); }
private bool MatchesThumbprint(X509Certificate2 certificate) { var expectedThumbprint = Thumbprint.Replace(" ", "").ToLowerInvariant(); var actualThumbprint = certificate.Thumbprint.Replace(" ", "").ToLowerInvariant(); return(string.Equals(expectedThumbprint, actualThumbprint)); }