< Summary - Kestrun — Combined Coverage

Information
Class: Kestrun.Certificates.SelfSignedOptions
Assembly: Kestrun
File(s): /home/runner/work/Kestrun/Kestrun/src/CSharp/Kestrun/Certificates/SelfSignedOptions.cs
Tag: Kestrun/Kestrun@5f1d2b981c9d7292c11fd448428c6ab6c811c5de
Line coverage
100%
Covered lines: 18
Uncovered lines: 0
Coverable lines: 18
Total lines: 45
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100 11/19/2025 - 17:40:50 Line coverage: 100% (9/9) Total lines: 26 Tag: Kestrun/Kestrun@fcf33342333cef0516fe0d0912a86709874fd02604/19/2026 - 15:52:57 Line coverage: 100% (12/12) Total lines: 33 Tag: Kestrun/Kestrun@765a8f13c573c01494250a29d6392b6037f087c904/23/2026 - 14:35:41 Line coverage: 100% (18/18) Total lines: 45 Tag: Kestrun/Kestrun@2fdbb120ca2faaa9acf2b8d2a34a7d64b067edbe

Coverage delta

Coverage delta 1 -1

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%
get_DnsNames()100%11100%
get_KeyType()100%11100%
get_KeyLength()100%11100%
get_Purposes()100%11100%
get_KeyUsageFlags()100%11100%
get_ValidDays()100%11100%
get_Ephemeral()100%11100%
get_Exportable()100%11100%
get_IsCertificateAuthority()100%11100%
get_IssuerCertificate()100%11100%
get_Development()100%11100%
get_RootCertificate()100%11100%
get_RootName()100%11100%
get_LeafValidDays()100%11100%
get_RootValidDays()100%11100%
get_TrustRoot()100%11100%

File(s)

/home/runner/work/Kestrun/Kestrun/src/CSharp/Kestrun/Certificates/SelfSignedOptions.cs

#LineLine coverage
 1using Org.BouncyCastle.Asn1.X509;
 2using System.Security.Cryptography.X509Certificates;
 3
 4namespace Kestrun.Certificates;
 5
 6/// <summary>
 7/// Options for creating a self-signed certificate.
 8/// </summary>
 9/// <param name="DnsNames">The DNS names to include in the certificate's Subject Alternative Name (SAN) extension. When 
 10/// <param name="KeyType">The type of cryptographic key to use (RSA or ECDSA).</param>
 11/// <param name="KeyLength">The length of the cryptographic key in bits.</param>
 12/// <param name="Purposes">The key purposes (Extended Key Usage) for the certificate.</param>
 13/// <param name="KeyUsageFlags">The X.509 Key Usage flags to apply to the certificate. Null or <see cref="X509KeyUsageFl
 14/// <param name="ValidDays">The number of days the certificate will be valid.</param>
 15/// <param name="Ephemeral">If true, the certificate will not be stored in the Windows certificate store.</param>
 16/// <param name="Exportable">If true, the private key can be exported from the certificate.</param>
 17/// <param name="IsCertificateAuthority">If true, emits a CA certificate suitable for issuing child certificates.</param
 18/// <param name="IssuerCertificate">Optional issuer certificate used to sign the generated certificate. The issuer must 
 19/// <param name="Development">If true, creates a development bundle consisting of a CA root certificate and an issued le
 20/// <param name="RootCertificate">Optional development root certificate used to sign the generated development leaf cert
 21/// <param name="RootName">The common name to use when creating a new development root certificate.</param>
 22/// <param name="LeafValidDays">The number of days the generated development leaf certificate is valid.</param>
 23/// <param name="RootValidDays">The number of days a generated development root certificate is valid.</param>
 24/// <param name="TrustRoot">When true on Windows, adds the effective development root certificate to the CurrentUser Roo
 25/// <remarks>
 26/// This record is used to specify options for creating a self-signed certificate.
 27/// </remarks>
 3128public record SelfSignedOptions(
 3129    IEnumerable<string>? DnsNames,
 5430    KeyType KeyType = KeyType.Rsa,
 3331    int KeyLength = 2048,
 3032    IEnumerable<KeyPurposeID>? Purposes = null,
 3033    X509KeyUsageFlags? KeyUsageFlags = null,
 2834    int ValidDays = 365,
 3235    bool Ephemeral = false,
 3236    bool Exportable = false,
 10737    bool IsCertificateAuthority = false,
 2838    X509Certificate2? IssuerCertificate = null,
 2639    bool Development = false,
 340    X509Certificate2? RootCertificate = null,
 241    string RootName = "Kestrun Development Root CA",
 642    int LeafValidDays = 30,
 543    int RootValidDays = 3650,
 344    bool TrustRoot = false
 3145    );