asn1.codec

Abstract Syntax Notation 1 is a high-level syntax specification created by the https://www.itu.int/en/pages/default.aspx, International Telecommunications Union in https://www.itu.int/rec/T-REC-X.680/en, X.680 - Abstract Syntax Notation One (ASN.1), that abstractly defines data structures and protocol data units used by programs and protocols. It defines an extensible system of data types, modules, and data structures.

While described abstractly by ASN.1, the specified protocol data units and data structures can be encoded via various encoding schemes, such as the Basic Encoding Rules (BER), which are defined in the https://www.itu.int/en/pages/default.aspx, International Telecommunications Union's http://www.itu.int/rec/T-REC-X.690/en, X.690 - ASN.1 encoding rules. These encoding schemes uniformly relay data between systems that can differ in endianness, bit-width, byte-size, operating system, machine architecture, and so on.

The encoding schemata that inherit from ASN.1 are used widely in protocols such as TLS, LDAP, SNMP, RDP, and many more.

This file contains all ASN.1 exceptions and the the ASN1Element class, which is the abstract class from which all codecs in asn1/codecs/ will inherit.

Public Imports

asn1.constants
public import asn1.constants;
asn1.types.alltypes
public import asn1.types.alltypes;
asn1.types.identification
public import asn1.types.identification;
asn1.types.oidtype
public import asn1.types.oidtype;
std.algorithm.mutation
public import std.algorithm.mutation : reverse;
std.algorithm.searching
public import std.algorithm.searching : canFind;
std.array
public import std.array : appender, Appender, replace, split;
std.ascii
public import std.ascii : isASCII, isGraphical;
std.bigint
public import std.bigint : BigInt;
std.conv
public import std.conv : text, to;
std.datetime.date
public import std.datetime.date : DateTime;
std.datetime.systime
public import std.datetime.systime : SysTime;
std.datetime.timezone
public import std.datetime.timezone : TimeZone, UTC;
std.math
public import std.math : isIdentical, isNaN, log2;
std.string
public import std.string : indexOf;
std.traits
public import std.traits : isFloatingPoint, isIntegral, isSigned, isUnsigned;

Members

Aliases

ASN1CodecException
alias ASN1CodecException = AbstractSyntaxNotation1CodecException
ASN1ConstructionException
alias ASN1ConstructionException = AbstractSyntaxNotation1ConstructionException
ASN1Element
alias ASN1Element = AbstractSyntaxNotation1Element
ASN1LengthException
alias ASN1LengthException = AbstractSyntaxNotation1LengthException
ASN1LengthOverflowException
alias ASN1LengthOverflowException = AbstractSyntaxNotation1LengthOverflowException
ASN1LengthUndefinedException
alias ASN1LengthUndefinedException = AbstractSyntaxNotation1LengthUndefinedException
ASN1RecursionException
alias ASN1RecursionException = AbstractSyntaxNotation1RecursionException
ASN1TagClassException
alias ASN1TagClassException = AbstractSyntaxNotation1TagClassException
ASN1TagException
alias ASN1TagException = AbstractSyntaxNotation1TagException
ASN1TagNumberException
alias ASN1TagNumberException = AbstractSyntaxNotation1TagNumberException
ASN1TagOverflowException
alias ASN1TagOverflowException = AbstractSyntaxNotation1TagOverflowException
ASN1TagPaddingException
alias ASN1TagPaddingException = AbstractSyntaxNotation1TagPaddingException
ASN1TruncationException
alias ASN1TruncationException = AbstractSyntaxNotation1TruncationException
ASN1TypeException
alias ASN1TypeException = AbstractSyntaxNotation1TagNumberException
ASN1ValueCharactersException
alias ASN1ValueCharactersException = AbstractSyntaxNotation1ValueCharactersException
ASN1ValueException
alias ASN1ValueException = AbstractSyntaxNotation1ValueException
ASN1ValueOverflowException
alias ASN1ValueOverflowException = AbstractSyntaxNotation1ValueOverflowException
ASN1ValuePaddingException
alias ASN1ValuePaddingException = AbstractSyntaxNotation1ValuePaddingException
ASN1ValueSizeException
alias ASN1ValueSizeException = AbstractSyntaxNotation1ValueSizeException
ASN1ValueUndefinedException
alias ASN1ValueUndefinedException = AbstractSyntaxNotation1ValueUndefinedException

Classes

AbstractSyntaxNotation1CodecException
class AbstractSyntaxNotation1CodecException

A generic exception from which any ASN.1 codec exception may inherit

AbstractSyntaxNotation1ConstructionException
class AbstractSyntaxNotation1ConstructionException

An exception thrown when the construction is not what is expected

AbstractSyntaxNotation1Element
class AbstractSyntaxNotation1Element(Element)

The generic element from which all other elements will inherit

AbstractSyntaxNotation1LengthException
class AbstractSyntaxNotation1LengthException

A generic length-related exception

AbstractSyntaxNotation1LengthOverflowException
class AbstractSyntaxNotation1LengthOverflowException

An exception that is thrown when the length cannot fit inside of a size_t

AbstractSyntaxNotation1LengthUndefinedException
class AbstractSyntaxNotation1LengthUndefinedException

An exception thrown when a length encoding that is undefined or reserved by the specification is encountered

AbstractSyntaxNotation1RecursionException
class AbstractSyntaxNotation1RecursionException

An exception that is thrown when excessively deep recursion occurs.

AbstractSyntaxNotation1TagClassException
class AbstractSyntaxNotation1TagClassException

An exception thrown when the tag class is not what is expected

AbstractSyntaxNotation1TagException
class AbstractSyntaxNotation1TagException

A generic tag-related exception

AbstractSyntaxNotation1TagNumberException
class AbstractSyntaxNotation1TagNumberException

An exception thrown when the tag number or type is not what is expected

AbstractSyntaxNotation1TagOverflowException
class AbstractSyntaxNotation1TagOverflowException

An exception thrown when the decoded tag number cannot fit into a size_t

AbstractSyntaxNotation1TagPaddingException
class AbstractSyntaxNotation1TagPaddingException

An exception thrown when the decoded tag number contains "leading zero bytes" (0x80)

AbstractSyntaxNotation1TruncationException
class AbstractSyntaxNotation1TruncationException

An exception that is thrown when the encoded data is truncated. Note that this exception is not necessarily indicative of malicious activity. If encoded ASN.1 data is being transferred over a network to a host that is decoding it, attempting to decode the data before the entirety of the data is transferred could result in this exception.

AbstractSyntaxNotation1ValueCharactersException
class AbstractSyntaxNotation1ValueCharactersException

An exception thrown when a chatacter-string type contains invalid characters

AbstractSyntaxNotation1ValueException
class AbstractSyntaxNotation1ValueException

A generic exception thrown when something is wrong with a value

AbstractSyntaxNotation1ValueOverflowException
class AbstractSyntaxNotation1ValueOverflowException

An exception that is thrown when a value or part of a value does not fit into a native type

AbstractSyntaxNotation1ValuePaddingException
class AbstractSyntaxNotation1ValuePaddingException

An exception thrown when a value contains invalid leading or trailing zeroes or whitespace

AbstractSyntaxNotation1ValueSizeException
class AbstractSyntaxNotation1ValueSizeException

An exception thrown when a value is too small or too large (in terms of bytes) to decode

AbstractSyntaxNotation1ValueUndefinedException
class AbstractSyntaxNotation1ValueUndefinedException

An exception that is thrown when a value is encoded in a way that is undefined or reserved by the specification

See Also

Meta

Authors

  • $(PERSON Jonathan M. Wilbur, jonathan@wilbur.space, http://jonathan.wilbur.space)