Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
SecurityStatusAdapterPal.cs
Go to the documentation of this file.
3
4namespace System.Net;
5
6internal static class SecurityStatusAdapterPal
7{
8 private static readonly System.Collections.Generic.BidirectionalDictionary<global::Interop.SECURITY_STATUS, System.Net.SecurityStatusPalErrorCode> s_statusDictionary = new System.Collections.Generic.BidirectionalDictionary<global::Interop.SECURITY_STATUS, System.Net.SecurityStatusPalErrorCode>(43)
9 {
10 {
11 global::Interop.SECURITY_STATUS.AlgorithmMismatch,
12 System.Net.SecurityStatusPalErrorCode.AlgorithmMismatch
13 },
14 {
15 global::Interop.SECURITY_STATUS.ApplicationProtocolMismatch,
16 System.Net.SecurityStatusPalErrorCode.ApplicationProtocolMismatch
17 },
18 {
19 global::Interop.SECURITY_STATUS.BadBinding,
20 System.Net.SecurityStatusPalErrorCode.BadBinding
21 },
22 {
23 global::Interop.SECURITY_STATUS.BufferNotEnough,
24 System.Net.SecurityStatusPalErrorCode.BufferNotEnough
25 },
26 {
27 global::Interop.SECURITY_STATUS.CannotInstall,
28 System.Net.SecurityStatusPalErrorCode.CannotInstall
29 },
30 {
31 global::Interop.SECURITY_STATUS.CannotPack,
32 System.Net.SecurityStatusPalErrorCode.CannotPack
33 },
34 {
35 global::Interop.SECURITY_STATUS.CertExpired,
36 System.Net.SecurityStatusPalErrorCode.CertExpired
37 },
38 {
39 global::Interop.SECURITY_STATUS.CertUnknown,
40 System.Net.SecurityStatusPalErrorCode.CertUnknown
41 },
42 {
43 global::Interop.SECURITY_STATUS.CompAndContinue,
44 System.Net.SecurityStatusPalErrorCode.CompAndContinue
45 },
46 {
47 global::Interop.SECURITY_STATUS.CompleteNeeded,
48 System.Net.SecurityStatusPalErrorCode.CompleteNeeded
49 },
50 {
51 global::Interop.SECURITY_STATUS.ContextExpired,
52 System.Net.SecurityStatusPalErrorCode.ContextExpired
53 },
54 {
55 global::Interop.SECURITY_STATUS.ContinueNeeded,
56 System.Net.SecurityStatusPalErrorCode.ContinueNeeded
57 },
58 {
59 global::Interop.SECURITY_STATUS.CredentialsNeeded,
60 System.Net.SecurityStatusPalErrorCode.CredentialsNeeded
61 },
62 {
63 global::Interop.SECURITY_STATUS.DecryptFailure,
64 System.Net.SecurityStatusPalErrorCode.DecryptFailure
65 },
66 {
67 global::Interop.SECURITY_STATUS.DowngradeDetected,
68 System.Net.SecurityStatusPalErrorCode.DowngradeDetected
69 },
70 {
71 global::Interop.SECURITY_STATUS.IllegalMessage,
72 System.Net.SecurityStatusPalErrorCode.IllegalMessage
73 },
74 {
75 global::Interop.SECURITY_STATUS.IncompleteCredentials,
76 System.Net.SecurityStatusPalErrorCode.IncompleteCredentials
77 },
78 {
79 global::Interop.SECURITY_STATUS.IncompleteMessage,
80 System.Net.SecurityStatusPalErrorCode.IncompleteMessage
81 },
82 {
83 global::Interop.SECURITY_STATUS.InternalError,
84 System.Net.SecurityStatusPalErrorCode.InternalError
85 },
86 {
87 global::Interop.SECURITY_STATUS.InvalidHandle,
88 System.Net.SecurityStatusPalErrorCode.InvalidHandle
89 },
90 {
91 global::Interop.SECURITY_STATUS.InvalidToken,
92 System.Net.SecurityStatusPalErrorCode.InvalidToken
93 },
94 {
95 global::Interop.SECURITY_STATUS.LogonDenied,
96 System.Net.SecurityStatusPalErrorCode.LogonDenied
97 },
98 {
99 global::Interop.SECURITY_STATUS.MessageAltered,
100 System.Net.SecurityStatusPalErrorCode.MessageAltered
101 },
102 {
103 global::Interop.SECURITY_STATUS.NoAuthenticatingAuthority,
104 System.Net.SecurityStatusPalErrorCode.NoAuthenticatingAuthority
105 },
106 {
107 global::Interop.SECURITY_STATUS.NoImpersonation,
108 System.Net.SecurityStatusPalErrorCode.NoImpersonation
109 },
110 {
111 global::Interop.SECURITY_STATUS.NoCredentials,
112 System.Net.SecurityStatusPalErrorCode.NoCredentials
113 },
114 {
115 global::Interop.SECURITY_STATUS.NotOwner,
116 System.Net.SecurityStatusPalErrorCode.NotOwner
117 },
118 {
119 global::Interop.SECURITY_STATUS.OK,
120 System.Net.SecurityStatusPalErrorCode.OK
121 },
122 {
123 global::Interop.SECURITY_STATUS.OutOfMemory,
124 System.Net.SecurityStatusPalErrorCode.OutOfMemory
125 },
126 {
127 global::Interop.SECURITY_STATUS.OutOfSequence,
128 System.Net.SecurityStatusPalErrorCode.OutOfSequence
129 },
130 {
131 global::Interop.SECURITY_STATUS.PackageNotFound,
132 System.Net.SecurityStatusPalErrorCode.PackageNotFound
133 },
134 {
135 global::Interop.SECURITY_STATUS.QopNotSupported,
136 System.Net.SecurityStatusPalErrorCode.QopNotSupported
137 },
138 {
139 global::Interop.SECURITY_STATUS.Renegotiate,
140 System.Net.SecurityStatusPalErrorCode.Renegotiate
141 },
142 {
143 global::Interop.SECURITY_STATUS.SecurityQosFailed,
144 System.Net.SecurityStatusPalErrorCode.SecurityQosFailed
145 },
146 {
147 global::Interop.SECURITY_STATUS.SmartcardLogonRequired,
148 System.Net.SecurityStatusPalErrorCode.SmartcardLogonRequired
149 },
150 {
151 global::Interop.SECURITY_STATUS.TargetUnknown,
152 System.Net.SecurityStatusPalErrorCode.TargetUnknown
153 },
154 {
155 global::Interop.SECURITY_STATUS.TimeSkew,
156 System.Net.SecurityStatusPalErrorCode.TimeSkew
157 },
158 {
159 global::Interop.SECURITY_STATUS.UnknownCredentials,
160 System.Net.SecurityStatusPalErrorCode.UnknownCredentials
161 },
162 {
163 global::Interop.SECURITY_STATUS.UnsupportedPreauth,
164 System.Net.SecurityStatusPalErrorCode.UnsupportedPreauth
165 },
166 {
167 global::Interop.SECURITY_STATUS.Unsupported,
168 System.Net.SecurityStatusPalErrorCode.Unsupported
169 },
170 {
171 global::Interop.SECURITY_STATUS.UntrustedRoot,
172 System.Net.SecurityStatusPalErrorCode.UntrustedRoot
173 },
174 {
175 global::Interop.SECURITY_STATUS.WrongPrincipal,
176 System.Net.SecurityStatusPalErrorCode.WrongPrincipal
177 },
178 {
179 global::Interop.SECURITY_STATUS.NoRenegotiation,
180 System.Net.SecurityStatusPalErrorCode.NoRenegotiation
181 }
182 };
183
184 internal static System.Net.SecurityStatusPal GetSecurityStatusPalFromInterop(global::Interop.SECURITY_STATUS win32SecurityStatus, bool attachException = false)
185 {
187 {
189 }
190 if (attachException)
191 {
193 }
194 return new System.Net.SecurityStatusPal(item);
195 }
196
197 internal static global::Interop.SECURITY_STATUS GetInteropFromSecurityStatusPal(System.Net.SecurityStatusPal status)
198 {
199 if (!s_statusDictionary.TryGetBackward(status.ErrorCode, out var item))
200 {
201 throw new System.Net.InternalException(status.ErrorCode);
202 }
203 return item;
204 }
205}
static global::Interop.SECURITY_STATUS GetInteropFromSecurityStatusPal(System.Net.SecurityStatusPal status)
static readonly System.Collections.Generic.BidirectionalDictionary< global::Interop.SECURITY_STATUS, System.Net.SecurityStatusPalErrorCode > s_statusDictionary
static System.Net.SecurityStatusPal GetSecurityStatusPalFromInterop(global::Interop.SECURITY_STATUS win32SecurityStatus, bool attachException=false)