php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
der.c File Reference
#include "file.h"
#include <sys/types.h>
#include <stdio.h>
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "magic.h"
#include "der.h"

Go to the source code of this file.

Macros

#define DER_BAD   CAST(uint32_t, -1)
 
#define DER_CLASS_UNIVERSAL   0
 
#define DER_CLASS_APPLICATION   1
 
#define DER_CLASS_CONTEXT   2
 
#define DER_CLASS_PRIVATE   3
 
#define DER_TYPE_PRIMITIVE   0
 
#define DER_TYPE_CONSTRUCTED   1
 
#define DER_TAG_EOC   0x00
 
#define DER_TAG_BOOLEAN   0x01
 
#define DER_TAG_INTEGER   0x02
 
#define DER_TAG_BIT   STRING 0x03
 
#define DER_TAG_OCTET_STRING   0x04
 
#define DER_TAG_NULL   0x05
 
#define DER_TAG_OBJECT_IDENTIFIER   0x06
 
#define DER_TAG_OBJECT_DESCRIPTOR   0x07
 
#define DER_TAG_EXTERNAL   0x08
 
#define DER_TAG_REAL   0x09
 
#define DER_TAG_ENUMERATED   0x0a
 
#define DER_TAG_EMBEDDED_PDV   0x0b
 
#define DER_TAG_UTF8_STRING   0x0c
 
#define DER_TAG_RELATIVE_OID   0x0d
 
#define DER_TAG_TIME   0x0e
 
#define DER_TAG_RESERVED_2   0x0f
 
#define DER_TAG_SEQUENCE   0x10
 
#define DER_TAG_SET   0x11
 
#define DER_TAG_NUMERIC_STRING   0x12
 
#define DER_TAG_PRINTABLE_STRING   0x13
 
#define DER_TAG_T61_STRING   0x14
 
#define DER_TAG_VIDEOTEX_STRING   0x15
 
#define DER_TAG_IA5_STRING   0x16
 
#define DER_TAG_UTCTIME   0x17
 
#define DER_TAG_GENERALIZED_TIME   0x18
 
#define DER_TAG_GRAPHIC_STRING   0x19
 
#define DER_TAG_VISIBLE_STRING   0x1a
 
#define DER_TAG_GENERAL_STRING   0x1b
 
#define DER_TAG_UNIVERSAL_STRING   0x1c
 
#define DER_TAG_CHARACTER_STRING   0x1d
 
#define DER_TAG_BMP_STRING   0x1e
 
#define DER_TAG_DATE   0x1f
 
#define DER_TAG_TIME_OF_DAY   0x20
 
#define DER_TAG_DATE_TIME   0x21
 
#define DER_TAG_DURATION   0x22
 
#define DER_TAG_OID_IRI   0x23
 
#define DER_TAG_RELATIVE_OID_IRI   0x24
 
#define DER_TAG_LAST   0x25
 
#define DPRINTF(a)
 

Functions

int32_t der_offs (struct magic_set *ms, struct magic *m, size_t nbytes)
 
int der_cmp (struct magic_set *ms, struct magic *m)
 

Macro Definition Documentation

◆ DER_BAD

#define DER_BAD   CAST(uint32_t, -1)

Definition at line 64 of file der.c.

◆ DER_CLASS_APPLICATION

#define DER_CLASS_APPLICATION   1

Definition at line 67 of file der.c.

◆ DER_CLASS_CONTEXT

#define DER_CLASS_CONTEXT   2

Definition at line 68 of file der.c.

◆ DER_CLASS_PRIVATE

#define DER_CLASS_PRIVATE   3

Definition at line 69 of file der.c.

◆ DER_CLASS_UNIVERSAL

#define DER_CLASS_UNIVERSAL   0

Definition at line 66 of file der.c.

◆ DER_TAG_BIT

#define DER_TAG_BIT   STRING 0x03

Definition at line 83 of file der.c.

◆ DER_TAG_BMP_STRING

#define DER_TAG_BMP_STRING   0x1e

Definition at line 110 of file der.c.

◆ DER_TAG_BOOLEAN

#define DER_TAG_BOOLEAN   0x01

Definition at line 81 of file der.c.

◆ DER_TAG_CHARACTER_STRING

#define DER_TAG_CHARACTER_STRING   0x1d

Definition at line 109 of file der.c.

◆ DER_TAG_DATE

#define DER_TAG_DATE   0x1f

Definition at line 111 of file der.c.

◆ DER_TAG_DATE_TIME

#define DER_TAG_DATE_TIME   0x21

Definition at line 113 of file der.c.

◆ DER_TAG_DURATION

#define DER_TAG_DURATION   0x22

Definition at line 114 of file der.c.

◆ DER_TAG_EMBEDDED_PDV

#define DER_TAG_EMBEDDED_PDV   0x0b

Definition at line 91 of file der.c.

◆ DER_TAG_ENUMERATED

#define DER_TAG_ENUMERATED   0x0a

Definition at line 90 of file der.c.

◆ DER_TAG_EOC

#define DER_TAG_EOC   0x00

Definition at line 80 of file der.c.

◆ DER_TAG_EXTERNAL

#define DER_TAG_EXTERNAL   0x08

Definition at line 88 of file der.c.

◆ DER_TAG_GENERAL_STRING

#define DER_TAG_GENERAL_STRING   0x1b

Definition at line 107 of file der.c.

◆ DER_TAG_GENERALIZED_TIME

#define DER_TAG_GENERALIZED_TIME   0x18

Definition at line 104 of file der.c.

◆ DER_TAG_GRAPHIC_STRING

#define DER_TAG_GRAPHIC_STRING   0x19

Definition at line 105 of file der.c.

◆ DER_TAG_IA5_STRING

#define DER_TAG_IA5_STRING   0x16

Definition at line 102 of file der.c.

◆ DER_TAG_INTEGER

#define DER_TAG_INTEGER   0x02

Definition at line 82 of file der.c.

◆ DER_TAG_LAST

#define DER_TAG_LAST   0x25

Definition at line 117 of file der.c.

◆ DER_TAG_NULL

#define DER_TAG_NULL   0x05

Definition at line 85 of file der.c.

◆ DER_TAG_NUMERIC_STRING

#define DER_TAG_NUMERIC_STRING   0x12

Definition at line 98 of file der.c.

◆ DER_TAG_OBJECT_DESCRIPTOR

#define DER_TAG_OBJECT_DESCRIPTOR   0x07

Definition at line 87 of file der.c.

◆ DER_TAG_OBJECT_IDENTIFIER

#define DER_TAG_OBJECT_IDENTIFIER   0x06

Definition at line 86 of file der.c.

◆ DER_TAG_OCTET_STRING

#define DER_TAG_OCTET_STRING   0x04

Definition at line 84 of file der.c.

◆ DER_TAG_OID_IRI

#define DER_TAG_OID_IRI   0x23

Definition at line 115 of file der.c.

◆ DER_TAG_PRINTABLE_STRING

#define DER_TAG_PRINTABLE_STRING   0x13

Definition at line 99 of file der.c.

◆ DER_TAG_REAL

#define DER_TAG_REAL   0x09

Definition at line 89 of file der.c.

◆ DER_TAG_RELATIVE_OID

#define DER_TAG_RELATIVE_OID   0x0d

Definition at line 93 of file der.c.

◆ DER_TAG_RELATIVE_OID_IRI

#define DER_TAG_RELATIVE_OID_IRI   0x24

Definition at line 116 of file der.c.

◆ DER_TAG_RESERVED_2

#define DER_TAG_RESERVED_2   0x0f

Definition at line 95 of file der.c.

◆ DER_TAG_SEQUENCE

#define DER_TAG_SEQUENCE   0x10

Definition at line 96 of file der.c.

◆ DER_TAG_SET

#define DER_TAG_SET   0x11

Definition at line 97 of file der.c.

◆ DER_TAG_T61_STRING

#define DER_TAG_T61_STRING   0x14

Definition at line 100 of file der.c.

◆ DER_TAG_TIME

#define DER_TAG_TIME   0x0e

Definition at line 94 of file der.c.

◆ DER_TAG_TIME_OF_DAY

#define DER_TAG_TIME_OF_DAY   0x20

Definition at line 112 of file der.c.

◆ DER_TAG_UNIVERSAL_STRING

#define DER_TAG_UNIVERSAL_STRING   0x1c

Definition at line 108 of file der.c.

◆ DER_TAG_UTCTIME

#define DER_TAG_UTCTIME   0x17

Definition at line 103 of file der.c.

◆ DER_TAG_UTF8_STRING

#define DER_TAG_UTF8_STRING   0x0c

Definition at line 92 of file der.c.

◆ DER_TAG_VIDEOTEX_STRING

#define DER_TAG_VIDEOTEX_STRING   0x15

Definition at line 101 of file der.c.

◆ DER_TAG_VISIBLE_STRING

#define DER_TAG_VISIBLE_STRING   0x1a

Definition at line 106 of file der.c.

◆ DER_TYPE_CONSTRUCTED

#define DER_TYPE_CONSTRUCTED   1

Definition at line 75 of file der.c.

◆ DER_TYPE_PRIMITIVE

#define DER_TYPE_PRIMITIVE   0

Definition at line 74 of file der.c.

◆ DPRINTF

#define DPRINTF ( a)

Definition at line 133 of file der.c.

Function Documentation

◆ der_cmp()

int der_cmp ( struct magic_set * ms,
struct magic * m )

Definition at line 305 of file der.c.

◆ der_offs()

int32_t der_offs ( struct magic_set * ms,
struct magic * m,
size_t nbytes )

Definition at line 266 of file der.c.