-
Notifications
You must be signed in to change notification settings - Fork 2k
/
TlsClientAuthenticationOptions.cs
52 lines (44 loc) · 1.91 KB
/
TlsClientAuthenticationOptions.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
using System.Collections.Generic;
using System.Net.Security;
using System.Security.Authentication;
using System.Security.Cryptography.X509Certificates;
namespace Orleans.Connections.Security
{
public delegate X509Certificate ClientCertificateSelectionCallback(object sender, string targetHost, X509CertificateCollection localCertificates, X509Certificate remoteCertificate, string[] acceptableIssuers);
public class TlsClientAuthenticationOptions
{
internal SslClientAuthenticationOptions Value { get; } = new SslClientAuthenticationOptions
{
ApplicationProtocols = new List<SslApplicationProtocol>
{
OrleansApplicationProtocol.Orleans1
}
};
public ClientCertificateSelectionCallback LocalCertificateSelectionCallback
{
get => Value.LocalCertificateSelectionCallback is null ? null : new ClientCertificateSelectionCallback(Value.LocalCertificateSelectionCallback);
set => Value.LocalCertificateSelectionCallback = value is null ? null : new System.Net.Security.LocalCertificateSelectionCallback(value);
}
public X509CertificateCollection ClientCertificates
{
get => this.Value.ClientCertificates;
set => this.Value.ClientCertificates = value;
}
public SslProtocols EnabledSslProtocols
{
get => this.Value.EnabledSslProtocols;
set => this.Value.EnabledSslProtocols = value;
}
public X509RevocationMode CertificateRevocationCheckMode
{
get => this.Value.CertificateRevocationCheckMode;
set => this.Value.CertificateRevocationCheckMode = value;
}
public string TargetHost
{
get => this.Value.TargetHost;
set => this.Value.TargetHost = value;
}
public object SslClientAuthenticationOptions => this.Value;
}
}