1 // Licensed to the .NET Foundation under one or more agreements.
2 // The .NET Foundation licenses this file to you under the MIT license.
3 // See the LICENSE file in the project root for more information.
4 
5 internal static partial class Interop
6 {
7     internal static partial class SChannel
8     {
9         // Most constants below are taken from schannel.h; those that are not are
10         // called out explicitly.
11 
12         // IMPORTANT: SSL2 and SSL3 definitions are required for System.Net.Primitives enum definitions only.
13         // These values should NOT be used in Schannel setup.
14         public const int SP_PROT_SSL2_SERVER = 0x00000004;
15         public const int SP_PROT_SSL2_CLIENT = 0x00000008;
16         public const int SP_PROT_SSL2 = (SP_PROT_SSL2_SERVER | SP_PROT_SSL2_CLIENT);
17 
18         public const int SP_PROT_SSL3_SERVER = 0x00000010;
19         public const int SP_PROT_SSL3_CLIENT = 0x00000020;
20         public const int SP_PROT_SSL3 = (SP_PROT_SSL3_SERVER | SP_PROT_SSL3_CLIENT);
21 
22         public const int SP_PROT_TLS1_0_SERVER = 0x00000040;
23         public const int SP_PROT_TLS1_0_CLIENT = 0x00000080;
24         public const int SP_PROT_TLS1_0 = (SP_PROT_TLS1_0_SERVER | SP_PROT_TLS1_0_CLIENT);
25 
26         public const int SP_PROT_TLS1_1_SERVER = 0x00000100;
27         public const int SP_PROT_TLS1_1_CLIENT = 0x00000200;
28         public const int SP_PROT_TLS1_1 = (SP_PROT_TLS1_1_SERVER | SP_PROT_TLS1_1_CLIENT);
29 
30         public const int SP_PROT_TLS1_2_SERVER = 0x00000400;
31         public const int SP_PROT_TLS1_2_CLIENT = 0x00000800;
32         public const int SP_PROT_TLS1_2 = (SP_PROT_TLS1_2_SERVER | SP_PROT_TLS1_2_CLIENT);
33 
34         public const int SP_PROT_NONE = 0;
35 
36         // These two constants are not taken from schannel.h.
37         public const int ClientProtocolMask = (SP_PROT_TLS1_0_CLIENT | SP_PROT_TLS1_1_CLIENT | SP_PROT_TLS1_2_CLIENT);
38         public const int ServerProtocolMask = (SP_PROT_TLS1_0_SERVER | SP_PROT_TLS1_1_SERVER | SP_PROT_TLS1_2_SERVER);
39     }
40 }
41