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

Structs X509Certificate

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
module juptune.data.x509.asn1convert;

struct X509Certificate
{
    /++ STRUCTS ++/
    
    /// NOTE: This should always be a UTC time. 
    static struct Time
    {
        /++ FUNCTIONS ++/
        
        ///
        bool isAfter(X509Certificate.Time other);
        ///
        bool isBefore(X509Certificate.Time other);
        ///
        void toString(SinkT)(SinkT sink);
        
        /++ VARIABLES ++/
        
        ///
        ubyte day;
        ///
        ubyte hour;
        ///
        ubyte minute;
        ///
        ubyte month;
        ///
        ubyte second;
        ///
        ushort year;
    }
    
    /++ FUNCTIONS ++/
    
    ///
    X509Certificate opAssign(X509Certificate p);
    
    /++ ENUMS ++/
    
    ///
    enum NameComponentKind : int
    {
        ///
        FAILSAFE = 0, 
        ///
        countryName = 1, 
        ///
        organizationName = 2, 
        ///
        organizationalUnitName = 3, 
        ///
        dnQualifier = 4, 
        ///
        stateOrProvinceName = 5, 
        ///
        commonName = 6, 
        ///
        serialNumber = 7, 
        ///
        localityName = 8, 
        ///
        title = 9, 
        ///
        surname = 10, 
        ///
        givenName = 11, 
        ///
        initials = 12, 
        ///
        pseudonym = 13, 
        ///
        generationQualifier = 14, 
        ///
        domainComponent = 15, 
        ///
        unknown = 16
    }
    ///
    enum Version : int
    {
        ///
        FAILSAFE = 0, 
        ///
        v1 = 1, 
        ///
        v2 = 2, 
        ///
        v3 = 3
    }
    
    /++ VARIABLES ++/
    
    ///
    Nullable!(Extensions) extensions;
    ///
    Name issuer;
    ///
    Nullable!(Asn1BitString) issuerUniqueId;
    ///
    X509Certificate.Time notValidAfter;
    ///
    X509Certificate.Time notValidBefore;
    ///
    Asn1Integer serialNumber;
    ///
    SumType!(X509SignatureAlgorithm.Unknown, X509SignatureAlgorithm.Md2WithRsaEncryption, X509SignatureAlgorithm.Md5WithRsaEncryption, X509SignatureAlgorithm.Sha1WithRsaEncryption, X509SignatureAlgorithm.DsaWithSha1, X509SignatureAlgorithm.EcdsaWithSha1, X509SignatureAlgorithm.DsaWithSha244, X509SignatureAlgorithm.DsaWithSha256, X509SignatureAlgorithm.Sha244WithRsaEncryption, X509SignatureAlgorithm.Sha256WithRsaEncryption, X509SignatureAlgorithm.Sha384WithRsaEncryption, X509SignatureAlgorithm.Sha512WithRsaEncryption, X509SignatureAlgorithm.EcdsaWith244, X509SignatureAlgorithm.EcdsaWith256, X509SignatureAlgorithm.EcdsaWith384, X509SignatureAlgorithm.EcdsaWith512) signatureAlgorithm;
    ///
    Asn1BitString signatureValue;
    ///
    Name subject;
    ///
    Asn1BitString subjectPublicKey;
    ///
    SumType!(X509PublicKeyAlgorithm.Unknown, X509PublicKeyAlgorithm.RsaEncryption, X509PublicKeyAlgorithm.DsaEncryption, X509PublicKeyAlgorithm.DhPublicNumber, X509PublicKeyAlgorithm.KeyExchangeAlgorithm, X509PublicKeyAlgorithm.EcPublicKey, X509PublicKeyAlgorithm.RsaSsaPss, X509PublicKeyAlgorithm.RsaEsOaep) subjectPublicKeyAlgorithm;
    ///
    Nullable!(Asn1BitString) subjectUniqueId;
    ///
    const ubyte[] tbsCertificateRawDerEncoding;
    ///
    X509Certificate.Version version_;
}

Documentation

Represents an x.509 certificate, with as much of the ASN.1 jank cut out as possible without the need for allocation.

It's advised to read through RFC 5280 to learn what each field is, as there's no point in me copy-pasting the spec into comments.

Enums

Name Description
NameComponentKind
Version

Functions

Name Description
opAssign

Structs

Name Description
Time

NOTE: This should always be a UTC time.

Variables

Name Description
extensions
issuer
issuerUniqueId
notValidAfter
notValidBefore
serialNumber
signatureAlgorithm
signatureValue
subject
subjectPublicKey
subjectPublicKeyAlgorithm
subjectUniqueId
tbsCertificateRawDerEncoding
version_