Add XML docs for the public HTTPs APIs shipping in 2.0 (#1942)

This commit is contained in:
Nate McMaster 2017-07-07 10:40:39 -07:00 committed by GitHub
parent a4ed948d1e
commit bd8a2c8a62
2 changed files with 39 additions and 0 deletions

View File

@ -3,10 +3,24 @@
namespace Microsoft.AspNetCore.Server.Kestrel.Https
{
/// <summary>
/// Describes the client certificate requirements for a HTTPS connection.
/// </summary>
public enum ClientCertificateMode
{
/// <summary>
/// A client certificate is not required and will not be requested from clients.
/// </summary>
NoCertificate,
/// <summary>
/// A client certificate will be requested; however, authentication will not fail if a certificate is not provided by the client.
/// </summary>
AllowCertificate,
/// <summary>
/// A client certificate will be requested, and the client must provide a valid certificate for authentication to succeed.
/// </summary>
RequireCertificate
}
}

View File

@ -8,18 +8,43 @@ using System.Security.Cryptography.X509Certificates;
namespace Microsoft.AspNetCore.Server.Kestrel.Https
{
/// <summary>
/// Settings for how Kestrel should handle HTTPS connections.
/// </summary>
public class HttpsConnectionAdapterOptions
{
/// <summary>
/// Initializes a new instance of <see cref="HttpsConnectionAdapterOptions"/>.
/// </summary>
public HttpsConnectionAdapterOptions()
{
ClientCertificateMode = ClientCertificateMode.NoCertificate;
SslProtocols = SslProtocols.Tls12 | SslProtocols.Tls11;
}
/// <summary>
/// Specifies the server certificate used to authenticate HTTPS connections.
/// </summary>
public X509Certificate2 ServerCertificate { get; set; }
/// <summary>
/// Specifies the client certificate requirements for a HTTPS connection. Defaults to <see cref="ClientCertificateMode.NoCertificate"/>.
/// </summary>
public ClientCertificateMode ClientCertificateMode { get; set; }
/// <summary>
/// Specifies a callback for additional client certificate validation that will be invoked during authentication.
/// </summary>
public Func<X509Certificate2, X509Chain, SslPolicyErrors, bool> ClientCertificateValidation { get; set; }
/// <summary>
/// Specifies allowable SSL protocols. Defaults to <see cref="SslProtocols.Tls12" /> and <see cref="SslProtocols.Tls11"/>.
/// </summary>
public SslProtocols SslProtocols { get; set; }
/// <summary>
/// Specifies whether the certificate revocation list is checked during authentication.
/// </summary>
public bool CheckCertificateRevocation { get; set; }
}
}