Interface ICertificateChainService
- Namespace
- SimpleSign.Core.Validation
- Assembly
- SimpleSign.Core.dll
Service for certificate chain operations: AIA chasing, certificate loading.
public interface ICertificateChainService
Methods
DownloadAiaCertsAsync(HttpClient, X509Certificate2, IReadOnlyList<X509Certificate2>?, List<string>, CancellationToken)
Downloads intermediate certificates via AIA (Authority Information Access) using iterative BFS so that each downloaded intermediate's own AIA is also chased.
Task<List<X509Certificate2>> DownloadAiaCertsAsync(HttpClient httpClient, X509Certificate2 cert, IReadOnlyList<X509Certificate2>? extraCerts, List<string> warnings, CancellationToken ct)
Parameters
httpClientHttpClientcertX509Certificate2extraCertsIReadOnlyList<X509Certificate2>warningsList<string>ctCancellationToken
Returns
LoadCertsFromBytes(byte[], ILogger?)
Loads one or more X509 certificates from raw bytes (DER, PEM, PKCS#7, PKCS#12).
IEnumerable<X509Certificate2> LoadCertsFromBytes(byte[] bytes, ILogger? logger = null)
Parameters
Returns
LoadPkcs12CollectionFromFile(string, string?)
Loads all certificates from a PKCS#12 collection file.
X509Certificate2Collection LoadPkcs12CollectionFromFile(string path, string? password)
Parameters
Returns
LoadPkcs12FromFile(string, string?)
Loads an X509 certificate from a PKCS#12 file.
X509Certificate2 LoadPkcs12FromFile(string path, string? password)
Parameters
Returns
ShortName(string)
Extracts the CN from a certificate subject string.
string ShortName(string subject)
Parameters
subjectstring