VirtualBox

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

Last change on this file since 93488 was 93115, checked in by vboxsync, 3 years ago

scm --update-copyright-year

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.6 KB
Line 
1/** @file
2 * IPRT - Abstract Syntax Notation One (ASN.1) Definitions.
3 */
4
5/*
6 * Copyright (C) 2014-2022 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_INCLUDED_formats_asn1_h
27#define IPRT_INCLUDED_formats_asn1_h
28#ifndef RT_WITHOUT_PRAGMA_ONCE
29# pragma once
30#endif
31
32#include <iprt/cdefs.h>
33
34
35/** @defgroup grp_rt_formats_asn1 ASN.1 definitions
36 * @ingroup grp_rt_formats
37 *
38 * @{ */
39
40/** @name Tag classes.
41 * @{ */
42#define ASN1_TAGCLASS_UNIVERSAL UINT8_C(0x00)
43#define ASN1_TAGCLASS_APPLICATION UINT8_C(0x40)
44#define ASN1_TAGCLASS_CONTEXT UINT8_C(0x80)
45#define ASN1_TAGCLASS_PRIVATE UINT8_C(0xc0)
46#define ASN1_TAGCLASS_MASK UINT8_C(0xc0)
47/** @} */
48
49/** Primitive encoding. */
50#define ASN1_TAGFLAG_PRIMITIVE UINT8_C(0x00)
51/** Constructed encoding, as opposed to primitive. */
52#define ASN1_TAGFLAG_CONSTRUCTED UINT8_C(0x20)
53
54/** The tag value mask. */
55#define ASN1_TAG_MASK UINT8_C(0x1f)
56
57/** @name ASN.1 universal tags.
58 * @{ */
59#define ASN1_TAG_EOC UINT8_C(0x00)
60#define ASN1_TAG_BOOLEAN UINT8_C(0x01)
61#define ASN1_TAG_INTEGER UINT8_C(0x02)
62#define ASN1_TAG_BIT_STRING UINT8_C(0x03)
63#define ASN1_TAG_OCTET_STRING UINT8_C(0x04)
64#define ASN1_TAG_NULL UINT8_C(0x05)
65#define ASN1_TAG_OID UINT8_C(0x06)
66#define ASN1_TAG_OBJECT_DESCRIPTOR UINT8_C(0x07)
67#define ASN1_TAG_EXTERNAL UINT8_C(0x08)
68#define ASN1_TAG_REAL UINT8_C(0x09)
69#define ASN1_TAG_ENUMERATED UINT8_C(0x0a)
70#define ASN1_TAG_EMBEDDED_PDV UINT8_C(0x0b)
71#define ASN1_TAG_UTF8_STRING UINT8_C(0x0c)
72#define ASN1_TAG_RELATIVE_OID UINT8_C(0x0d)
73#define ASN1_TAG_RESERVED_14 UINT8_C(0x0e)
74#define ASN1_TAG_RESERVED_15 UINT8_C(0x0f)
75#define ASN1_TAG_SEQUENCE UINT8_C(0x10)
76#define ASN1_TAG_SET UINT8_C(0x11)
77#define ASN1_TAG_NUMERIC_STRING UINT8_C(0x12)
78#define ASN1_TAG_PRINTABLE_STRING UINT8_C(0x13)
79#define ASN1_TAG_T61_STRING UINT8_C(0x14)
80#define ASN1_TAG_VIDEOTEX_STRING UINT8_C(0x15)
81#define ASN1_TAG_IA5_STRING UINT8_C(0x16)
82#define ASN1_TAG_UTC_TIME UINT8_C(0x17) /**< Century seems to be 1900 if YY < 50, otherwise 2000. Baka ASN.1! */
83#define ASN1_TAG_GENERALIZED_TIME UINT8_C(0x18)
84#define ASN1_TAG_GRAPHIC_STRING UINT8_C(0x19)
85#define ASN1_TAG_VISIBLE_STRING UINT8_C(0x1a)
86#define ASN1_TAG_GENERAL_STRING UINT8_C(0x1b)
87#define ASN1_TAG_UNIVERSAL_STRING UINT8_C(0x1c)
88#define ASN1_TAG_CHARACTER_STRING UINT8_C(0x1d)
89#define ASN1_TAG_BMP_STRING UINT8_C(0x1e)
90#define ASN1_TAG_USE_LONG_FORM UINT8_C(0x1f)
91/** @} */
92
93
94/** @} */
95
96#endif /* !IPRT_INCLUDED_formats_asn1_h */
97
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