VirtualBox

source: vbox/trunk/include/iprt/formats/asn1.h@ 62409

Last change on this file since 62409 was 56291, checked in by vboxsync, 10 years ago

include: Updated (C) year.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.5 KB
Line 
1/** @file
2 * IPRT - Abstract Syntax Notation One (ASN.1) Definitions.
3 */
4
5/*
6 * Copyright (C) 2014-2015 Oracle Corporation
7 *
8 * This file is part of VirtualBox Open Source Edition (OSE), as
9 * available from http://www.virtualbox.org. This file is free software;
10 * you can redistribute it and/or modify it under the terms of the GNU
11 * General Public License (GPL) as published by the Free Software
12 * Foundation, in version 2 as it comes in the "COPYING" file of the
13 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
14 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
15 *
16 * The contents of this file may alternatively be used under the terms
17 * of the Common Development and Distribution License Version 1.0
18 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
19 * VirtualBox OSE distribution, in which case the provisions of the
20 * CDDL are applicable instead of those of the GPL.
21 *
22 * You may elect to license modified versions of this file under the
23 * terms and conditions of either the GPL or the CDDL or both.
24 */
25
26#ifndef ___iprt_formats_asn1_h
27#define ___iprt_formats_asn1_h
28
29#include <iprt/cdefs.h>
30
31
32/** @defgroup grp_rt_formats_asn1 ASN.1 definitions
33 * @ingroup grp_rt_formats
34 *
35 * @{ */
36
37/** @name Tag classes.
38 * @{ */
39#define ASN1_TAGCLASS_UNIVERSAL UINT8_C(0x00)
40#define ASN1_TAGCLASS_APPLICATION UINT8_C(0x40)
41#define ASN1_TAGCLASS_CONTEXT UINT8_C(0x80)
42#define ASN1_TAGCLASS_PRIVATE UINT8_C(0xc0)
43#define ASN1_TAGCLASS_MASK UINT8_C(0xc0)
44/** @} */
45
46/** Primitive encoding. */
47#define ASN1_TAGFLAG_PRIMITIVE UINT8_C(0x00)
48/** Constructed encoding, as opposed to primitive. */
49#define ASN1_TAGFLAG_CONSTRUCTED UINT8_C(0x20)
50
51/** The tag value mask. */
52#define ASN1_TAG_MASK UINT8_C(0x1f)
53
54/** @name ASN.1 universal tags.
55 * @{ */
56#define ASN1_TAG_EOC UINT8_C(0x00)
57#define ASN1_TAG_BOOLEAN UINT8_C(0x01)
58#define ASN1_TAG_INTEGER UINT8_C(0x02)
59#define ASN1_TAG_BIT_STRING UINT8_C(0x03)
60#define ASN1_TAG_OCTET_STRING UINT8_C(0x04)
61#define ASN1_TAG_NULL UINT8_C(0x05)
62#define ASN1_TAG_OID UINT8_C(0x06)
63#define ASN1_TAG_OBJECT_DESCRIPTOR UINT8_C(0x07)
64#define ASN1_TAG_EXTERNAL UINT8_C(0x08)
65#define ASN1_TAG_REAL UINT8_C(0x09)
66#define ASN1_TAG_ENUMERATED UINT8_C(0x0a)
67#define ASN1_TAG_EMBEDDED_PDV UINT8_C(0x0b)
68#define ASN1_TAG_UTF8_STRING UINT8_C(0x0c)
69#define ASN1_TAG_RELATIVE_OID UINT8_C(0x0d)
70#define ASN1_TAG_RESERVED_14 UINT8_C(0x0e)
71#define ASN1_TAG_RESERVED_15 UINT8_C(0x0f)
72#define ASN1_TAG_SEQUENCE UINT8_C(0x10)
73#define ASN1_TAG_SET UINT8_C(0x11)
74#define ASN1_TAG_NUMERIC_STRING UINT8_C(0x12)
75#define ASN1_TAG_PRINTABLE_STRING UINT8_C(0x13)
76#define ASN1_TAG_T61_STRING UINT8_C(0x14)
77#define ASN1_TAG_VIDEOTEX_STRING UINT8_C(0x15)
78#define ASN1_TAG_IA5_STRING UINT8_C(0x16)
79#define ASN1_TAG_UTC_TIME UINT8_C(0x17) /**< Century seems to be 1900 if YY < 50, otherwise 2000. Baka ASN.1! */
80#define ASN1_TAG_GENERALIZED_TIME UINT8_C(0x18)
81#define ASN1_TAG_GRAPHIC_STRING UINT8_C(0x19)
82#define ASN1_TAG_VISIBLE_STRING UINT8_C(0x1a)
83#define ASN1_TAG_GENERAL_STRING UINT8_C(0x1b)
84#define ASN1_TAG_UNIVERSAL_STRING UINT8_C(0x1c)
85#define ASN1_TAG_CHARACTER_STRING UINT8_C(0x1d)
86#define ASN1_TAG_BMP_STRING UINT8_C(0x1e)
87#define ASN1_TAG_USE_LONG_FORM UINT8_C(0x1f)
88/** @} */
89
90
91/** @} */
92
93#endif
94
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette