asn1ber.h File Reference

#include "rtsrc/asn1type.h"
#include "rtbersrc/berMacros.h"
#include "rtxsrc/rtxBuffer.h"

Go to the source code of this file.

Defines

#define xd_utf8str(pctxt, object_p, tagging, length)   xd_charstr (pctxt, (const char**)object_p, tagging, ASN_ID_UTF8String, length)
#define xd_indeflen(m)   xd_indeflen_ex(m, INT_MAX)
#define xe_utf8str(pctxt, object_p, tagging)   xe_charstr (pctxt, (const char*)object_p, tagging, ASN_ID_UTF8String)
#define xu_addTagErrParm   berErrAddTagParm
#define xu_hex_dump(msg, numoct, hdr)   rtxHexDump(msg,numoct)

Typedefs

typedef OSRTBufLocDescr Asn1BufLocDescr

Functions

int xd_tag (OSCTXT *pctxt, ASN1TAG *tag_p)
int xd_tag_len (OSCTXT *pctxt, ASN1TAG *tag_p, int *len_p, OSOCTET flags)
int xd_tag_len_64 (OSCTXT *pctxt, ASN1TAG *tag_p, OSSIZE *len_p, OSBOOL *pIndefLen, OSOCTET flags)
int xd_match (OSCTXT *pctxt, ASN1TAG tag, int *len_p, OSOCTET flags)
int xd_match64 (OSCTXT *pctxt, ASN1TAG tag, OSSIZE *len_p, OSBOOL *pindef, OSOCTET flags)
int xd_boolean (OSCTXT *pctxt, OSBOOL *object_p, ASN1TagType tagging, int length)
int xd_integer (OSCTXT *pctxt, OSINT32 *object_p, ASN1TagType tagging, int length)
int xd_int8 (OSCTXT *pctxt, OSINT8 *object_p, ASN1TagType tagging, int length)
int xd_int16 (OSCTXT *pctxt, OSINT16 *object_p, ASN1TagType tagging, int length)
int xd_unsigned (OSCTXT *pctxt, OSUINT32 *object_p, ASN1TagType tagging, int length)
int xd_uint8 (OSCTXT *pctxt, OSUINT8 *object_p, ASN1TagType tagging, int length)
int xd_uint16 (OSCTXT *pctxt, OSUINT16 *object_p, ASN1TagType tagging, int length)
int xd_int64 (OSCTXT *pctxt, OSINT64 *object_p, ASN1TagType tagging, int length)
int xd_uint64 (OSCTXT *pctxt, OSUINT64 *object_p, ASN1TagType tagging, int length)
int xd_bigint (OSCTXT *pctxt, const char **object_p, ASN1TagType tagging, int length)
int xd_bitstr_s (OSCTXT *pctxt, OSOCTET *object_p, OSUINT32 *numbits_p, ASN1TagType tagging, int length)
int xd_bitstr64_s (OSCTXT *pctxt, OSOCTET *object_p, OSSIZE *numbits_p, ASN1TagType tagging, OSSIZE length, OSBOOL indefLen)
int xd_bitstr (OSCTXT *pctxt, const OSOCTET **object_p2, OSUINT32 *numbits_p, ASN1TagType tagging, int length)
int xd_bitstr64 (OSCTXT *pctxt, const OSOCTET **object_p2, OSSIZE *numbits_p, ASN1TagType tagging, OSSIZE length, OSBOOL indefLen)
int xd_octstr_s (OSCTXT *pctxt, OSOCTET *object_p, OSUINT32 *pnumocts, ASN1TagType tagging, int length)
int xd_octstr64_s (OSCTXT *pctxt, OSOCTET *object_p, OSSIZE *pnumocts, ASN1TagType tagging, OSSIZE length, OSBOOL indefLen)
int xd_octstr (OSCTXT *pctxt, const OSOCTET **object_p2, OSUINT32 *pnumocts, ASN1TagType tagging, int length)
int xd_octstr64 (OSCTXT *pctxt, OSOCTET **object_p2, OSSIZE *pnumocts, ASN1TagType tagging, OSSIZE length, OSBOOL indefLen)
int xd_charstr (OSCTXT *pctxt, const char **object_p, ASN1TagType tagging, ASN1TAG tag, int length)
int xd_charstr64 (OSCTXT *pctxt, char **object_p, ASN1TagType tagging, ASN1TAG tag, OSSIZE length, OSBOOL indefLen)
int xd_datestr (OSCTXT *pctxt, const char **object_p, ASN1TagType tagging, ASN1TAG tag, int length)
int xd_timestr (OSCTXT *pctxt, const char **object_p, ASN1TagType tagging, ASN1TAG tag, int length)
int xd_datetimestr (OSCTXT *pctxt, const char **object_p, ASN1TagType tagging, ASN1TAG tag, int length)
int xd_timeofdaystr (OSCTXT *pctxt, const char **object_p, ASN1TagType tagging, ASN1TAG tag, int length)
int xd_durationstr (OSCTXT *pctxt, const char **object_p, ASN1TagType tagging, ASN1TAG tag, int length)
int berDecCharArray (OSCTXT *pctxt, char *charArray, OSSIZE arraySize, ASN1TagType tagging, ASN1TAG tag, int length)
int xd_16BitCharStr (OSCTXT *pctxt, Asn116BitCharString *object_p, ASN1TagType tagging, ASN1TAG tag, int length)
int xd_16BitCharStr64 (OSCTXT *pctxt, Asn116BitCharString *object_p, ASN1TagType tagging, ASN1TAG tag, OSSIZE length, OSBOOL indefLen)
int xd_32BitCharStr (OSCTXT *pctxt, Asn132BitCharString *object_p, ASN1TagType tagging, ASN1TAG tag, int length)
int xd_32BitCharStr64 (OSCTXT *pctxt, Asn132BitCharString *object_p, ASN1TagType tagging, ASN1TAG tag, OSSIZE length, OSBOOL indefLen)
int xd_null (OSCTXT *pctxt, ASN1TagType tagging)
int xd_objid (OSCTXT *pctxt, ASN1OBJID *object_p, ASN1TagType tagging, int length)
int xd_oid64 (OSCTXT *pctxt, ASN1OID64 *object_p, ASN1TagType tagging, int length)
int xd_reloid (OSCTXT *pctxt, ASN1OBJID *object_p, ASN1TagType tagging, int length)
int xd_real (OSCTXT *pctxt, OSREAL *object_p, ASN1TagType tagging, int length)
int xd_enum (OSCTXT *pctxt, OSINT32 *object_p, ASN1TagType tagging, int length)
int xd_enumUnsigned (OSCTXT *pctxt, OSUINT32 *object_p, ASN1TagType tagging, int length)
int xd_OpenType (OSCTXT *pctxt, const OSOCTET **object_p2, OSSIZE *pnumocts)
int xd_OpenTypeExt (OSCTXT *pctxt, ASN1CCB *ccb_p, ASN1TAG *tags, int tagCount, OSRTDList *pElemList)
int xd_OpenTypeExt64 (OSCTXT *pctxt, const OSOCTET *consptr, OSSIZE conslen, OSBOOL indefLen, ASN1TAG *tags, OSSIZE tagCount, OSRTDList *pElemList)
int xd_OpenTypeAppend (OSCTXT *pctxt, OSRTDList *pElemList)
int xd_real10 (OSCTXT *pctxt, const char **object_p, ASN1TagType tagging, int length)
int xd_setp (OSCTXT *pctxt, const OSOCTET *msg_p, int msglen, ASN1TAG *tag_p, int *len_p)
int xd_setp64 (OSCTXT *pctxt, const OSOCTET *msg_p, OSSIZE msglen, ASN1TAG *tag_p, OSSIZE *len_p, OSBOOL *pIndefLen)
int xd_indeflen_ex (const OSOCTET *msg_p, int bufSize)
int xd_indeflen64 (const OSOCTET *msg_p, OSSIZE bufSize, OSSIZE *plength)
int xd_len (OSCTXT *pctxt, int *len_p)
int xd_len64 (OSCTXT *pctxt, OSSIZE *len_p, OSBOOL *pindef)
OSBOOL xd_chkend (OSCTXT *pctxt, const ASN1CCB *ccb_p)
OSBOOL xd_chkend64 (OSCTXT *pctxt, const OSOCTET *consptr, OSSIZE conslen, OSBOOL indef)
int xd_count (OSCTXT *pctxt, int length, int *count_p)
int xd_count64 (OSCTXT *pctxt, OSSIZE length, OSBOOL indefLen, OSSIZE *count_p)
int xd_NextElement (OSCTXT *pctxt)
int xd_Tag1AndLen (OSCTXT *pctxt, OSINT32 *len_p)
int xd_memcpy (OSCTXT *pctxt, OSOCTET *object_p, int length)
int xd_match1 (OSCTXT *pctxt, OSOCTET tag, int *len_p)
int xd_match1_64 (OSCTXT *pctxt, OSOCTET tag, OSSIZE *len_p, OSBOOL *pindef)
int xdf_tag (FILE *fp, ASN1TAG *ptag, OSOCTET *buffer, int *pbufidx)
int xdf_len (FILE *fp, OSINT32 *plen, OSOCTET *buffer, int *pbufidx)
int xdf_TagAndLen (FILE *fp, ASN1TAG *ptag, OSINT32 *plen, OSOCTET *buffer, int *pbufidx)
int xdf_ReadPastEOC (FILE *fp, OSOCTET *buffer, int bufsiz, int *pbufidx)
int xdf_ReadContents (FILE *fp, int len, OSOCTET *buffer, int bufsiz, int *pbufidx)
int xe_identifier (OSCTXT *pctxt, OSUINT32 ident)
int xe_tag (OSCTXT *pctxt, ASN1TAG tag)
int xe_tag_len (OSCTXT *pctxt, ASN1TAG tag, int length)
int xe_boolean (OSCTXT *pctxt, OSBOOL *object_p, ASN1TagType tagging)
int xe_integer (OSCTXT *pctxt, int *object_p, ASN1TagType tagging)
int xe_unsigned (OSCTXT *pctxt, OSUINT32 *object_p, ASN1TagType tagging)
int xe_int8 (OSCTXT *pctxt, OSINT8 *object_p, ASN1TagType tagging)
int xe_int16 (OSCTXT *pctxt, OSINT16 *object_p, ASN1TagType tagging)
int xe_int64 (OSCTXT *pctxt, OSINT64 *object_p, ASN1TagType tagging)
int xe_uint64 (OSCTXT *pctxt, OSUINT64 *object_p, ASN1TagType tagging)
int xe_uint8 (OSCTXT *pctxt, OSUINT8 *object_p, ASN1TagType tagging)
int xe_uint16 (OSCTXT *pctxt, OSUINT16 *object_p, ASN1TagType tagging)
int xe_bigint (OSCTXT *pctxt, const char *object_p, ASN1TagType tagging)
int xe_bitstr (OSCTXT *pctxt, const OSOCTET *object_p, OSSIZE numbits, ASN1TagType tagging)
int xe_octstr (OSCTXT *pctxt, const OSOCTET *object_p, OSSIZE numocts, ASN1TagType tagging)
int xe_charstr (OSCTXT *pctxt, const char *object_p, ASN1TagType tagging, ASN1TAG tag)
int xe_16BitCharStr (OSCTXT *pctxt, Asn116BitCharString *object_p, ASN1TagType tagging, ASN1TAG tag)
int xe_32BitCharStr (OSCTXT *pctxt, Asn132BitCharString *object_p, ASN1TagType tagging, ASN1TAG tag)
int xe_datestr (OSCTXT *pctxt, const char *object_p, ASN1TagType tagging, ASN1TAG tag)
int xe_timestr (OSCTXT *pctxt, const char *object_p, ASN1TagType tagging, ASN1TAG tag)
int xe_datetimestr (OSCTXT *pctxt, const char *object_p, ASN1TagType tagging, ASN1TAG tag)
int xe_timeofdaystr (OSCTXT *pctxt, const char *object_p, ASN1TagType tagging, ASN1TAG tag)
int xe_durationstr (OSCTXT *pctxt, const char *object_p, ASN1TagType tagging, ASN1TAG tag)
int xe_null (OSCTXT *pctxt, ASN1TagType tagging)
int xe_objid (OSCTXT *pctxt, ASN1OBJID *object_p, ASN1TagType tagging)
int xe_oid64 (OSCTXT *pctxt, ASN1OID64 *object_p, ASN1TagType tagging)
int xe_reloid (OSCTXT *pctxt, ASN1OBJID *object_p, ASN1TagType tagging)
int xe_enum (OSCTXT *pctxt, OSINT32 *object_p, ASN1TagType tagging)
int xe_enumUnsigned (OSCTXT *pctxt, OSUINT32 *object_p, ASN1TagType tagging)
int xe_real (OSCTXT *pctxt, OSREAL *object_p, ASN1TagType tagging)
int xe_OpenType (OSCTXT *pctxt, const OSOCTET *object_p, OSSIZE numocts)
int xe_OpenTypeExt (OSCTXT *pctxt, OSRTDList *pElemList)
int xe_real10 (OSCTXT *pctxt, const char *object_p, ASN1TagType tagging)
int xe_derReal10 (OSCTXT *pctxt, const char *object_p, ASN1TagType tagging)
int xe_setp (OSCTXT *pctxt, OSOCTET *buf_p, int bufsiz)
OSOCTET * xe_getp (OSCTXT *pctxt)
void xe_free (OSCTXT *pctxt)
int xe_expandBuffer (OSCTXT *pctxt, size_t length)
int xe_memcpy (OSCTXT *pctxt, const OSOCTET *object_p, size_t length)
int xe_len (OSCTXT *pctxt, int length)
int xe_derCanonicalSort (OSCTXT *pctxt, OSRTSList *pList)
int xe_TagAndIndefLen (OSCTXT *pctxt, ASN1TAG tag, int length)
void xe_getBufLocDescr (OSCTXT *pctxt, OSSIZE length, Asn1BufLocDescr *pDescr)
int derEncBitString (OSCTXT *pctxt, const OSOCTET *pvalue, OSUINT32 numbits, ASN1TagType tagging)
int berDefToIndefLen (OSCTXT *pSrcCtxt, OSCTXT *pDstCtxt)
int berIndefToDefLen (OSCTXT *pSrcCtxt, OSCTXT *pDstCtxt)
OSBOOL berErrAddTagParm (OSCTXT *pctxt, ASN1TAG tag)
int berErrUnexpTag (OSCTXT *pctxt, ASN1TAG exptag)
int berGetLibVersion (OSVOIDARG)
const char * berGetLibInfo (OSVOIDARG)
int berParseTagLen (const OSOCTET *buffer, size_t bufidx, size_t bufsiz, ASN1TAG *ptag, size_t *plen)
const char * berTagToString (ASN1TAG tag, char *buffer, size_t bufsiz)
const char * berTagToDynStr (OSCTXT *pctxt, ASN1TAG tag)
int berValidateIso8601DateStr (OSCTXT *pctxt, const char **ppvalue)
int berValidateIso8601DurationStr (OSCTXT *pctxt, const char **ppvalue)
int berValidateIso8601TimeStr (OSCTXT *pctxt, const char **ppvalue)
int xu_verify_len (OSOCTET *msg_p)
void * xu_parse_mmbuf (OSOCTET **buf_p2, int *buflen_p, OSOCTET *start_p, int bufsiz)
void xu_alloc_array (OSCTXT *pctxt, ASN1SeqOf *seqOf_p, int recSize, int recCount)
void xu_octscpy_s (OSUINT32 *nocts_p, OSOCTET *data_p, char *cstr, char zterm)
void xu_octscpy_ss (ASN1OctStr *octStr_p, char *cstring, char zterm)
void xu_octscpy_d (OSCTXT *pctxt, OSUINT32 *nocts_p, const OSOCTET **data_p2, char *cstring, char zterm)
void xu_octscpy_ds (OSCTXT *pctxt, ASN1DynOctStr *octStr_p, char *cstring, char zterm)
void xu_octmcpy_s (ASN1OctStr *octStr_p, void *data_p, int datalen)
void xu_octmcpy_d (OSCTXT *pctxt, ASN1DynOctStr *octStr_p, void *data_p, int datalen)
char * xu_fetchstr (int numocts, char *data)
int xu_hexstrcpy (char *data, char *hstring)
int xu_binstrcpy (char *data, char *bstring)
int xu_dump (const OSOCTET *msgptr, ASN1DumpCbFunc cb, void *cbArg_p)
int xu_fdump (FILE *file_p, const OSOCTET *msgptr)
int xu_dump2 (OSCTXT *pctxt, const OSOCTET *msgptr)
void xu_fmt_tag (ASN1TAG *tag_p, char *class_p, char *form_p, char *id_code)
char * xu_fmt_tag2 (ASN1TAG *tag_p, char *bufp)
char * xu_fmt_contents (OSCTXT *pctxt, int len, int *count)
int xu_fread (FILE *fp, OSOCTET *bufp, int bufsiz)
void xu_SaveBufferState (OSCTXT *pCtxt, OSRTBufSave *pSavedInfo)
void xu_RestoreBufferState (OSCTXT *pCtxt, OSRTBufSave *pSavedInfo)
int xd_MovePastEOC (OSCTXT *pctxt)
int xd_consStrIndefLenAndSize (OSCTXT *pctxt, ASN1TAG expectedTag, OSSIZE *length, OSSIZE *size)

Detailed Description

ASN.1 runtime constants, data structure definitions, and functions to support the Basic Encoding Rules (BER) and Distinguished Encoding Rules (DER) as defined in the ITU-T X.690 standard.