cryptlib  3.4.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros
Classes | Macros | Enumerations | Functions | Variables
asn1.h File Reference
#include <time.h>
#include "io/stream.h"

Go to the source code of this file.

Classes

struct  OID_INFO
 

Macros

#define BER_UNIVERSAL   0x00
 
#define BER_APPLICATION   0x40
 
#define BER_CONTEXT_SPECIFIC   0x80
 
#define BER_PRIVATE   0xC0
 
#define BER_CONSTRUCTED   0x20
 
#define BER_PRIMITIVE   0x00
 
#define BER_EOC   0 /* Pseudo-type for first EOC octet */
 
#define BER_RESERVED   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_RESERVED )
 
#define BER_BOOLEAN   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_BOOLEAN )
 
#define BER_INTEGER   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_INTEGER )
 
#define BER_BITSTRING   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_BITSTRING )
 
#define BER_OCTETSTRING   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_OCTETSTRING )
 
#define BER_NULL   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_NULL )
 
#define BER_OBJECT_IDENTIFIER   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_OBJECT_IDENTIFIER )
 
#define BER_OBJECT_DESCRIPTOR   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_OBJECT_DESCRIPTOR )
 
#define BER_EXTERNAL   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_EXTERNAL )
 
#define BER_REAL   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_REAL )
 
#define BER_ENUMERATED   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_ENUMERATED )
 
#define BER_EMBEDDED_PDV   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_EMBEDDED_PDV )
 
#define BER_STRING_UTF8   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_STRING_UTF8 )
 
#define BER_13   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_13 )
 
#define BER_14   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_14 )
 
#define BER_15   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_15 )
 
#define BER_SEQUENCE   ( BER_UNIVERSAL | BER_CONSTRUCTED | BER_ID_SEQUENCE )
 
#define BER_SET   ( BER_UNIVERSAL | BER_CONSTRUCTED | BER_ID_SET )
 
#define BER_STRING_NUMERIC   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_STRING_NUMERIC )
 
#define BER_STRING_PRINTABLE   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_STRING_PRINTABLE )
 
#define BER_STRING_T61   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_STRING_T61 )
 
#define BER_STRING_VIDEOTEX   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_STRING_VIDEOTEX )
 
#define BER_STRING_IA5   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_STRING_IA5 )
 
#define BER_TIME_UTC   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_TIME_UTC )
 
#define BER_TIME_GENERALIZED   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_TIME_GENERALIZED )
 
#define BER_STRING_GRAPHIC   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_STRING_GRAPHIC )
 
#define BER_STRING_ISO646   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_STRING_ISO646 )
 
#define BER_STRING_GENERAL   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_STRING_GENERAL )
 
#define BER_STRING_UNIVERSAL   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_STRING_UNIVERSAL )
 
#define BER_29   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_BER29 )
 
#define BER_STRING_BMP   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_STRING_BMP )
 
#define BER_OCTETSTRING_INDEF   MKDATA( "\x24\x80" )
 
#define BER_SEQUENCE_INDEF   MKDATA( "\x30\x80" )
 
#define BER_SET_INDEF   MKDATA( "\x31\x80" )
 
#define BER_CTAG0_INDEF   MKDATA( "\xA0\x80" )
 
#define BER_END_INDEF   MKDATA( "\x00\x00" )
 
#define BER_CLASS_MASK   0xC0
 
#define BER_CONSTRUCTED_MASK   0x20
 
#define BER_SHORT_ID_MASK   0x1F
 
#define MAX_SHORT_BER_ID   ( BER_STRING_BMP + 1 )
 
#define LONG_BER_ID   0x1F
 
#define MAKE_CTAG(identifier)   ( BER_CONTEXT_SPECIFIC | BER_CONSTRUCTED | ( identifier ) )
 
#define MAKE_CTAG_PRIMITIVE(identifier)   ( BER_CONTEXT_SPECIFIC | ( identifier ) )
 
#define EXTRACT_CTAG(tag)   ( ( tag ) & ~( BER_CONTEXT_SPECIFIC | BER_CONSTRUCTED ) )
 
#define DEFAULT_TAG   ( -1 )
 
#define NO_TAG   ( -2 )
 
#define ANY_TAG   ( -3 )
 
#define MAX_TAG
 
#define MAX_TAG_VALUE   MAX_SHORT_BER_ID
 
#define MAX_CONSTR_TAG_VALUE   BER_SET
 
#define MAX_CTAG_VALUE   10
 
#define MIN_OID_SIZE   5
 
#define MAX_OID_SIZE   32
 
#define WILDCARD_OID
 
#define WILDCARD_OID_SIZE   16
 
#define MKOID(value)   ( ( const BYTE * ) value )
 
#define writeOctetStringIndef(stream)   swrite( stream, BER_OCTETSTRING_INDEF, 2 )
 
#define writeSequenceIndef(stream)   swrite( stream, BER_SEQUENCE_INDEF, 2 )
 
#define writeSetIndef(stream)   swrite( stream, BER_SET_INDEF, 2 )
 
#define writeCtag0Indef(stream)   swrite( stream, BER_CTAG0_INDEF, 2 )
 
#define writeEndIndef(stream)   swrite( stream, BER_END_INDEF, 2 )
 
#define sizeofEOC()   2
 
#define writeTag(stream, tag)   sputc( stream, tag )
 
#define writeRawObject(stream, object, size)   swrite( stream, object, size )
 
#define sizeofOID(oid)   ( 1 + 1 + ( int ) oid[ 1 ] )
 
#define writeOID(stream, oid)   swrite( ( stream ), ( oid ), sizeofOID( oid ) )
 
#define sizeofInteger(value, valueLength)
 
#define readIntegerData(stream, integer, integerLength, maxLength)   readIntegerTag( stream, integer, integerLength, maxLength, NO_TAG )
 
#define readInteger(stream, integer, integerLength, maxLength)   readIntegerTag( stream, integer, integerLength, maxLength, DEFAULT_TAG )
 
#define sizeofBignum(bignum)   ( ( int ) sizeofObject( signedBignumSize( bignum ) ) )
 
#define readBignum(stream, bignum, minLen, maxLen, maxRange)   readBignumTag( stream, bignum, minLen, maxLen, maxRange, DEFAULT_TAG )
 
#define writeBignum(stream, bignum)   writeBignumTag( stream, bignum, DEFAULT_TAG )
 
#define sizeofShortInteger(value)
 
#define readShortIntegerData(stream, integer)   readShortIntegerTag( stream, integer, NO_TAG )
 
#define readShortInteger(stream, integer)   readShortIntegerTag( stream, integer, DEFAULT_TAG )
 
#define sizeofEnumerated(value)   ( ( ( value ) < 128 ) ? 3 : 4 )
 
#define readEnumeratedData(stream, enumeration)   readEnumeratedTag( stream, enumeration, NO_TAG )
 
#define readEnumerated(stream, enumeration)   readEnumeratedTag( stream, enumeration, DEFAULT_TAG )
 
#define sizeofBoolean()   ( sizeof( BYTE ) + sizeof( BYTE ) + sizeof( BYTE ) )
 
#define readBooleanData(stream, boolean)   readBooleanTag( stream, boolean, NO_TAG )
 
#define readBoolean(stream, boolean)   readBooleanTag( stream, boolean, DEFAULT_TAG )
 
#define sizeofNull()   ( sizeof( BYTE ) + sizeof( BYTE ) )
 
#define readNullData(stream)   readNullTag( stream, NO_TAG )
 
#define readNull(stream)   readNullTag( stream, DEFAULT_TAG )
 
#define readOctetStringData(stream, string, stringLength, minLength, maxLength)   readOctetStringTag( stream, string, stringLength, minLength, maxLength, NO_TAG )
 
#define readOctetString(stream, string, stringLength, minLength, maxLength)   readOctetStringTag( stream, string, stringLength, minLength, maxLength, DEFAULT_TAG )
 
#define sizeofBitString(value)
 
#define readBitStringData(stream, bitString)   readBitStringTag( stream, bitString, NO_TAG )
 
#define readBitString(stream, bitString)   readBitStringTag( stream, bitString, DEFAULT_TAG )
 
#define sizeofUTCTime()   ( 1 + 1 + 13 )
 
#define readUTCTimeData(stream, time)   readUTCTimeTag( stream, time, NO_TAG )
 
#define readUTCTime(stream, time)   readUTCTimeTag( stream, time, DEFAULT_TAG )
 
#define sizeofGeneralizedTime()   ( 1 + 1 + 15 )
 
#define readGeneralizedTimeData(stream, time)   readGeneralizedTimeTag( stream, time, NO_TAG )
 
#define readGeneralizedTime(stream, time)   readGeneralizedTimeTag( stream, time, DEFAULT_TAG )
 

Enumerations

enum  {
  BER_ID_RESERVED, BER_ID_BOOLEAN, BER_ID_INTEGER, BER_ID_BITSTRING,
  BER_ID_OCTETSTRING, BER_ID_NULL, BER_ID_OBJECT_IDENTIFIER, BER_ID_OBJECT_DESCRIPTOR,
  BER_ID_EXTERNAL, BER_ID_REAL, BER_ID_ENUMERATED, BER_ID_EMBEDDED_PDV,
  BER_ID_STRING_UTF8, BER_ID_13, BER_ID_14, BER_ID_15,
  BER_ID_SEQUENCE, BER_ID_SET, BER_ID_STRING_NUMERIC, BER_ID_STRING_PRINTABLE,
  BER_ID_STRING_T61, BER_ID_STRING_VIDEOTEX, BER_ID_STRING_IA5, BER_ID_TIME_UTC,
  BER_ID_TIME_GENERALIZED, BER_ID_STRING_GRAPHIC, BER_ID_STRING_ISO646, BER_ID_STRING_GENERAL,
  BER_ID_STRING_UNIVERSAL, BER_ID_29, BER_ID_STRING_BMP, BER_ID_LAST
}
 

Functions

 RETVAL_RANGE (MAX_ERROR, TRUE) STDC_NONNULL_ARG((1)) int checkEOC(INOUT STREAM *stream)
 
 RETVAL_RANGE (MAX_ERROR, 0xFF) STDC_NONNULL_ARG((1)) int readTag(INOUT STREAM *stream)
 
 RETVAL_RANGE (MAX_ERROR, MAX_INTLENGTH) long sizeofObject(IN_LENGTH const long length)
 
RETVAL STDC_NONNULL_ARG ((1)) int readUniversalData(INOUT STREAM *stream)
 
CHECK_RETVAL STDC_NONNULL_ARG ((1, 2, 4)) int readRawObject(INOUT STREAM *stream
 
CHECK_RETVAL OUT_BUFFER (bufferMaxLength,*bufferLength) BYTE *buffer
 
CHECK_RETVAL IN_LENGTH_SHORT_MIN (3) const int bufferMaxLength
 
RETVAL IN_ARRAY (noOidSelectionEntries) const OID_INFO *oidSelection
 
RETVAL IN_RANGE (1, 50) const int noOidSelectionEntries
 
RETVAL OUT_RANGE (CRYPT_ERROR, noOidSelectionEntries) int *selectionID)
 
RETVAL STDC_NONNULL_ARG ((1, 2)) int readOIDEx(INOUT STREAM *stream
 
RETVAL IN_BUFFER (oidLength) const BYTE *oid
 
RETVAL OUT_BUFFER (oidMaxLength,*oidLength) BYTE *oid
 
RETVAL IN_LENGTH_SHORT_MIN (5) const int oidMaxLength
 
RETVAL STDC_NONNULL_ARG ((1, 4)) int readIntegerTag(INOUT STREAM *stream
 
RETVAL OUT_BUFFER_OPT (integerMaxLength,*integerLength) BYTE *integer
 
RETVAL IN_BUFFER (integerLength) const BYTE *integer
 
 RETVAL_RANGE (MAX_ERROR, MAX_INTLENGTH_SHORT) STDC_NONNULL_ARG((1)) int signedBignumSize(IN TYPECAST(BIGNUM *) const void *bignum)
 
int writeBignumTag (INOUT STREAM *stream, const void *bignum, const int tag) STDC_NONNULL_ARG((1
 
CHECK_RETVAL INOUT TYPECAST (BIGNUM *) void *bignum
 
RETVAL IN_RANGE (0, 999) const int enumerated
 
RETVAL IN_BUFFER (length) const BYTE *string
 
RETVAL STDC_NONNULL_ARG ((1, 2, 3)) int readOctetStringTag(INOUT STREAM *stream
 
RETVAL OUT_BUFFER (maxLength,*stringLength) BYTE *string
 
RETVAL OUT_BUFFER (stringMaxLength,*stringLength) void *string
 
CHECK_RETVAL
OUT_BUFFER_ALLOC_OPT length
void OUT_LENGTH_Z int 
IN_LENGTH_SHORT_MIN (16) const int minLength
 
CHECK_RETVAL STDC_NONNULL_ARG ((1, 3)) int getObjectLength(IN_BUFFER(objectLength) const void *objectPtr
 

Variables

CHECK_RETVAL
OUT_LENGTH_SHORT_Z int * 
bufferLength
 
CHECK_RETVAL
OUT_LENGTH_SHORT_Z int
IN_TAG_ENCODED const int 
tag
 
RETVAL OUT_OPT_PTR_OPT const
OID_INFO ** 
oidSelectionValue
 
RETVAL IN_LENGTH_OID const int oidLength
 
RETVAL IN_LENGTH_SHORT const int integerMaxLength
 
RETVAL IN_LENGTH_SHORT const
int OUT_OPT_LENGTH_SHORT_Z int * 
integerLength
 
CHECK_RETVAL INOUT void * bignum
 
CHECK_RETVAL INOUT void
IN_LENGTH_PKC const int 
minLength
 
CHECK_RETVAL INOUT void
IN_LENGTH_PKC const int
IN_LENGTH_PKC const int 
maxLength
 
CHECK_RETVAL INOUT void
IN_LENGTH_PKC const int
IN_LENGTH_PKC const int IN_OPT
const void * 
maxRange
 
RETVAL IN_INT const long integer
 
RETVAL OUT_OPT_INT_Z long * value
 
RETVAL OUT_OPT_INT_Z int * enumeration
 
RETVAL const BOOLEAN boolean
 
RETVAL IN_LENGTH_SHORT const int length
 
RETVAL OUT_LENGTH_SHORT_Z int * stringLength
 
RETVAL IN_LENGTH_SHORT const int stringMaxLength
 
RETVAL IN_INT const int bitString
 
RETVAL const time_t timeVal
 
CHECK_RETVAL OUT_LENGTH_INDEF
long const BOOLEAN 
isLongObject
 
CHECK_RETVAL
OUT_BUFFER_ALLOC_OPT length
void ** 
objectPtrPtr
 
CHECK_RETVAL
OUT_BUFFER_ALLOC_OPT length
void OUT_LENGTH_Z int * 
objectLengthPtr
 
CHECK_RETVAL IN_LENGTH const int objectLength
 

Macro Definition Documentation

#define ANY_TAG   ( -3 )

Definition at line 134 of file asn1.h.

#define BER_13   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_13 )

Definition at line 70 of file asn1.h.

#define BER_14   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_14 )

Definition at line 71 of file asn1.h.

#define BER_15   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_15 )

Definition at line 72 of file asn1.h.

#define BER_29   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_BER29 )

Definition at line 86 of file asn1.h.

#define BER_APPLICATION   0x40

Definition at line 30 of file asn1.h.

#define BER_BITSTRING   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_BITSTRING )

Definition at line 60 of file asn1.h.

#define BER_BOOLEAN   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_BOOLEAN )

Definition at line 58 of file asn1.h.

#define BER_CLASS_MASK   0xC0

Definition at line 99 of file asn1.h.

#define BER_CONSTRUCTED   0x20

Definition at line 36 of file asn1.h.

#define BER_CONSTRUCTED_MASK   0x20

Definition at line 100 of file asn1.h.

#define BER_CONTEXT_SPECIFIC   0x80

Definition at line 31 of file asn1.h.

#define BER_CTAG0_INDEF   MKDATA( "\xA0\x80" )

Definition at line 94 of file asn1.h.

#define BER_EMBEDDED_PDV   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_EMBEDDED_PDV )

Definition at line 68 of file asn1.h.

#define BER_END_INDEF   MKDATA( "\x00\x00" )

Definition at line 95 of file asn1.h.

#define BER_ENUMERATED   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_ENUMERATED )

Definition at line 67 of file asn1.h.

#define BER_EOC   0 /* Pseudo-type for first EOC octet */

Definition at line 56 of file asn1.h.

#define BER_EXTERNAL   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_EXTERNAL )

Definition at line 65 of file asn1.h.

#define BER_INTEGER   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_INTEGER )

Definition at line 59 of file asn1.h.

#define BER_NULL   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_NULL )

Definition at line 62 of file asn1.h.

#define BER_OBJECT_DESCRIPTOR   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_OBJECT_DESCRIPTOR )

Definition at line 64 of file asn1.h.

#define BER_OBJECT_IDENTIFIER   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_OBJECT_IDENTIFIER )

Definition at line 63 of file asn1.h.

#define BER_OCTETSTRING   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_OCTETSTRING )

Definition at line 61 of file asn1.h.

#define BER_OCTETSTRING_INDEF   MKDATA( "\x24\x80" )

Definition at line 91 of file asn1.h.

#define BER_PRIMITIVE   0x00

Definition at line 37 of file asn1.h.

#define BER_PRIVATE   0xC0

Definition at line 32 of file asn1.h.

#define BER_REAL   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_REAL )

Definition at line 66 of file asn1.h.

#define BER_RESERVED   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_RESERVED )

Definition at line 57 of file asn1.h.

#define BER_SEQUENCE   ( BER_UNIVERSAL | BER_CONSTRUCTED | BER_ID_SEQUENCE )

Definition at line 73 of file asn1.h.

#define BER_SEQUENCE_INDEF   MKDATA( "\x30\x80" )

Definition at line 92 of file asn1.h.

#define BER_SET   ( BER_UNIVERSAL | BER_CONSTRUCTED | BER_ID_SET )

Definition at line 74 of file asn1.h.

#define BER_SET_INDEF   MKDATA( "\x31\x80" )

Definition at line 93 of file asn1.h.

#define BER_SHORT_ID_MASK   0x1F

Definition at line 101 of file asn1.h.

#define BER_STRING_BMP   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_STRING_BMP )

Definition at line 87 of file asn1.h.

#define BER_STRING_GENERAL   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_STRING_GENERAL )

Definition at line 84 of file asn1.h.

#define BER_STRING_GRAPHIC   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_STRING_GRAPHIC )

Definition at line 82 of file asn1.h.

#define BER_STRING_IA5   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_STRING_IA5 )

Definition at line 79 of file asn1.h.

#define BER_STRING_ISO646   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_STRING_ISO646 )

Definition at line 83 of file asn1.h.

#define BER_STRING_NUMERIC   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_STRING_NUMERIC )

Definition at line 75 of file asn1.h.

#define BER_STRING_PRINTABLE   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_STRING_PRINTABLE )

Definition at line 76 of file asn1.h.

#define BER_STRING_T61   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_STRING_T61 )

Definition at line 77 of file asn1.h.

#define BER_STRING_UNIVERSAL   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_STRING_UNIVERSAL )

Definition at line 85 of file asn1.h.

#define BER_STRING_UTF8   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_STRING_UTF8 )

Definition at line 69 of file asn1.h.

#define BER_STRING_VIDEOTEX   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_STRING_VIDEOTEX )

Definition at line 78 of file asn1.h.

#define BER_TIME_GENERALIZED   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_TIME_GENERALIZED )

Definition at line 81 of file asn1.h.

#define BER_TIME_UTC   ( BER_UNIVERSAL | BER_PRIMITIVE | BER_ID_TIME_UTC )

Definition at line 80 of file asn1.h.

#define BER_UNIVERSAL   0x00

Definition at line 29 of file asn1.h.

#define DEFAULT_TAG   ( -1 )

Definition at line 132 of file asn1.h.

#define EXTRACT_CTAG (   tag)    ( ( tag ) & ~( BER_CONTEXT_SPECIFIC | BER_CONSTRUCTED ) )

Definition at line 117 of file asn1.h.

#define LONG_BER_ID   0x1F

Definition at line 107 of file asn1.h.

#define MAKE_CTAG (   identifier)    ( BER_CONTEXT_SPECIFIC | BER_CONSTRUCTED | ( identifier ) )

Definition at line 113 of file asn1.h.

#define MAKE_CTAG_PRIMITIVE (   identifier)    ( BER_CONTEXT_SPECIFIC | ( identifier ) )

Definition at line 115 of file asn1.h.

#define MAX_CONSTR_TAG_VALUE   BER_SET

Definition at line 153 of file asn1.h.

#define MAX_CTAG_VALUE   10

Definition at line 157 of file asn1.h.

#define MAX_OID_SIZE   32

Definition at line 163 of file asn1.h.

#define MAX_SHORT_BER_ID   ( BER_STRING_BMP + 1 )

Definition at line 106 of file asn1.h.

#define MAX_TAG
Value:
MAX_SHORT_BER_ID )

Definition at line 138 of file asn1.h.

#define MAX_TAG_VALUE   MAX_SHORT_BER_ID

Definition at line 152 of file asn1.h.

#define MIN_OID_SIZE   5

Definition at line 162 of file asn1.h.

#define MKOID (   value)    ( ( const BYTE * ) value )

Definition at line 180 of file asn1.h.

#define NO_TAG   ( -2 )

Definition at line 133 of file asn1.h.

#define readBignum (   stream,
  bignum,
  minLen,
  maxLen,
  maxRange 
)    readBignumTag( stream, bignum, minLen, maxLen, maxRange, DEFAULT_TAG )

Definition at line 337 of file asn1.h.

#define readBitString (   stream,
  bitString 
)    readBitStringTag( stream, bitString, DEFAULT_TAG )

Definition at line 475 of file asn1.h.

#define readBitStringData (   stream,
  bitString 
)    readBitStringTag( stream, bitString, NO_TAG )

Definition at line 473 of file asn1.h.

#define readBoolean (   stream,
  boolean 
)    readBooleanTag( stream, boolean, DEFAULT_TAG )

Definition at line 405 of file asn1.h.

#define readBooleanData (   stream,
  boolean 
)    readBooleanTag( stream, boolean, NO_TAG )

Definition at line 403 of file asn1.h.

#define readEnumerated (   stream,
  enumeration 
)    readEnumeratedTag( stream, enumeration, DEFAULT_TAG )

Definition at line 389 of file asn1.h.

#define readEnumeratedData (   stream,
  enumeration 
)    readEnumeratedTag( stream, enumeration, NO_TAG )

Definition at line 387 of file asn1.h.

#define readGeneralizedTime (   stream,
  time 
)    readGeneralizedTimeTag( stream, time, DEFAULT_TAG )

Definition at line 501 of file asn1.h.

#define readGeneralizedTimeData (   stream,
  time 
)    readGeneralizedTimeTag( stream, time, NO_TAG )

Definition at line 499 of file asn1.h.

#define readInteger (   stream,
  integer,
  integerLength,
  maxLength 
)    readIntegerTag( stream, integer, integerLength, maxLength, DEFAULT_TAG )

Definition at line 316 of file asn1.h.

#define readIntegerData (   stream,
  integer,
  integerLength,
  maxLength 
)    readIntegerTag( stream, integer, integerLength, maxLength, NO_TAG )

Definition at line 314 of file asn1.h.

#define readNull (   stream)    readNullTag( stream, DEFAULT_TAG )

Definition at line 417 of file asn1.h.

#define readNullData (   stream)    readNullTag( stream, NO_TAG )

Definition at line 416 of file asn1.h.

#define readOctetString (   stream,
  string,
  stringLength,
  minLength,
  maxLength 
)    readOctetStringTag( stream, string, stringLength, minLength, maxLength, DEFAULT_TAG )

Definition at line 437 of file asn1.h.

#define readOctetStringData (   stream,
  string,
  stringLength,
  minLength,
  maxLength 
)    readOctetStringTag( stream, string, stringLength, minLength, maxLength, NO_TAG )

Definition at line 435 of file asn1.h.

#define readShortInteger (   stream,
  integer 
)    readShortIntegerTag( stream, integer, DEFAULT_TAG )

Definition at line 372 of file asn1.h.

#define readShortIntegerData (   stream,
  integer 
)    readShortIntegerTag( stream, integer, NO_TAG )

Definition at line 370 of file asn1.h.

#define readUTCTime (   stream,
  time 
)    readUTCTimeTag( stream, time, DEFAULT_TAG )

Definition at line 489 of file asn1.h.

#define readUTCTimeData (   stream,
  time 
)    readUTCTimeTag( stream, time, NO_TAG )

Definition at line 488 of file asn1.h.

#define sizeofBignum (   bignum)    ( ( int ) sizeofObject( signedBignumSize( bignum ) ) )

Definition at line 322 of file asn1.h.

#define sizeofBitString (   value)
Value:
( 3 + ( ( ( ( long ) value ) > 0xFFFFFFL ) ? 4 : \
( ( ( long ) value ) > 0xFFFFL ) ? 3 : \
( ( value ) > 0xFF ) ? 2 : ( value ) ? 1 : 0 ) )

Definition at line 460 of file asn1.h.

#define sizeofBoolean ( )    ( sizeof( BYTE ) + sizeof( BYTE ) + sizeof( BYTE ) )

Definition at line 394 of file asn1.h.

#define sizeofEnumerated (   value)    ( ( ( value ) < 128 ) ? 3 : 4 )

Definition at line 377 of file asn1.h.

#define sizeofEOC ( )    2

Definition at line 192 of file asn1.h.

#define sizeofGeneralizedTime ( )    ( 1 + 1 + 15 )

Definition at line 491 of file asn1.h.

#define sizeofInteger (   value,
  valueLength 
)
Value:
( int ) sizeofObject( ( valueLength ) + \
( ( *( BYTE * )( value ) & 0x80 ) ? 1 : 0 ) )

Definition at line 296 of file asn1.h.

#define sizeofNull ( )    ( sizeof( BYTE ) + sizeof( BYTE ) )

Definition at line 410 of file asn1.h.

#define sizeofOID (   oid)    ( 1 + 1 + ( int ) oid[ 1 ] )

Definition at line 263 of file asn1.h.

#define sizeofShortInteger (   value)
Value:
( ( ( value ) < 0x80 ) ? 3 : \
( ( ( long ) value ) < 0x8000L ) ? 4 : \
( ( ( long ) value ) < 0x800000L ) ? 5 : \
( ( ( long ) value ) < 0x80000000UL ) ? 6 : 7 )

Definition at line 356 of file asn1.h.

#define sizeofUTCTime ( )    ( 1 + 1 + 13 )

Definition at line 480 of file asn1.h.

#define WILDCARD_OID
Value:
( const BYTE * ) \
"\xFF\x0E\xFF\x00\xFF\x00\xFF\x00\xFF\x00\xFF\x00\xFF\x00\xFF\x00"

Definition at line 174 of file asn1.h.

#define WILDCARD_OID_SIZE   16

Definition at line 176 of file asn1.h.

#define writeBignum (   stream,
  bignum 
)    writeBignumTag( stream, bignum, DEFAULT_TAG )

Definition at line 339 of file asn1.h.

#define writeCtag0Indef (   stream)    swrite( stream, BER_CTAG0_INDEF, 2 )

Definition at line 189 of file asn1.h.

#define writeEndIndef (   stream)    swrite( stream, BER_END_INDEF, 2 )

Definition at line 190 of file asn1.h.

#define writeOctetStringIndef (   stream)    swrite( stream, BER_OCTETSTRING_INDEF, 2 )

Definition at line 186 of file asn1.h.

#define writeOID (   stream,
  oid 
)    swrite( ( stream ), ( oid ), sizeofOID( oid ) )

Definition at line 287 of file asn1.h.

#define writeRawObject (   stream,
  object,
  size 
)    swrite( stream, object, size )

Definition at line 234 of file asn1.h.

#define writeSequenceIndef (   stream)    swrite( stream, BER_SEQUENCE_INDEF, 2 )

Definition at line 187 of file asn1.h.

#define writeSetIndef (   stream)    swrite( stream, BER_SET_INDEF, 2 )

Definition at line 188 of file asn1.h.

#define writeTag (   stream,
  tag 
)    sputc( stream, tag )

Definition at line 210 of file asn1.h.

Enumeration Type Documentation

anonymous enum
Enumerator:
BER_ID_RESERVED 
BER_ID_BOOLEAN 
BER_ID_INTEGER 
BER_ID_BITSTRING 
BER_ID_OCTETSTRING 
BER_ID_NULL 
BER_ID_OBJECT_IDENTIFIER 
BER_ID_OBJECT_DESCRIPTOR 
BER_ID_EXTERNAL 
BER_ID_REAL 
BER_ID_ENUMERATED 
BER_ID_EMBEDDED_PDV 
BER_ID_STRING_UTF8 
BER_ID_13 
BER_ID_14 
BER_ID_15 
BER_ID_SEQUENCE 
BER_ID_SET 
BER_ID_STRING_NUMERIC 
BER_ID_STRING_PRINTABLE 
BER_ID_STRING_T61 
BER_ID_STRING_VIDEOTEX 
BER_ID_STRING_IA5 
BER_ID_TIME_UTC 
BER_ID_TIME_GENERALIZED 
BER_ID_STRING_GRAPHIC 
BER_ID_STRING_ISO646 
BER_ID_STRING_GENERAL 
BER_ID_STRING_UNIVERSAL 
BER_ID_29 
BER_ID_STRING_BMP 
BER_ID_LAST 

Definition at line 43 of file asn1.h.

Function Documentation

RETVAL IN_ARRAY ( noOidSelectionEntries  ) const
RETVAL IN_BUFFER ( oidLength  ) const
RETVAL IN_BUFFER ( integerLength  ) const
RETVAL IN_BUFFER ( length  ) const
CHECK_RETVAL IN_LENGTH_SHORT_MIN ( ) const
RETVAL IN_LENGTH_SHORT_MIN ( ) const
CHECK_RETVAL OUT_BUFFER_ALLOC_OPT length void OUT_LENGTH_Z int IN_LENGTH_SHORT_MIN ( 16  ) const
CHECK_RETVAL IN_RANGE ( ,
50   
) const
RETVAL IN_RANGE ( ,
999   
) const
CHECK_RETVAL OUT_BUFFER ( bufferMaxLength  ,
bufferLength 
)
RETVAL OUT_BUFFER ( oidMaxLength  ,
oidLength 
)
RETVAL OUT_BUFFER ( maxLength  ,
stringLength 
)
RETVAL OUT_BUFFER ( stringMaxLength  ,
stringLength 
)
RETVAL OUT_BUFFER_OPT ( integerMaxLength  ,
integerLength 
)
RETVAL OUT_RANGE ( CRYPT_ERROR  ,
noOidSelectionEntries   
)
RETVAL_RANGE ( MAX_ERROR  ,
TRUE   
)

Definition at line 373 of file asn1_rd.c.

RETVAL_RANGE ( MAX_ERROR  ,
0xFF   
)

Definition at line 354 of file asn1_rd.c.

RETVAL_RANGE ( MAX_ERROR  ,
MAX_INTLENGTH   
) const
RETVAL_RANGE ( MAX_ERROR  ,
MAX_INTLENGTH_SHORT   
) const
RETVAL STDC_NONNULL_ARG ( (1)  )

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Definition at line 26 of file ctx_attr.c.

CHECK_RETVAL STDC_NONNULL_ARG ( (1, 2, 4)  )
RETVAL STDC_NONNULL_ARG ( (1, 2)  )
RETVAL STDC_NONNULL_ARG ( (1, 4)  )
RETVAL STDC_NONNULL_ARG ( (1, 2, 3)  )
CHECK_RETVAL STDC_NONNULL_ARG ( (1, 3)  ) const
CHECK_RETVAL INOUT TYPECAST ( BIGNUM )
int writeBignumTag ( INOUT STREAM stream,
const void *  bignum,
const int  tag 
)

Variable Documentation

CHECK_RETVAL INOUT void* bignum

Definition at line 328 of file asn1.h.

RETVAL OUT_OPT_INT_Z int * bitString

Definition at line 466 of file asn1.h.

Definition at line 396 of file asn1.h.

CHECK_RETVAL OUT_LENGTH_SHORT_Z int* bufferLength

Definition at line 231 of file asn1.h.

RETVAL OUT_OPT_INT_Z int* enumeration

Definition at line 384 of file asn1.h.

RETVAL IN_INT const long integer

Definition at line 363 of file asn1.h.

CHECK_RETVAL OUT_LENGTH_PKC_Z int * integerLength

Definition at line 304 of file asn1.h.

RETVAL IN_LENGTH_SHORT const int integerMaxLength

Definition at line 304 of file asn1.h.

Definition at line 570 of file asn1.h.

Definition at line 425 of file asn1.h.

Definition at line 328 of file asn1.h.

Definition at line 328 of file asn1.h.

Definition at line 328 of file asn1.h.

CHECK_RETVAL IN_LENGTH const long objectLength

Definition at line 592 of file asn1.h.

Definition at line 578 of file asn1.h.

Definition at line 578 of file asn1.h.

RETVAL OUT_LENGTH_SHORT_Z int* oidLength

Definition at line 280 of file asn1.h.

RETVAL OUT_OPT_PTR_OPT const OID_INFO** oidSelectionValue

Definition at line 276 of file asn1.h.

RETVAL IN_LENGTH_SHORT const int stringLength

Definition at line 430 of file asn1.h.

RETVAL IN_LENGTH_SHORT const int stringMaxLength

Definition at line 453 of file asn1.h.

Definition at line 231 of file asn1.h.

RETVAL const time_t timeVal

Definition at line 482 of file asn1.h.

Definition at line 367 of file asn1.h.