| | | 1 | | using System.Security.Cryptography.X509Certificates; |
| | | 2 | | |
| | | 3 | | namespace Kestrun.Certificates; |
| | | 4 | | |
| | | 5 | | /// <summary> |
| | | 6 | | /// Represents the result of creating a self-signed certificate or development certificate bundle. |
| | | 7 | | /// </summary> |
| | | 8 | | /// <param name="Certificate">The primary generated certificate. For development mode, this is the issued leaf certifica |
| | 47 | 9 | | public record SelfSignedCertificateResult(X509Certificate2 Certificate) |
| | | 10 | | { |
| | | 11 | | /// <summary> |
| | | 12 | | /// Gets the effective development root certificate when development mode is used. |
| | | 13 | | /// </summary> |
| | 13 | 14 | | public X509Certificate2? RootCertificate { get; init; } |
| | | 15 | | |
| | | 16 | | /// <summary> |
| | | 17 | | /// Gets the issued development leaf certificate when development mode is used. |
| | | 18 | | /// </summary> |
| | 14 | 19 | | public X509Certificate2? LeafCertificate { get; init; } |
| | | 20 | | |
| | | 21 | | /// <summary> |
| | | 22 | | /// Gets a public-only copy of the effective development root certificate when development mode is used. |
| | | 23 | | /// </summary> |
| | 12 | 24 | | public X509Certificate2? PublicRootCertificate { get; init; } |
| | | 25 | | |
| | | 26 | | /// <summary> |
| | | 27 | | /// Gets a value indicating whether the development root certificate is present in the Windows CurrentUser Root stor |
| | | 28 | | /// </summary> |
| | 5 | 29 | | public bool RootTrusted { get; init; } |
| | | 30 | | |
| | | 31 | | /// <summary> |
| | | 32 | | /// Gets a value indicating whether the result represents a development certificate bundle. |
| | | 33 | | /// </summary> |
| | 0 | 34 | | public bool IsDevelopmentCertificate => RootCertificate is not null; |
| | | 35 | | } |