13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync/** @file
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync * IPRT - Abstract Syntax Notation One (ASN.1) Definitions.
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync */
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync/*
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync * Copyright (C) 2014 Oracle Corporation
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync *
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync * available from http://www.virtualbox.org. This file is free software;
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync * you can redistribute it and/or modify it under the terms of the GNU
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync * General Public License (GPL) as published by the Free Software
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync *
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync * The contents of this file may alternatively be used under the terms
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync * of the Common Development and Distribution License Version 1.0
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync * VirtualBox OSE distribution, in which case the provisions of the
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync * CDDL are applicable instead of those of the GPL.
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync *
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync * You may elect to license modified versions of this file under the
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync * terms and conditions of either the GPL or the CDDL or both.
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync */
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync#ifndef ___iprt_formats_asn1_h
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync#define ___iprt_formats_asn1_h
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync#include <iprt/cdefs.h>
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync/** @defgroup grp_rt_formats_asn1 ASN.1 definitions
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync * @ingroup grp_rt_formats
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync *
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync * @{ */
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync/** @name Tag classes.
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync * @{ */
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync#define ASN1_TAGCLASS_UNIVERSAL UINT8_C(0x00)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync#define ASN1_TAGCLASS_APPLICATION UINT8_C(0x40)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync#define ASN1_TAGCLASS_CONTEXT UINT8_C(0x80)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync#define ASN1_TAGCLASS_PRIVATE UINT8_C(0xc0)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync#define ASN1_TAGCLASS_MASK UINT8_C(0xc0)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync/** @} */
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync/** Primitive encoding. */
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync#define ASN1_TAGFLAG_PRIMITIVE UINT8_C(0x00)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync/** Constructed encoding, as opposed to primitive. */
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync#define ASN1_TAGFLAG_CONSTRUCTED UINT8_C(0x20)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync/** The tag value mask. */
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync#define ASN1_TAG_MASK UINT8_C(0x1f)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync/** @name ASN.1 universal tags.
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync * @{ */
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync#define ASN1_TAG_EOC UINT8_C(0x00)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync#define ASN1_TAG_BOOLEAN UINT8_C(0x01)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync#define ASN1_TAG_INTEGER UINT8_C(0x02)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync#define ASN1_TAG_BIT_STRING UINT8_C(0x03)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync#define ASN1_TAG_OCTET_STRING UINT8_C(0x04)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync#define ASN1_TAG_NULL UINT8_C(0x05)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync#define ASN1_TAG_OID UINT8_C(0x06)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync#define ASN1_TAG_OBJECT_DESCRIPTOR UINT8_C(0x07)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync#define ASN1_TAG_EXTERNAL UINT8_C(0x08)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync#define ASN1_TAG_REAL UINT8_C(0x09)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync#define ASN1_TAG_ENUMERATED UINT8_C(0x0a)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync#define ASN1_TAG_EMBEDDED_PDV UINT8_C(0x0b)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync#define ASN1_TAG_UTF8_STRING UINT8_C(0x0c)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync#define ASN1_TAG_RELATIVE_OID UINT8_C(0x0d)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync#define ASN1_TAG_RESERVED_14 UINT8_C(0x0e)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync#define ASN1_TAG_RESERVED_15 UINT8_C(0x0f)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync#define ASN1_TAG_SEQUENCE UINT8_C(0x10)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync#define ASN1_TAG_SET UINT8_C(0x11)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync#define ASN1_TAG_NUMERIC_STRING UINT8_C(0x12)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync#define ASN1_TAG_PRINTABLE_STRING UINT8_C(0x13)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync#define ASN1_TAG_T61_STRING UINT8_C(0x14)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync#define ASN1_TAG_VIDEOTEX_STRING UINT8_C(0x15)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync#define ASN1_TAG_IA5_STRING UINT8_C(0x16)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync#define ASN1_TAG_UTC_TIME UINT8_C(0x17) /**< Century seems to be 1900 if YY < 50, otherwise 2000. Baka ASN.1! */
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync#define ASN1_TAG_GENERALIZED_TIME UINT8_C(0x18)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync#define ASN1_TAG_GRAPHIC_STRING UINT8_C(0x19)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync#define ASN1_TAG_VISIBLE_STRING UINT8_C(0x1a)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync#define ASN1_TAG_GENERAL_STRING UINT8_C(0x1b)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync#define ASN1_TAG_UNIVERSAL_STRING UINT8_C(0x1c)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync#define ASN1_TAG_CHARACTER_STRING UINT8_C(0x1d)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync#define ASN1_TAG_BMP_STRING UINT8_C(0x1e)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync#define ASN1_TAG_USE_LONG_FORM UINT8_C(0x1f)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync/** @} */
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync/** @} */
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync#endif
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync