|
cryptlib
3.4.1
|
#include <ctype.h>#include <limits.h>#include <stdarg.h>#include <stdio.h>#include <stdlib.h>#include <string.h>Go to the source code of this file.
Classes | |
| struct | ASN1_ITEM |
| struct | tagOIDINFO |
Macros | |
| #define | UPDATE_STRING "12 November 2010" |
| #define | FALSE 0 |
| #define | TRUE ( !FALSE ) |
| #define | SEEK_SET 0 |
| #define | SEEK_CUR 2 |
| #define | EXIT_FAILURE 1 |
| #define | EXIT_SUCCESS ( !EXIT_FAILURE ) |
| #define | FILENAME_MAX 512 |
| #define | min(a, b) ( ( a ) < ( b ) ? ( a ) : ( b ) ) |
| #define | byteToInt(x) ( ( unsigned char ) ( x ) ) |
| #define | LENGTH_MAGIC 177545L |
| #define | CLASS_MASK 0xC0 /* Bits 8 and 7 */ |
| #define | UNIVERSAL 0x00 /* 0 = Universal (defined by ITU X.680) */ |
| #define | APPLICATION 0x40 /* 1 = Application */ |
| #define | CONTEXT 0x80 /* 2 = Context-specific */ |
| #define | PRIVATE 0xC0 /* 3 = Private */ |
| #define | FORM_MASK 0x20 /* Bit 6 */ |
| #define | PRIMITIVE 0x00 /* 0 = primitive */ |
| #define | CONSTRUCTED 0x20 /* 1 = constructed */ |
| #define | TAG_MASK 0x1F /* Bits 5 - 1 */ |
| #define | EOC 0x00 /* 0: End-of-contents octets */ |
| #define | BOOLEAN 0x01 /* 1: Boolean */ |
| #define | INTEGER 0x02 /* 2: Integer */ |
| #define | BITSTRING 0x03 /* 2: Bit string */ |
| #define | OCTETSTRING 0x04 /* 4: Byte string */ |
| #define | NULLTAG 0x05 /* 5: NULL */ |
| #define | OID 0x06 /* 6: Object Identifier */ |
| #define | OBJDESCRIPTOR 0x07 /* 7: Object Descriptor */ |
| #define | EXTERNAL 0x08 /* 8: External */ |
| #define | REAL 0x09 /* 9: Real */ |
| #define | ENUMERATED 0x0A /* 10: Enumerated */ |
| #define | EMBEDDED_PDV 0x0B /* 11: Embedded Presentation Data Value */ |
| #define | UTF8STRING 0x0C /* 12: UTF8 string */ |
| #define | SEQUENCE 0x10 /* 16: Sequence/sequence of */ |
| #define | SET 0x11 /* 17: Set/set of */ |
| #define | NUMERICSTRING 0x12 /* 18: Numeric string */ |
| #define | PRINTABLESTRING 0x13 /* 19: Printable string (ASCII subset) */ |
| #define | T61STRING 0x14 /* 20: T61/Teletex string */ |
| #define | VIDEOTEXSTRING 0x15 /* 21: Videotex string */ |
| #define | IA5STRING 0x16 /* 22: IA5/ASCII string */ |
| #define | UTCTIME 0x17 /* 23: UTC time */ |
| #define | GENERALIZEDTIME 0x18 /* 24: Generalized time */ |
| #define | GRAPHICSTRING 0x19 /* 25: Graphic string */ |
| #define | VISIBLESTRING 0x1A /* 26: Visible string (ASCII subset) */ |
| #define | GENERALSTRING 0x1B /* 27: General string */ |
| #define | UNIVERSALSTRING 0x1C /* 28: Universal string */ |
| #define | BMPSTRING 0x1E /* 30: Basic Multilingual Plane/Unicode string */ |
| #define | LEN_XTND 0x80 /* Indefinite or long form */ |
| #define | LEN_MASK 0x7F /* Bits 7 - 1 */ |
| #define | INDENT_SIZE 11 |
| #define | INDENT_STRING " : " |
| #define | MAX_OID_SIZE 32 |
| #define | CONFIG_NAME "dumpasn1.cfg" |
| #define | isEnvTerminator(c) |
| #define | P 1 /* PrintableString */ |
| #define | I 2 /* IA5String */ |
| #define | PI 3 /* IA5String and PrintableString */ |
| #define | CPM_EOF 0x1A /* ^Z = CPM EOF char */ |
| #define | MAX_LINESIZE 512 |
Typedefs | |
| typedef struct tagOIDINFO | OIDINFO |
Enumerations | |
| enum | STR_OPTION { STR_NONE, STR_UTCTIME, STR_GENERALIZED, STR_PRINTABLE, STR_IA5, STR_LATIN1, STR_BMP, STR_BMP_REVERSED } |
Functions | |
| int | main (int argc, char *argv[]) |
| #define APPLICATION 0x40 /* 1 = Application */ |
Definition at line 181 of file dumpasn1.c.
| #define BITSTRING 0x03 /* 2: Bit string */ |
Definition at line 197 of file dumpasn1.c.
| #define BMPSTRING 0x1E /* 30: Basic Multilingual Plane/Unicode string */ |
Definition at line 220 of file dumpasn1.c.
| #define BOOLEAN 0x01 /* 1: Boolean */ |
Definition at line 195 of file dumpasn1.c.
| #define byteToInt | ( | x | ) | ( ( unsigned char ) ( x ) ) |
Definition at line 156 of file dumpasn1.c.
| #define CLASS_MASK 0xC0 /* Bits 8 and 7 */ |
Definition at line 179 of file dumpasn1.c.
| #define CONFIG_NAME "dumpasn1.cfg" |
Definition at line 316 of file dumpasn1.c.
| #define CONSTRUCTED 0x20 /* 1 = constructed */ |
Definition at line 189 of file dumpasn1.c.
| #define CONTEXT 0x80 /* 2 = Context-specific */ |
Definition at line 182 of file dumpasn1.c.
| #define CPM_EOF 0x1A /* ^Z = CPM EOF char */ |
Definition at line 542 of file dumpasn1.c.
| #define EMBEDDED_PDV 0x0B /* 11: Embedded Presentation Data Value */ |
Definition at line 205 of file dumpasn1.c.
| #define ENUMERATED 0x0A /* 10: Enumerated */ |
Definition at line 204 of file dumpasn1.c.
| #define EOC 0x00 /* 0: End-of-contents octets */ |
Definition at line 194 of file dumpasn1.c.
| #define EXIT_FAILURE 1 |
Definition at line 89 of file dumpasn1.c.
| #define EXIT_SUCCESS ( !EXIT_FAILURE ) |
Definition at line 90 of file dumpasn1.c.
| #define EXTERNAL 0x08 /* 8: External */ |
Definition at line 202 of file dumpasn1.c.
| #define FALSE 0 |
Definition at line 64 of file dumpasn1.c.
| #define FILENAME_MAX 512 |
Definition at line 93 of file dumpasn1.c.
| #define FORM_MASK 0x20 /* Bit 6 */ |
Definition at line 187 of file dumpasn1.c.
| #define GENERALIZEDTIME 0x18 /* 24: Generalized time */ |
Definition at line 215 of file dumpasn1.c.
| #define GENERALSTRING 0x1B /* 27: General string */ |
Definition at line 218 of file dumpasn1.c.
| #define GRAPHICSTRING 0x19 /* 25: Graphic string */ |
Definition at line 216 of file dumpasn1.c.
| #define I 2 /* IA5String */ |
Definition at line 497 of file dumpasn1.c.
| #define IA5STRING 0x16 /* 22: IA5/ASCII string */ |
Definition at line 213 of file dumpasn1.c.
| #define INDENT_SIZE 11 |
Definition at line 277 of file dumpasn1.c.
| #define INDENT_STRING " : " |
Definition at line 278 of file dumpasn1.c.
| #define INTEGER 0x02 /* 2: Integer */ |
Definition at line 196 of file dumpasn1.c.
| #define isEnvTerminator | ( | c | ) |
Definition at line 387 of file dumpasn1.c.
| #define LEN_MASK 0x7F /* Bits 7 - 1 */ |
Definition at line 225 of file dumpasn1.c.
| #define LEN_XTND 0x80 /* Indefinite or long form */ |
Definition at line 224 of file dumpasn1.c.
| #define LENGTH_MAGIC 177545L |
Definition at line 175 of file dumpasn1.c.
| #define MAX_LINESIZE 512 |
Definition at line 546 of file dumpasn1.c.
| #define MAX_OID_SIZE 32 |
Definition at line 295 of file dumpasn1.c.
| #define min | ( | a, | |
| b | |||
| ) | ( ( a ) < ( b ) ? ( a ) : ( b ) ) |
Definition at line 151 of file dumpasn1.c.
| #define NULLTAG 0x05 /* 5: NULL */ |
Definition at line 199 of file dumpasn1.c.
| #define NUMERICSTRING 0x12 /* 18: Numeric string */ |
Definition at line 209 of file dumpasn1.c.
| #define OBJDESCRIPTOR 0x07 /* 7: Object Descriptor */ |
Definition at line 201 of file dumpasn1.c.
| #define OCTETSTRING 0x04 /* 4: Byte string */ |
Definition at line 198 of file dumpasn1.c.
| #define OID 0x06 /* 6: Object Identifier */ |
Definition at line 200 of file dumpasn1.c.
| #define P 1 /* PrintableString */ |
Definition at line 496 of file dumpasn1.c.
| #define PI 3 /* IA5String and PrintableString */ |
Definition at line 498 of file dumpasn1.c.
| #define PRIMITIVE 0x00 /* 0 = primitive */ |
Definition at line 188 of file dumpasn1.c.
| #define PRINTABLESTRING 0x13 /* 19: Printable string (ASCII subset) */ |
Definition at line 210 of file dumpasn1.c.
| #define PRIVATE 0xC0 /* 3 = Private */ |
Definition at line 183 of file dumpasn1.c.
| #define REAL 0x09 /* 9: Real */ |
Definition at line 203 of file dumpasn1.c.
| #define SEEK_CUR 2 |
Definition at line 86 of file dumpasn1.c.
| #define SEEK_SET 0 |
Definition at line 85 of file dumpasn1.c.
| #define SEQUENCE 0x10 /* 16: Sequence/sequence of */ |
Definition at line 207 of file dumpasn1.c.
| #define SET 0x11 /* 17: Set/set of */ |
Definition at line 208 of file dumpasn1.c.
| #define T61STRING 0x14 /* 20: T61/Teletex string */ |
Definition at line 211 of file dumpasn1.c.
| #define TAG_MASK 0x1F /* Bits 5 - 1 */ |
Definition at line 193 of file dumpasn1.c.
| #define TRUE ( !FALSE ) |
Definition at line 65 of file dumpasn1.c.
| #define UNIVERSAL 0x00 /* 0 = Universal (defined by ITU X.680) */ |
Definition at line 180 of file dumpasn1.c.
| #define UNIVERSALSTRING 0x1C /* 28: Universal string */ |
Definition at line 219 of file dumpasn1.c.
| #define UPDATE_STRING "12 November 2010" |
Definition at line 59 of file dumpasn1.c.
| #define UTCTIME 0x17 /* 23: UTC time */ |
Definition at line 214 of file dumpasn1.c.
| #define UTF8STRING 0x0C /* 12: UTF8 string */ |
Definition at line 206 of file dumpasn1.c.
| #define VIDEOTEXSTRING 0x15 /* 21: Videotex string */ |
Definition at line 212 of file dumpasn1.c.
| #define VISIBLESTRING 0x1A /* 26: Visible string (ASCII subset) */ |
Definition at line 217 of file dumpasn1.c.
| typedef struct tagOIDINFO OIDINFO |
| enum STR_OPTION |
| STR_NONE | |
| STR_UTCTIME | |
| STR_GENERALIZED | |
| STR_PRINTABLE | |
| STR_IA5 | |
| STR_LATIN1 | |
| STR_BMP | |
| STR_BMP_REVERSED |
Definition at line 229 of file dumpasn1.c.
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
Definition at line 2678 of file dumpasn1.c.
1.8.2