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

Functions x509HandleExtension

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

Documentation

Attempts to identify the given extension; flatten it into an easier to work with type, and perform some light validation.

Notes

(Phobos' SumType really sucks so please be aware that X509Extension.SumTis a highly unstable part of the API).

A lot of extensions have additional validation requirements that can't be performed by this function due to a lack of context. This function can only perform validation where the extension is viewed in isolation from any other extension.

Params

Throws

X509Error.keyUsageTooManyBitsif a Key Usage extension has more bits than expected.

X509Error.keyUsageNoSetBitif a Key Usage extension has no set bits.

X509Error.extendedKeyUsageUnknownUsageif an Extended Key Usage extension specifies an unknown usage.

Various errors from Asn1DecodeError- mainly around trying to convert Asn1Integer into a native ulong.

Returns

An errorful Resultif something went wrong.