Marmos
v juptune
v asn1
v lang
v ast
v Classes
v Enums
v ir
v parser
v Enums
v Structs
v core
v crypto
v keyexchange
v memory
v data
v alphabet
v buffer
v json
v builder
v parser
v Enums
v Structs
v serialise
v Structs
v Templates
v pem
v Enums
v Structs

Classes X509Extension

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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
module juptune.data.x509.asn1convert;

abstract abstract class X509Extension
{
    /++ STRUCTS ++/
    
    /// The Authority Key Identifier extension from (RFC 5280 4.2.1.1). 
    static struct AuthorityKeyIdentifier
    {
        /++ VARIABLES ++/
        
        ///
        Nullable!(GeneralNames) authorityCertIssuer;
        ///
        Nullable!(Asn1Integer) authorityCertSerialNumber;
        ///
        const ubyte[] keyIdentifier;
    }
    /// The Basic Constraints extension from (RFC 5280 4.2.1.9). 
    static struct BasicConstraints
    {
        /++ VARIABLES ++/
        
        ///
        bool ca;
        ///
        Nullable!(ulong) pathLenConstraint;
    }
    /// The CRL Distribution Points extension from (RFC 5280 4.2.1.13). 
    static struct CrlDistributionPoints
    {
        /++ VARIABLES ++/
        
        ///
        CRLDistributionPoints points;
    }
    /// The Extended Key Usage extension from (RFC 5280 4.2.1.12). 
    static struct ExtendedKeyUsage
    {
        /++ FUNCTIONS ++/
        
        ///
        bool clientAuth();
        ///
        bool codeSigning();
        ///
        bool emailProtection();
        ///
        bool ocspSigning();
        ///
        bool serverAuth();
        ///
        bool timeStamping();
        
        /++ ENUMS ++/
        
        ///
        enum Flag : int
        {
            ///
            serverAuth = 1, 
            ///
            clientAuth = 2, 
            ///
            codeSigning = 4, 
            ///
            emailProtection = 8, 
            ///
            timeStamping = 16, 
            ///
            ocspSigning = 32
        }
        
    }
    /// The Freshest CRL extension from (RFC 5280 4.2.1.15). 
    static struct FreshestCrl
    {
        /++ VARIABLES ++/
        
        ///
        CRLDistributionPoints points;
    }
    /// The Inhibit anyPolicy extension from (RFC 5280 4.2.1.14). 
    static struct InhibitAnyPolicy
    {
        /++ VARIABLES ++/
        
        ///
        ulong skipCerts;
    }
    /// The Issuer Alt Name extension from (RFC 5280 4.2.1.7). 
    static struct IssuerAltName
    {
        /++ VARIABLES ++/
        
        ///
        GeneralNames names;
    }
    /// The Key Usage extension from (RFC 5280 4.2.1.3). 
    static struct KeyUsage
    {
        /++ FUNCTIONS ++/
        
        ///
        bool cRLSign();
        ///
        bool contentCommitment();
        ///
        bool dataEncipherment();
        ///
        bool decipherOnly();
        ///
        bool digitalSignature();
        ///
        bool encipherOnly();
        ///
        bool keyAgreement();
        ///
        bool keyCertSign();
        ///
        bool keyEncipherment();
        
    }
    /// The Name Constraints extension from (RFC 5280 4.2.1.10). 
    static struct NameConstraints
    {
        /++ VARIABLES ++/
        
        ///
        Nullable!(GeneralSubtrees) excludedSubtrees;
        ///
        Nullable!(GeneralSubtrees) permittedSubtrees;
    }
    /// The Policy Constraints extension from (RFC 5280 4.2.1.11). 
    static struct PolicyConstraints
    {
        /++ VARIABLES ++/
        
        ///
        Nullable!(ulong) inhibitPolicyMapping;
        ///
        Nullable!(ulong) requireExplicitPolicy;
    }
    /// The Subject Alt Name extension from (RFC 5280 4.2.1.6). 
    static struct SubjectAltName
    {
        /++ VARIABLES ++/
        
        ///
        GeneralNames names;
    }
    /// The Subject Key Identifier extension from (RFC 5280 4.2.1.2). 
    static struct SubjectKeyIdentifier
    {
        /++ VARIABLES ++/
        
        ///
        const ubyte[] keyIdentifier;
    }
    /// An unknown extension was encoutered - user code may be able to recognise it though. 
    static struct Unknown
    {
        /++ VARIABLES ++/
        
        ///
        Extension extension;
    }
    
    /++ ALIASES ++/
    
    /// The Authority Information Access extension from (RFC 5280 4.2.2.1). 
    alias AuthorityInfoAccessSyntax = AuthorityInfoAccessSyntax;
    /// The Certificate Policies extension from (RFC 5280 4.2.1.4). 
    alias CertificatePolicies = CertificatePolicies;
    /// The Policy Mappings extension from (RFC 5280 4.2.1.5). 
    alias PolicyMappings = PolicyMappings;
    /// The Subject Directory Attributes extension from (RFC 5280 4.2.1.8). 
    alias SubjectDirectoryAttributes = SubjectDirectoryAttributes;
    /// The Subject Information Access extension from (RFC 5280 4.2.2.2). 
    alias SubjectInfoAccessSyntax = SubjectInfoAccessSyntax;
    /// A SumType of all recognised extensions. 
    alias SumT = SumType!(X509Extension.Unknown, X509Extension.AuthorityKeyIdentifier, X509Extension.SubjectKeyIdentifier, X509Extension.KeyUsage, PolicyMappings, X509Extension.SubjectAltName, X509Extension.IssuerAltName, SubjectDirectoryAttributes, X509Extension.BasicConstraints, X509Extension.NameConstraints, X509Extension.PolicyConstraints, X509Extension.ExtendedKeyUsage, X509Extension.CrlDistributionPoints, X509Extension.InhibitAnyPolicy, X509Extension.FreshestCrl, AuthorityInfoAccessSyntax, SubjectInfoAccessSyntax, CertificatePolicies);
    
}

Documentation

Namespace class used to store all recognised extensions.

Aliases

Name Description
AuthorityInfoAccessSyntax

The Authority Information Access extension from (RFC 5280 4.2.2.1).

CertificatePolicies

The Certificate Policies extension from (RFC 5280 4.2.1.4).

PolicyMappings

The Policy Mappings extension from (RFC 5280 4.2.1.5).

SubjectDirectoryAttributes

The Subject Directory Attributes extension from (RFC 5280 4.2.1.8).

SubjectInfoAccessSyntax

The Subject Information Access extension from (RFC 5280 4.2.2.2).

SumT

A SumType of all recognised extensions.

Structs

Name Description
AuthorityKeyIdentifier

The Authority Key Identifier extension from (RFC 5280 4.2.1.1).

BasicConstraints

The Basic Constraints extension from (RFC 5280 4.2.1.9).

CrlDistributionPoints

The CRL Distribution Points extension from (RFC 5280 4.2.1.13).

ExtendedKeyUsage

The Extended Key Usage extension from (RFC 5280 4.2.1.12).

FreshestCrl

The Freshest CRL extension from (RFC 5280 4.2.1.15).

InhibitAnyPolicy

The Inhibit anyPolicy extension from (RFC 5280 4.2.1.14).

IssuerAltName

The Issuer Alt Name extension from (RFC 5280 4.2.1.7).

KeyUsage

The Key Usage extension from (RFC 5280 4.2.1.3).

NameConstraints

The Name Constraints extension from (RFC 5280 4.2.1.10).

PolicyConstraints

The Policy Constraints extension from (RFC 5280 4.2.1.11).

SubjectAltName

The Subject Alt Name extension from (RFC 5280 4.2.1.6).

SubjectKeyIdentifier

The Subject Key Identifier extension from (RFC 5280 4.2.1.2).

Unknown

An unknown extension was encoutered - user code may be able to recognise it though.