terraria-cpp2il-methodrecon v1.4.4.9
Terraria mobile dump, with reconstructed method body. Dump with CallAnalysis: https://infinitynichto.github.io/terraria-cpp2il
Loading...
Searching...
No Matches
X509Chain.cs
Go to the documentation of this file.
1using System;
2
3namespace Mono.Security.X509
4{
5 // Token: 0x02000019 RID: 25
6 public class X509Chain
7 {
8 // Token: 0x0600011B RID: 283 RVA: 0x00006220 File Offset: 0x00004420
9 public X509Chain()
10 {
11 }
12
13 // Token: 0x0600011C RID: 284 RVA: 0x00006234 File Offset: 0x00004434
15 {
16 }
17
18 // Token: 0x17000056 RID: 86
19 // (get) Token: 0x0600011D RID: 285 RVA: 0x00006244 File Offset: 0x00004444
21 {
22 get
23 {
24 return this._chain;
25 }
26 }
27
28 // Token: 0x17000057 RID: 87
29 // (get) Token: 0x0600011E RID: 286 RVA: 0x00006258 File Offset: 0x00004458
31 {
32 get
33 {
34 return this._root;
35 }
36 }
37
38 // Token: 0x17000058 RID: 88
39 // (get) Token: 0x0600011F RID: 287 RVA: 0x0000626C File Offset: 0x0000446C
41 {
42 get
43 {
44 return this._status;
45 }
46 }
47
48 // Token: 0x17000059 RID: 89
49 // (get) Token: 0x06000120 RID: 288 RVA: 0x00006280 File Offset: 0x00004480
50 // (set) Token: 0x06000121 RID: 289 RVA: 0x000062A4 File Offset: 0x000044A4
52 {
53 get
54 {
55 while (this.roots != null)
56 {
57 }
59 return this.roots;
60 }
61 set
62 {
64 }
65 }
66
67 // Token: 0x06000122 RID: 290 RVA: 0x000062B8 File Offset: 0x000044B8
69 {
70 int num = this.certs.Add(x509);
71 }
72
73 // Token: 0x06000123 RID: 291 RVA: 0x000062D4 File Offset: 0x000044D4
75 {
76 this.certs.AddRange(collection);
77 }
78
79 // Token: 0x06000124 RID: 292 RVA: 0x000062F0 File Offset: 0x000044F0
81 {
83 bool flag = enumerator.MoveNext();
84 X509Certificate x509Certificate = enumerator.Current;
85 long num = 0L;
86 if (enumerator != null)
87 {
88 }
89 if (num == 0L)
90 {
91 }
92 throw new OutOfMemoryException();
93 }
94
95 // Token: 0x06000125 RID: 293 RVA: 0x0000633C File Offset: 0x0000453C
97 {
99 if (chain != null)
100 {
101 int count = chain.Count;
103 long num = 0L;
104 X509Certificate x509Certificate = chain2[(int)num];
105 bool flag = this.IsParent(leaf, x509Certificate);
106 int num2 = 1;
110 return this.IsParent(x509Certificate3, x509Certificate2);
111 }
112 if (leaf != null)
113 {
114 bool isSelfSigned = leaf.IsSelfSigned;
115 int num3 = this._chain.Add(leaf);
117 if (x509Certificate4 != null)
118 {
119 return x509Certificate4.IsSelfSigned;
120 }
121 }
125 if (chain4 == null || this._status != X509ChainStatusFlags.NoError)
126 {
127 X509ChainStatusFlags status = this._status;
128 }
130 bool flag2 = enumerator.MoveNext();
132 return this.IsValid(x509Certificate6);
133 }
134
135 // Token: 0x06000126 RID: 294 RVA: 0x0000647C File Offset: 0x0000467C
136 public void Reset()
137 {
138 this.certs.Clear();
140 if (chain != null)
141 {
142 chain.Clear();
143 return;
144 }
145 }
146
147 // Token: 0x06000127 RID: 295 RVA: 0x000064A8 File Offset: 0x000046A8
148 private bool IsValid(X509Certificate cert)
149 {
150 bool isCurrent = cert.IsCurrent;
151 if (!true)
152 {
153 }
154 if (!true)
155 {
156 }
157 return true;
158 }
159
160 // Token: 0x06000128 RID: 296 RVA: 0x000064C8 File Offset: 0x000046C8
162 {
164 bool flag = enumerator.MoveNext();
165 X509Certificate x509Certificate = enumerator.Current;
166 bool flag2 = this.IsParent(child, x509Certificate);
167 long num = 0L;
168 if (enumerator != null)
169 {
170 }
171 if (num == 0L)
172 {
173 }
174 throw new OutOfMemoryException();
175 }
176
177 // Token: 0x06000129 RID: 297 RVA: 0x0000651C File Offset: 0x0000471C
179 {
180 if (potentialRoot != null)
181 {
182 int num = this.TrustAnchors.IndexOf(potentialRoot);
184 bool flag = enumerator.MoveNext();
185 X509Certificate x509Certificate = enumerator.Current;
186 bool flag2 = this.IsParent(potentialRoot, x509Certificate);
187 long num2 = 0L;
188 int num3 = 7;
189 if (enumerator != null)
190 {
191 }
192 if (num2 == 0L && num3 == 0)
193 {
194 bool isSelfSigned = potentialRoot.IsSelfSigned;
195 int num4 = 32;
197 throw new OutOfMemoryException();
198 }
199 }
200 else
201 {
202 int num5 = 1;
204 }
205 throw new OutOfMemoryException();
206 }
207
208 // Token: 0x0600012A RID: 298 RVA: 0x000065B0 File Offset: 0x000047B0
210 {
211 /*
212An exception occurred when decompiling this method (0600012A)
213
214ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Mono.Security.X509.X509Chain::IsTrusted(Mono.Security.X509.X509Certificate)
215
216 ---> System.Exception: Basic block has to end with unconditional control flow.
217{
218 Block_0:
219 stloc:int32(var_0_0C, call:int32(X509CertificateCollection::IndexOf, callgetter:X509CertificateCollection(X509Chain::get_TrustAnchors, ldloc:X509Chain(this)), ldloc:X509Certificate(potentialTrusted)))
220}
221
222 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
223 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
224 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
225 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
226 --- End of inner exception stack trace ---
227 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
228 at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1683
229*/;
230 }
231
232 // Token: 0x0600012B RID: 299 RVA: 0x000065CC File Offset: 0x000047CC
233 private bool IsParent(X509Certificate child, X509Certificate parent)
234 {
235 int version = parent.version;
236 int num = this.TrustAnchors.IndexOf(parent);
237 if (parent.extensions["2.5.29.19"] != null)
238 {
239 }
240 this._status = X509ChainStatusFlags.InvalidBasicConstraints;
241 return true;
242 }
243
244 // Token: 0x0400008E RID: 142
246
247 // Token: 0x0400008F RID: 143
249
250 // Token: 0x04000090 RID: 144
252
253 // Token: 0x04000091 RID: 145
255
256 // Token: 0x04000092 RID: 146
258 }
259}
class f__AnonymousType0<< Count > j__TPar
new X509CertificateCollection.X509CertificateEnumerator GetEnumerator()
X509ExtensionCollection extensions
bool Build(X509Certificate leaf)
Definition X509Chain.cs:96
X509CertificateCollection TrustAnchors
Definition X509Chain.cs:52
void LoadCertificate(X509Certificate x509)
Definition X509Chain.cs:68
X509CertificateCollection roots
Definition X509Chain.cs:245
void LoadCertificates(X509CertificateCollection collection)
Definition X509Chain.cs:74
X509Chain(X509CertificateCollection chain)
Definition X509Chain.cs:14
bool IsParent(X509Certificate child, X509Certificate parent)
Definition X509Chain.cs:233
X509CertificateCollection Chain
Definition X509Chain.cs:21
X509Certificate FindByIssuerName(string issuerName)
Definition X509Chain.cs:80
X509ChainStatusFlags _status
Definition X509Chain.cs:257
bool IsTrusted(X509Certificate potentialTrusted)
Definition X509Chain.cs:209
bool IsValid(X509Certificate cert)
Definition X509Chain.cs:148
X509CertificateCollection _chain
Definition X509Chain.cs:254
X509Certificate FindCertificateRoot(X509Certificate potentialRoot)
Definition X509Chain.cs:178
X509Certificate FindCertificateParent(X509Certificate child)
Definition X509Chain.cs:161
X509CertificateCollection certs
Definition X509Chain.cs:248
static X509CertificateCollection TrustedRootCertificates