| | | 1 | | using System.Security.Cryptography.X509Certificates; |
| | | 2 | | |
| | | 3 | | namespace Kestrun.Certificates; |
| | | 4 | | |
| | | 5 | | /// <summary> |
| | | 6 | | /// Options for creating a Certificate Signing Request (CSR). |
| | | 7 | | /// </summary> |
| | | 8 | | /// <param name="DnsNames">The DNS names to include in the CSR's Subject Alternative Name (SAN) extension.</param> |
| | | 9 | | /// <param name="KeyType">The type of cryptographic key to use (RSA or ECDSA).</param> |
| | | 10 | | /// <param name="KeyLength">The length of the cryptographic key in bits.</param> |
| | | 11 | | /// <param name="Country">The country code for the subject distinguished name.</param> |
| | | 12 | | /// <param name="Org">The organization name for the subject distinguished name.</param> |
| | | 13 | | /// <param name="OrgUnit">The organizational unit for the subject distinguished name.</param> |
| | | 14 | | /// <param name="CommonName">The common name for the subject distinguished name.</param> |
| | | 15 | | /// <param name="KeyUsageFlags">Optional X.509 key usage flags to include in the CSR extension request. Null or <see cre |
| | | 16 | | /// <remarks> |
| | | 17 | | /// This record is used to specify options for creating a Certificate Signing Request (CSR). |
| | | 18 | | /// </remarks> |
| | 3 | 19 | | public record CsrOptions( |
| | 3 | 20 | | IEnumerable<string> DnsNames, |
| | 6 | 21 | | KeyType KeyType = KeyType.Rsa, |
| | 3 | 22 | | int KeyLength = 2048, |
| | 3 | 23 | | string? Country = null, |
| | 3 | 24 | | string? Org = null, |
| | 3 | 25 | | string? OrgUnit = null, |
| | 3 | 26 | | string? CommonName = null, |
| | 6 | 27 | | X509KeyUsageFlags? KeyUsageFlags = null); |