Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
AcmeDirectory.cs
1using System;
2using System.Collections.Generic;
3using System.Text;
4
6{
11 {
12 private readonly string[] caaIdentities = null;
13 private readonly Uri keyChange = null;
14 private readonly Uri termsOfService = null;
15 private readonly Uri website = null;
16 private readonly Uri newAccount = null;
17 private readonly Uri newNonce = null;
18 private readonly Uri newOrder = null;
19 private readonly Uri revokeCert = null;
20 private readonly Uri newAuthz = null;
21 private readonly bool externalAccountRequired = false;
22
23 internal AcmeDirectory(AcmeClient Client, IEnumerable<KeyValuePair<string, object>> Obj)
24 : base(Client)
25 {
26 foreach (KeyValuePair<string, object> P in Obj)
27 {
28 switch (P.Key)
29 {
30 case "keyChange":
31 this.keyChange = new Uri(P.Value as string);
32 break;
33
34 case "meta":
35 if (P.Value is IEnumerable<KeyValuePair<string, object>> Obj2)
36 {
37 foreach (KeyValuePair<string, object> P2 in Obj2)
38 {
39 switch (P2.Key)
40 {
41 case "caaIdentities":
42 if (P2.Value is Array A)
43 {
44 List<string> CaaIdentities = new List<string>();
45
46 foreach (object Obj3 in A)
47 {
48 if (Obj3 is string s)
49 CaaIdentities.Add(s);
50 }
51
52 this.caaIdentities = CaaIdentities.ToArray();
53 }
54 break;
55
56 case "termsOfService":
57 this.termsOfService = new Uri(P2.Value as string);
58 break;
59
60 case "website":
61 this.website = new Uri(P2.Value as string);
62 break;
63
64 case "externalAccountRequired":
65 if (P2.Value is bool b)
66 this.externalAccountRequired = b;
67 break;
68 }
69 }
70 }
71 break;
72
73 case "newAccount":
74 this.newAccount = new Uri(P.Value as string);
75 break;
76
77 case "newNonce":
78 this.newNonce = new Uri(P.Value as string);
79 break;
80
81 case "newOrder":
82 this.newOrder = new Uri(P.Value as string);
83 break;
84
85 case "revokeCert":
86 this.revokeCert = new Uri(P.Value as string);
87 break;
88
89 case "newAuthz":
90 this.newAuthz = new Uri(P.Value as string);
91 break;
92 }
93 }
94 }
95
99 public string[] CaaIdentities => this.caaIdentities;
100
104 public Uri KeyChange => this.keyChange;
105
109 public Uri TermsOfService => this.termsOfService;
110
114 public Uri Website => this.website;
115
119 public Uri NewAccount => this.newAccount;
120
124 public Uri NewNonce => this.newNonce;
125
129 public Uri NewOrder => this.newOrder;
130
134 public Uri RevokeCert => this.revokeCert;
135
139 public Uri NewAuthz => this.newAuthz;
140
144 public bool ExternalAccountRequired => this.externalAccountRequired;
145 }
146}
Implements an ACME client for the generation of certificates using ACME-compliant certificate servers...
Definition: AcmeClient.cs:24
Represents an ACME directory.
Uri KeyChange
URL for keyChange method.
Uri NewAccount
URL for newAccount method.
Uri NewNonce
URL for newNonce method.
Uri NewOrder
URL for newOrder method.
Uri TermsOfService
URL to terms of service.
Uri RevokeCert
URL for revokeCert method.
Uri NewAuthz
URL for newAuthz method.
string[] CaaIdentities
CAA Identities.
bool ExternalAccountRequired
If an external account is required.
Abstract base class for all ACME objects.
Definition: AcmeObject.cs:11
AcmeClient Client
ACME client.
Definition: AcmeObject.cs:26