| RSA BSAFE Cert-C Micro Edition |
The power of PKI for the smallest of devices |
00001 /* $Id: ber_type.h,v 1.7 2002/03/13 02:05:13 jmckee Exp $ */
00002 /*
00003 * Copyright (C) 1998-2002 RSA Security Inc. All rights reserved. This
00004 * work contains proprietary information of RSA Security Inc. Distribution
00005 * is limited to authorized licensees of RSA Security Inc. Any unauthorized
00006 * reproduction or distribution of this work is strictly prohibited.
00007 */
00008 /**
00009 * @file
00010 * This file contains the ASN.1 types used when performing BER (Basic
00011 * Encoding Rules) encoding and decoding operations.
00012 */
00013
00014 #ifndef HEADER_COMMON_BER_TYPE_H
00015 #define HEADER_COMMON_BER_TYPE_H
00016
00017 #ifdef __cplusplus
00018 extern "C" {
00019 #endif
00020
00021 /**
00022 * End of content for encoded items with unspecified length.
00023 */
00024 #define BER_EOC 0
00025
00026 /**
00027 * Either "true" or "false" as per the ASN.1 boolean values,
00028 * BER_TRUE and BER_FALSE.
00029 */
00030 #define BER_BOOLEAN 1
00031
00032 /**
00033 * Effectively unbounded but commonly used to hold values
00034 * that will fit into a long.
00035 */
00036 #define BER_INTEGER 2
00037
00038 /**
00039 * An array of bytes in which the first byte is the number of bits to
00040 * discard from the end.
00041 */
00042 #define BER_BIT_STRING 3
00043
00044 /**
00045 * An 8-bit (hexadecimal byte) array or byte array.
00046 */
00047 #define BER_OCTET_STRING 4
00048
00049 /**
00050 * A BER object that has no data, used when data is specified for the
00051 * general case but none is required in a specific case.
00052 */
00053 #define BER_NULL 5
00054
00055 /**
00056 * A BER object used to hold an ASN.1 identifier that describes the make-up
00057 * of the rest of the constructed elements.
00058 */
00059 #define BER_OBJECT 6
00060
00061 /**
00062 * An indefinitely long string of characters (plus space) used to describe an
00063 * object.
00064 */
00065 #define BER_OBJECT_DESCRIPTOR 7
00066
00067 /**
00068 * Embedded material that is not defined using ASN.1
00069 * (for example, a GIF image). This type is deprecated in favour
00070 * of BER_EMBEDDED_PDV.
00071 */
00072 #define BER_EXTERNAL 8
00073
00074 /**
00075 * A comma-separated list of three integers for the mantissa, the base
00076 * (2 or 10), and the exponent. (Also PLUS-INFINITY and MINUS-INFINITY.) <br>
00077 * Hence, {x, y, z} is (x times (y to the power z)), where y is allowed to
00078 * take only the values 2 and 10.
00079 */
00080 #define BER_REAL 9
00081
00082 /**
00083 * A comma-separated list of names.
00084 */
00085 #define BER_ENUMERATED 10
00086
00087 /**
00088 * Embedded material that is not defined using ASN.1
00089 * (for example, a GIF image). Supercedes BER_EXTERNAL.
00090 */
00091 #define BER_EMBEDDED_PDV 11
00092
00093 /**
00094 * A character string which may contain characters from any language.
00095 */
00096 #define BER_UTF8STRING 12
00097
00098 /**
00099 * A constructed type that is used to hold an ordered list of elements.
00100 */
00101 #define BER_SEQUENCE 16
00102
00103 /**
00104 * A constructed type that is used to hold a list of repeating elements.
00105 */
00106 #define BER_SET 17
00107
00108 /**
00109 * A string of characters containing the digits zero to 9 and space.
00110 */
00111 #define BER_NUMERICSTRING 18
00112
00113 /**
00114 * A character array that only allows a small subset of values, namely
00115 * [A-Z] [a-z] [0-9] and [ '()+,-./:=?].
00116 */
00117 #define BER_PRINTABLESTRING 19
00118
00119 /**
00120 * A deprecated synonym for BER_TELETEXSTRING.
00121 */
00122 #define BER_T61STRING 20
00123
00124 /**
00125 * A character string that allows register entries 6, 87, 102, 103, 106, 107,
00126 * 126, 144, 150, 153, 156, 164, 165 and 168 (plus space and delete)
00127 * of the International Register of Coded Character Sets.
00128 */
00129 #define BER_TELETEXSTRING 20
00130
00131 /**
00132 * A character string that allows gives access to the "characters" used to
00133 * build crude pictures on videotext systems.
00134 */
00135 #define BER_VIDEOTEXSTRING 21
00136
00137 /**
00138 * A character string that allows register entries 1 and 6 (plus space and
00139 * delete) of the International Register of Coded Character Sets to be used
00140 * with Escape Sequences.
00141 */
00142 #define BER_IA5STRING 22
00143
00144 /**
00145 * A character string representing the date and time in the format: <br>
00146 * ddmmyyhhmmssZ.
00147 */
00148 #define BER_UTCTIME 23
00149
00150 /**
00151 * A character string representing the date and time in the format: <br>
00152 * ddmmyyyyhhmmssZ.
00153 */
00154 #define BER_GENERALIZEDTIME 24
00155
00156 /**
00157 * A character string that allows any of the Register Entries in the
00158 * International Register for printable characters other than
00159 * the control character entries.
00160 */
00161 #define BER_GRAPHICSTRING 25
00162
00163 /**
00164 * A deprecated synonym for BER_VISIBLESTRING.
00165 */
00166 #define BER_ISO64STRING 26
00167
00168 /**
00169 * A character string that allows register entry 6
00170 * of the International Register of Coded Character Sets to be used with
00171 * Escape Sequences.
00172 */
00173 #define BER_VISIBLESTRING 26
00174
00175 /**
00176 * A character string that allows any of the Register Entries in the
00177 * International Register for printable characters.
00178 */
00179 #define BER_GENERALSTRING 27
00180
00181 /**
00182 * A character string which may contain characters from any language
00183 * without using combining characters.
00184 */
00185 #define BER_UNIVERSALSTRING 28
00186
00187 /**
00188 * A character string which may contain characters from any living
00189 * language.
00190 */
00191 #define BER_BMPSTRING 30
00192
00193 /** The boolean value "false" for the BER_BOOLEAN ASN.1 type */
00194 #define BER_FALSE 0
00195 /** The boolean value "true" for the BER_BOOLEAN ASN.1 type */
00196 #define BER_TRUE 255
00197
00198 #ifdef __cplusplus
00199 }
00200 #endif
00201
00202 #endif /* !HEADER_COMMON_BER_TYPE_H */
00203