diff --git a/src/Microsoft.AspNetCore.Server.Kestrel.Https/ClientCertificateMode.cs b/src/Microsoft.AspNetCore.Server.Kestrel.Https/ClientCertificateMode.cs index 9697cb6476..caff5e041a 100644 --- a/src/Microsoft.AspNetCore.Server.Kestrel.Https/ClientCertificateMode.cs +++ b/src/Microsoft.AspNetCore.Server.Kestrel.Https/ClientCertificateMode.cs @@ -3,10 +3,24 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Https { + /// + /// Describes the client certificate requirements for a HTTPS connection. + /// public enum ClientCertificateMode { + /// + /// A client certificate is not required and will not be requested from clients. + /// NoCertificate, + + /// + /// A client certificate will be requested; however, authentication will not fail if a certificate is not provided by the client. + /// AllowCertificate, + + /// + /// A client certificate will be requested, and the client must provide a valid certificate for authentication to succeed. + /// RequireCertificate } } diff --git a/src/Microsoft.AspNetCore.Server.Kestrel.Https/HttpsConnectionAdapterOptions.cs b/src/Microsoft.AspNetCore.Server.Kestrel.Https/HttpsConnectionAdapterOptions.cs index 728c842c65..d10fdbf23b 100644 --- a/src/Microsoft.AspNetCore.Server.Kestrel.Https/HttpsConnectionAdapterOptions.cs +++ b/src/Microsoft.AspNetCore.Server.Kestrel.Https/HttpsConnectionAdapterOptions.cs @@ -8,18 +8,43 @@ using System.Security.Cryptography.X509Certificates; namespace Microsoft.AspNetCore.Server.Kestrel.Https { + /// + /// Settings for how Kestrel should handle HTTPS connections. + /// public class HttpsConnectionAdapterOptions { + /// + /// Initializes a new instance of . + /// public HttpsConnectionAdapterOptions() { ClientCertificateMode = ClientCertificateMode.NoCertificate; SslProtocols = SslProtocols.Tls12 | SslProtocols.Tls11; } + /// + /// Specifies the server certificate used to authenticate HTTPS connections. + /// public X509Certificate2 ServerCertificate { get; set; } + + /// + /// Specifies the client certificate requirements for a HTTPS connection. Defaults to . + /// public ClientCertificateMode ClientCertificateMode { get; set; } + + /// + /// Specifies a callback for additional client certificate validation that will be invoked during authentication. + /// public Func ClientCertificateValidation { get; set; } + + /// + /// Specifies allowable SSL protocols. Defaults to and . + /// public SslProtocols SslProtocols { get; set; } + + /// + /// Specifies whether the certificate revocation list is checked during authentication. + /// public bool CheckCertificateRevocation { get; set; } } }