diff --git a/FitConnect/Encryption/CertificateHelper.cs b/FitConnect/Encryption/CertificateHelper.cs index f162d5798759bd06574c8ffca776fbf8bf4d016c..7392d5f849672747d86911b78dbfbc4655975953 100644 --- a/FitConnect/Encryption/CertificateHelper.cs +++ b/FitConnect/Encryption/CertificateHelper.cs @@ -31,7 +31,6 @@ public class CertificateHelper { var certificateChain = new X509Chain(); certificateChain.ChainPolicy.ExtraStore.AddRange(extras ?? Array.Empty<X509Certificate2>()); -// certificate.ExportToPem($"./temp/{Guid.NewGuid().ToString()}"); _logger?.LogDebug("Issuers: {Issuer}", certificate.Issuer); if (rootCertificate != null) { @@ -75,13 +74,7 @@ public class CertificateHelper { _logger?.Log(logLevel, "Certificate does not match FIT-Connect requirements"); return false; } - - // var valid = certificates.Aggregate(true, - // (result, cert) => result - // && ValidateCertificate(cert, out _, root, certificates.ToArray(), logLevel) - // // && cert.Verify() - // ); - + var valid = ValidateCertificate(certificates.First(), out _, root, certificates.ToArray(), logLevel); return valid && fitConnectRequirements;