Skip to content
Snippets Groups Projects
Commit d1a91125 authored by Klaus Fischer's avatar Klaus Fischer
Browse files

Removed comments

parent a7fd36a0
No related branches found
No related tags found
1 merge request!14Feature/784 rework submission creation
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Text.Unicode;
using Microsoft.Extensions.Logging;
using Microsoft.IdentityModel.Tokens;
using Microsoft.Win32.SafeHandles;
using Newtonsoft.Json;
namespace FitConnect.Encryption;
public class CertificateHelper {
......@@ -26,7 +25,6 @@ public class CertificateHelper {
LogLevel logLevel = LogLevel.Warning) {
var certificateChain = new X509Chain();
// certificate.ExportToPem($"./temp/{Guid.NewGuid().ToString()}");
_logger?.LogDebug("Issuers: {Issuer}", certificate.Issuer);
if (rootCertificate != null) {
......@@ -65,17 +63,10 @@ public class CertificateHelper {
var certificates = key.X5c.Select(s => new X509Certificate2(Convert.FromBase64String(s)))
.ToList();
// if (certificates.Count != 3) {
// _logger?.Log(logLevel, "Found {Count} certificate(s) but should be 3",
// certificates.Count);
// return false;
// }
// root ??= new X509Certificate2(Convert.FromBase64String(key.X5t));
var valid = certificates.Aggregate(true,
(result, cert) => result
&& ValidateCertificate(cert, out _, root, logLevel)
// && cert.Verify()
);
return valid;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment