ASN1C BER Runtime
ASN1C v7.4.x
|
Functions | |
int | berDecStrmBMPStr (OSCTXT *pctxt, Asn116BitCharString *object_p, ASN1TagType tagging, int length) |
int | berDecStrmBigInt (OSCTXT *pctxt, const char **object_p, ASN1TagType tagging, int length) |
int | berDecStrmBigEnum (OSCTXT *pctxt, const char **object_p, ASN1TagType tagging, int length) |
int | berDecStrmBitStr (OSCTXT *pctxt, OSOCTET *pvalue, OSUINT32 *pnbits, ASN1TagType tagging, int length) |
int | berDecStrmBool (OSCTXT *pctxt, OSBOOL *object_p, ASN1TagType tagging, int length) |
int | berDecStrmCharStr (OSCTXT *pctxt, const char **ppvalue, ASN1TagType tagging, ASN1TAG tag, int length) |
int | berDecStrmCharArray (OSCTXT *pctxt, char *charArray, OSSIZE arraySize, ASN1TagType tagging, ASN1TAG tag, int length) |
int | berDecStrmDateStr (OSCTXT *pctxt, const char **ppvalue, ASN1TagType tagging, ASN1TAG tag, int length) |
int | berDecStrmDateTimeStr (OSCTXT *pctxt, const char **ppvalue, ASN1TagType tagging, ASN1TAG tag, int length) |
int | berDecStrmDurationStr (OSCTXT *pctxt, const char **ppvalue, ASN1TagType tagging, ASN1TAG tag, int length) |
int | berDecStrmTimeStr (OSCTXT *pctxt, const char **ppvalue, ASN1TagType tagging, ASN1TAG tag, int length) |
int | berDecStrmTimeOfDayStr (OSCTXT *pctxt, const char **ppvalue, ASN1TagType tagging, ASN1TAG tag, int length) |
OSBOOL | berDecStrmCheckEnd (OSCTXT *pctxt, ASN1CCB *pccb) |
int | berDecStrmDynBitStr (OSCTXT *pctxt, const OSOCTET **ppvalue, OSUINT32 *pnbits, ASN1TagType tagging, int length) |
int | berDecStrmDynBitStr64 (OSCTXT *pctxt, const OSOCTET **ppvalue, OSSIZE *pnbits, ASN1TagType tagging, OSSIZE length, OSBOOL indefLen) |
int | berDecStrmDynOctStr (OSCTXT *pctxt, const OSOCTET **ppvalue, OSUINT32 *pnocts, ASN1TagType tagging, int length) |
int | berDecStrmDynOctStr64 (OSCTXT *pctxt, OSOCTET **ppvalue, OSSIZE *pnocts, ASN1TagType tagging, OSSIZE length, OSBOOL indefLen) |
int | berDecStrmEnum (OSCTXT *pctxt, OSINT32 *object_p, ASN1TagType tagging, int length) |
int | berDecStrmFindTag (OSCTXT *pctxt, ASN1TAG tag, int *len_p, OSBOOL advance) |
int | berDecStrmFindTag2 (OSCTXT *pctxt, ASN1TAG tag, OSSIZE *len_p, OSBOOL *pIndefLen, OSBOOL advance) |
int | berDecStrmGetTLVLength (OSCTXT *pctxt) |
int | berDecStrmInt (OSCTXT *pctxt, OSINT32 *object_p, ASN1TagType tagging, int length) |
int | berDecStrmInt8 (OSCTXT *pctxt, OSINT8 *object_p, ASN1TagType tagging, int length) |
int | berDecStrmInt16 (OSCTXT *pctxt, OSINT16 *object_p, ASN1TagType tagging, int length) |
int | berDecStrmInt64 (OSCTXT *pctxt, OSINT64 *object_p, ASN1TagType tagging, int length) |
int | berDecStrmLength (OSCTXT *pctxt, int *len_p) |
int | berDecStrmLength2 (OSCTXT *pctxt, OSSIZE *pLength, OSBOOL *pIndefLen) |
int | berDecStrmMatchEOC (OSCTXT *pctxt) |
int | berDecStrmMatchTag (OSCTXT *pctxt, ASN1TAG tag, int *len_p, OSBOOL advance) |
int | berDecStrmMatchTag2 (OSCTXT *pctxt, ASN1TAG tag, OSSIZE *len_p, OSBOOL *pIndefLen, OSBOOL advance) |
int | berDecStrmNextElement (OSCTXT *pctxt) |
int | berDecStrmNull (OSCTXT *pctxt, ASN1TagType tagging) |
int | berDecStrmObjId (OSCTXT *pctxt, ASN1OBJID *object_p, ASN1TagType tagging, int length) |
int | berDecStrmObjId64 (OSCTXT *pctxt, ASN1OID64 *object_p, ASN1TagType tagging, int length) |
int | berDecStrmOctStr (OSCTXT *pctxt, OSOCTET *pvalue, OSUINT32 *pnocts, ASN1TagType tagging, int length) |
int | berDecStrmOpenType (OSCTXT *pctxt, const OSOCTET **object_p2, OSSIZE *pnumocts) |
int | berDecStrmOpenTypeAppend (OSCTXT *pctxt, OSRTDList *pElemList) |
int | berDecStrmOpenTypeExt (OSCTXT *pctxt, ASN1CCB *ccb_p, ASN1TAG *tags, int tagCount, OSRTDList *pElemList) |
int | berDecStrmPeekTagAndLen (OSCTXT *pctxt, ASN1TAG *ptag, int *plen) |
int | berDecStrmReadDynTLV (OSCTXT *pctxt, OSOCTET **ppbuf) |
int | berDecStrmReadTLV (OSCTXT *pctxt, OSOCTET *buf, OSSIZE bufsiz) |
int | berDecStrmReal (OSCTXT *pctxt, OSREAL *object_p, ASN1TagType tagging, int length) |
int | berDecStrmRealBin (OSCTXT *pctxt, OSREAL *object_p, ASN1TagType tagging, int length) |
int | berDecStrmRealDer (OSCTXT *pctxt, OSREAL *object_p, ASN1TagType tagging, int length) |
int | berDecStrmReal10 (OSCTXT *pctxt, const char **object_p, ASN1TagType tagging, int length) |
int | berDecStrmRelativeOID (OSCTXT *pctxt, ASN1OBJID *object_p, ASN1TagType tagging, int length) |
int | berDecStrmTag (OSCTXT *pctxt, ASN1TAG *tag_p) |
int | berDecStrmTagAndLen (OSCTXT *pctxt, ASN1TAG *tag_p, int *len_p) |
int | berDecStrmTagAndLen2 (OSCTXT *pctxt, ASN1TAG *tag_p, OSSIZE *len_p, OSBOOL *pIndefLen) |
OSBOOL | berDecStrmTestEOC (OSCTXT *pctxt, ASN1CCB *ccb_p) |
OSBOOL | berDecStrmTestEOC2 (OSCTXT *pctxt) |
int | berDecStrmTestTag (OSCTXT *pctxt, ASN1TAG tag, int *len_p, OSBOOL advance) |
int | berDecStrmUInt (OSCTXT *pctxt, OSUINT32 *object_p, ASN1TagType tagging, int length) |
int | berDecStrmUInt8 (OSCTXT *pctxt, OSUINT8 *object_p, ASN1TagType tagging, int length) |
int | berDecStrmUInt16 (OSCTXT *pctxt, OSUINT16 *object_p, ASN1TagType tagging, int length) |
int | berDecStrmUInt64 (OSCTXT *pctxt, OSUINT64 *object_p, ASN1TagType tagging, int length) |
int | berDecStrmUnivStr (OSCTXT *pctxt, Asn132BitCharString *object_p, ASN1TagType tagging, int length) |
The C streaming BER Decode Functions decode ASN.1 primitive data types directly from the input stream. The input stream should be initialized as buffered stream by using ::rtxStreamInit function. It also must be already opened by using any of the following functions: ::rtxStreamFileOpen, ::rtxStreamFileAttach, ::rtxStreamSocketAttach, ::rtxStreamMemoryCreate, ::rtxStreamMemoryAttach.
int berDecStrmBigInt | ( | OSCTXT * | pctxt, |
const char ** | object_p, | ||
ASN1TagType | tagging, | ||
int | length | ||
) |
This function decodes a variable of the ASN.1 INTEGER type. In this case, the integer is assumed to be of a larger size than can fit in a C or C++ long type (normally 32 or 64 bits). For example, parameters used to calculate security values are typically larger than these sizes.
These variables are stored in character string constant variables. They are represented as hexadecimal strings starting with a "0x" prefix. If it is necessary to convert a hexadecimal string to another radix, then use the ::rtxBigIntSetStr / ::rtxBigIntToString functions.
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
object_p | Pointer to a character pointer variable to receive the decoded value. Dynamic memory is allocated for the variable using the ::rtxMemAlloc function. The decoded variable is represented as a hexadecimal string starting with a "0x" prefix. |
tagging | An enumerated type whose value is set to either 'ASN1EXPL' (for explicit tagging) or 'ASN1IMPL' (for implicit). Controls whether the universal tag value for this type is added or not. Users will generally always set this value to 'ASN1EXPL'. |
length | The length, in octets, of the contents field to be decoded. This parameter only has meaning if the tagging parameter specifies implicit decoding. If explicit, the length is obtained from the decoded length field. |
int berDecStrmBitStr | ( | OSCTXT * | pctxt, |
OSOCTET * | pvalue, | ||
OSUINT32 * | pnbits, | ||
ASN1TagType | tagging, | ||
int | length | ||
) |
This function decodes a variable of the ASN.1 BIT STRING type into a static memory structure. This function call is generated by ASN1C to decode a sized bit string production.
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
pvalue | Pointer to a variable to receive the decoded bit string. This is assumed to be a static array large enough to hold the number of bits specified in the *pnbits input parameter. |
pnbits | As input parameter it is a pointer to an integer variable containing the size (in bits) of the sized ASN.1 bit string. An error will occur if the number of bits in the decoded string is larger than this value. Note that this is also used as an output variable - the actual number of decoded bits will be returned in this variable. |
tagging | An enumerated type whose value is set to either 'ASN1EXPL' (for explicit tagging) or 'ASN1IMPL' (for implicit). Controls whether the universal tag value for this type is added or not. Users will generally always set this value to 'ASN1EXPL'. |
length | The length, in octets, of the contents field to be decoded. This parameter only has meaning if the tagging parameter specifies implicit decoding. If explicit, the length is obtained from the decoded length field. |
int berDecStrmBMPStr | ( | OSCTXT * | pctxt, |
Asn116BitCharString * | object_p, | ||
ASN1TagType | tagging, | ||
int | length | ||
) |
This function decodes a variable an ASN.1 16-bit character string type. This includes the BMPString type.
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
object_p | Pointer to a structure variable to receive the decoded string. The string is stored as an array of short integer characters. Memory is allocated for the string by the ::rtxMemAlloc function. |
tagging | An enumerated type whose value is set to either 'ASN1EXPL' (for explicit tagging) or 'ASN1IMPL' (for implicit). Controls whether the universal tag value for this type is added or not. Users will generally always set this value to 'ASN1EXPL'. |
length | The length, in octets, of the contents field to be decoded. This parameter only has meaning if the tagging parameter specifies implicit decoding. If explicit, the length is obtained from the decoded length field. |
int berDecStrmBool | ( | OSCTXT * | pctxt, |
OSBOOL * | object_p, | ||
ASN1TagType | tagging, | ||
int | length | ||
) |
This function decodes a variable of the ASN.1 BOOLEAN type.
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
object_p | Pointer to a variable to receive the decoded BOOLEAN value. |
tagging | An enumerated type whose value is set to either 'ASN1EXPL' (for explicit tagging) or 'ASN1IMPL' (for implicit). Controls whether the universal tag value for this type is added or not. Users will generally always set this value to 'ASN1EXPL'. |
length | The length, in octets, of the contents field to be decoded. This parameter only has meaning if the tagging parameter specifies implicit decoding. If explicit, the length is obtained from the decoded length field. |
int berDecStrmCharArray | ( | OSCTXT * | pctxt, |
char * | charArray, | ||
OSSIZE | arraySize, | ||
ASN1TagType | tagging, | ||
ASN1TAG | tag, | ||
int | length | ||
) |
This function is the base function for decoding any of the 8-bit character string useful types such as IA5String, VisibleString, etc. This function decodes the character string into a static array variable.
pctxt | Pointer to ASN.1 context block structure |
charArray | Static character array variable (char[]) large enough to hold decoded data plus a null-termination byte. If the array is not large enoungh, an RTERR_TOOBIG error status will be returned. |
arraySize | Size (in bytes) of the charArray variable. |
tagging | Specifies whether element is implicitly or explicitly tagged. |
tag | Tag variable to match |
length | Length of data to retrieve. Valid for implicit case only. |
int berDecStrmCharStr | ( | OSCTXT * | pctxt, |
const char ** | ppvalue, | ||
ASN1TagType | tagging, | ||
ASN1TAG | tag, | ||
int | length | ||
) |
This function decodes a variable of one of the ASN.1 8-bit character string types. These types include IA5String, VisibleString, PrintableString, and NumericString.
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
ppvalue | Pointer to a character string pointer variable to receive the decoded string. The string is stored as a standard null-terminated C string. Memory is allocated for the string by the ::rtxMemAlloc function. |
tagging | An enumerated type whose value is set to either 'ASN1EXPL' (for explicit tagging) or 'ASN1IMPL' (for implicit). Controls whether the universal tag value for this type is added or not. Users will generally always set this value to 'ASN1EXPL'. |
tag | The ASN.1 tag to be decoded. This parameter is passed using the ASN1C internal tag representation. It is passed as an unsigned 32-bit integer. This parameter only has meaning if the tagging parameter specifies explicit decoding. |
length | The length, in octets, of the contents field to be decoded. This parameter only has meaning if the tagging parameter specifies implicit decoding. If explicit, the length is obtained from the decoded length field. |
OSBOOL berDecStrmCheckEnd | ( | OSCTXT * | pctxt, |
ASN1CCB * | pccb | ||
) |
This function tests for the end of a constructed context. It is used in loop control statements to determine when a block of repeating elements has ended.
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
pccb | Pointer to a 'context control block' structure. This is basically a loop control mechanism to keep the variable associated with parsing a nested constructed element straight. |
int berDecStrmDateStr | ( | OSCTXT * | pctxt, |
const char ** | ppvalue, | ||
ASN1TagType | tagging, | ||
ASN1TAG | tag, | ||
int | length | ||
) |
This function decodes a variable of one of the ASN.1 ISO 8601 Date character string types.
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
ppvalue | Pointer to a character string pointer variable to receive the decoded string. The string is stored as a standard null-terminated C string. Memory is allocated for the string by the ::rtxMemAlloc function. |
tagging | An enumerated type whose value is set to either 'ASN1EXPL' (for explicit tagging) or 'ASN1IMPL' (for implicit). Controls whether the universal tag value for this type is added or not. Users will generally always set this value to 'ASN1EXPL'. |
tag | The ASN.1 tag to be decoded. This parameter is passed using the ASN1C internal tag representation. It is passed as an unsigned 32-bit integer. This parameter only has meaning if the tagging parameter specifies explicit decoding. |
length | The length, in octets, of the contents field to be decoded. This parameter only has meaning if the tagging parameter specifies implicit decoding. If explicit, the length is obtained from the decoded length field. |
int berDecStrmDateTimeStr | ( | OSCTXT * | pctxt, |
const char ** | ppvalue, | ||
ASN1TagType | tagging, | ||
ASN1TAG | tag, | ||
int | length | ||
) |
This function decodes a variable of one of the ASN.1 ISO 8601 Date/Time character string types.
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
ppvalue | Pointer to a character string pointer variable to receive the decoded string. The string is stored as a standard null-terminated C string. Memory is allocated for the string by the ::rtxMemAlloc function. |
tagging | An enumerated type whose value is set to either 'ASN1EXPL' (for explicit tagging) or 'ASN1IMPL' (for implicit). Controls whether the universal tag value for this type is added or not. Users will generally always set this value to 'ASN1EXPL'. |
tag | The ASN.1 tag to be decoded. This parameter is passed using the ASN1C internal tag representation. It is passed as an unsigned 32-bit integer. This parameter only has meaning if the tagging parameter specifies explicit decoding. |
length | The length, in octets, of the contents field to be decoded. This parameter only has meaning if the tagging parameter specifies implicit decoding. If explicit, the length is obtained from the decoded length field. |
int berDecStrmDurationStr | ( | OSCTXT * | pctxt, |
const char ** | ppvalue, | ||
ASN1TagType | tagging, | ||
ASN1TAG | tag, | ||
int | length | ||
) |
This function decodes a variable of one of the ASN.1 ISO 8601 Duration character string types.
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
ppvalue | Pointer to a character string pointer variable to receive the decoded string. The string is stored as a standard null-terminated C string. Memory is allocated for the string by the ::rtxMemAlloc function. |
tagging | An enumerated type whose value is set to either 'ASN1EXPL' (for explicit tagging) or 'ASN1IMPL' (for implicit). Controls whether the universal tag value for this type is added or not. Users will generally always set this value to 'ASN1EXPL'. |
tag | The ASN.1 tag to be decoded. This parameter is passed using the ASN1C internal tag representation. It is passed as an unsigned 32-bit integer. This parameter only has meaning if the tagging parameter specifies explicit decoding. |
length | The length, in octets, of the contents field to be decoded. This parameter only has meaning if the tagging parameter specifies implicit decoding. If explicit, the length is obtained from the decoded length field. |
int berDecStrmDynBitStr | ( | OSCTXT * | pctxt, |
const OSOCTET ** | ppvalue, | ||
OSUINT32 * | pnbits, | ||
ASN1TagType | tagging, | ||
int | length | ||
) |
This function decodes a variable of the ASN.1 BIT STRING type. It will allocate dynamic memory to store the decoded result.
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
ppvalue | Pointer to a pointer variable to receive the decoded bit string. Dynamic memory is allocated to hold the string. |
pnbits | Pointer to an integer value to receive the decoded number of bits. |
tagging | An enumerated type whose value is set to either 'ASN1EXPL' (for explicit tagging) or 'ASN1IMPL' (for implicit). Controls whether the universal tag value for this type is added or not. Users will generally always set this value to 'ASN1EXPL'. |
length | The length, in octets, of the contents field to be decoded. This parameter only has meaning if the tagging parameter specifies implicit decoding. If explicit, the length is obtained from the decoded length field. |
int berDecStrmDynBitStr64 | ( | OSCTXT * | pctxt, |
const OSOCTET ** | ppvalue, | ||
OSSIZE * | pnbits, | ||
ASN1TagType | tagging, | ||
OSSIZE | length, | ||
OSBOOL | indefLen | ||
) |
64-bit version of berDecStrmDynBitStr.
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
ppvalue | Pointer to a pointer variable to receive the decoded bit string. Dynamic memory is allocated to hold the string. |
pnbits | Pointer to an integer value to receive the decoded number of bits. |
tagging | An enumerated type whose value is set to either 'ASN1EXPL' (for explicit tagging) or 'ASN1IMPL' (for implicit). Controls whether the universal tag value for this type is added or not. Users will generally always set this value to 'ASN1EXPL'. |
length | The length, in octets, of the contents field to be decoded. This parameter only has meaning if the tagging parameter specifies implicit decoding. If explicit, the length is obtained from the decoded length field. |
indefLen | Boolean indicating component is indefinite length. |
int berDecStrmDynOctStr | ( | OSCTXT * | pctxt, |
const OSOCTET ** | ppvalue, | ||
OSUINT32 * | pnocts, | ||
ASN1TagType | tagging, | ||
int | length | ||
) |
This function decodes a variable of the ASN.1 OCTET STRING type. It will allocate dynamic memory to store the decoded result.
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
ppvalue | Pointer to a pointer variable to receive the decoded octet string. Dynamic memory is allocated to hold the string. |
pnocts | Pointer to an integer value to receive the decoded number of octets. |
tagging | An enumerated type whose value is set to either 'ASN1EXPL' (for explicit tagging) or 'ASN1IMPL' (for implicit). Controls whether the universal tag value for this type is added or not. Users will generally always set this value to 'ASN1EXPL'. |
length | The length, in octets, of the contents field to be decoded. This parameter only has meaning if the tagging parameter specifies implicit decoding. If explicit, the length is obtained from the decoded length field. |
int berDecStrmDynOctStr64 | ( | OSCTXT * | pctxt, |
OSOCTET ** | ppvalue, | ||
OSSIZE * | pnocts, | ||
ASN1TagType | tagging, | ||
OSSIZE | length, | ||
OSBOOL | indefLen | ||
) |
This version of berDecStrmDynOctStr provides true 64-bit support by using an OSSIZE type (by default, an abstraction for size_t) to hold the decoded number of octets. On 64-bit systems, this will be a 64-bit number. This also fixes the issue of using a const pointer for the returned data since the variable is mutable.
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
ppvalue | A pointer to a pointer (**) to hold the address of a byte buffer to receive decoded OCTET STRING content. |
pnocts | Pointer to an integer value to receive the decoded number of octets. |
tagging | An enumerated type whose value is set to either 'ASN1EXPL' (for explicit tagging) or 'ASN1IMPL' (for implicit). Controls whether the universal tag value for this type is added or not. Users will generally always set this value to 'ASN1EXPL'. |
length | The length, in octets, of the contents field to be decoded. This parameter only has meaning if the tagging parameter specifies implicit decoding. If explicit, the length is obtained from the decoded length field. |
indefLen | Boolean indicating component is indefinite length. |
int berDecStrmEnum | ( | OSCTXT * | pctxt, |
OSINT32 * | object_p, | ||
ASN1TagType | tagging, | ||
int | length | ||
) |
This function decodes a variable of the ASN.1 ENUMERATED type.
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
object_p | Pointer to a variable to receive the decoded enumerated value. |
tagging | An enumerated type whose value is set to either 'ASN1EXPL' (for explicit tagging) or 'ASN1IMPL' (for implicit). Controls whether the universal tag value for this type is added or not. Users will generally always set this value to 'ASN1EXPL'. |
length | The length, in octets, of the contents field to be decoded. This parameter only has meaning if the tagging parameter specifies implicit decoding. If explicit, the length is obtained from the decoded length field. |
int berDecStrmFindTag | ( | OSCTXT * | pctxt, |
ASN1TAG | tag, | ||
int * | len_p, | ||
OSBOOL | advance | ||
) |
This function searches the stream being decoded for the first match of the given tag from the current stream position. If the tag is fount, the decode stream position will be set to either the start of the tag or to the start of the contents depending on the value of the advance flag. If not found, the stream positiion will be returned to the position from which the search started.
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
tag | Tag variable to match. |
len_p | Pointer to a variable to receive the decoded length of the tagged component. The returned value will either be the actual length or the special constant 'ASN_K_INDEFLEN', which indicates indefinite length. |
advance | The boolean value indicates the behaviour of the decode pointer. If it is set to TRUE and match is successful, then the pointer will be moved behind the tag. Otherwise, it will be left unchanged. |
int berDecStrmFindTag2 | ( | OSCTXT * | pctxt, |
ASN1TAG | tag, | ||
OSSIZE * | len_p, | ||
OSBOOL * | pIndefLen, | ||
OSBOOL | advance | ||
) |
This version of berDecStrmFindTag supports messages with length fields longer than will fit in a signed 32-bit integer value (up to unsigned 64-bit lengths on 64-bit machines).
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
tag | Tag variable to match. |
len_p | Pointer to a variable to receive the decoded length of the tagged component. |
pIndefLen | Pointer to boolean variable which will be set to true if length is indefinite. Length returned in pLength should be disregarded in this case. |
advance | The boolean value indicates the behaviour of the decode pointer. If it is set to TRUE and match is successful, then the pointer will be moved behind the tag. Otherwise, it will be left unchanged. |
int berDecStrmGetTLVLength | ( | OSCTXT * | pctxt | ) |
This function returns the length of the tag-length-value at the current position in the stream.
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
int berDecStrmInt | ( | OSCTXT * | pctxt, |
OSINT32 * | object_p, | ||
ASN1TagType | tagging, | ||
int | length | ||
) |
This function decodes a variable of the ASN.1 INTEGER type.
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
object_p | Pointer to a variable to receive a decoded 32-bit integer value. |
tagging | An enumerated type whose value is set to either 'ASN1EXPL' (for explicit tagging) or 'ASN1IMPL' (for implicit). Controls whether the universal tag value for this type is added or not. Users will generally always set this value to 'ASN1EXPL'. |
length | The length, in octets, of the contents field to be decoded. This parameter only has meaning if the tagging parameter specifies implicit decoding. If explicit, the length is obtained from the decoded length field. |
int berDecStrmInt16 | ( | OSCTXT * | pctxt, |
OSINT16 * | object_p, | ||
ASN1TagType | tagging, | ||
int | length | ||
) |
This function decodes a 16-bit variable of the ASN.1 INTEGER type.
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
object_p | Pointer to a variable to receive a decoded 16-bit integer value. |
tagging | An enumerated type whose value is set to either 'ASN1EXPL' (for explicit tagging) or 'ASN1IMPL' (for implicit). Controls whether the universal tag value for this type is added or not. Users will generally always set this value to 'ASN1EXPL'. |
length | The length, in octets, of the contents field to be decoded. This parameter only has meaning if the tagging parameter specifies implicit decoding. If explicit, the length is obtained from the decoded length field. |
int berDecStrmInt64 | ( | OSCTXT * | pctxt, |
OSINT64 * | object_p, | ||
ASN1TagType | tagging, | ||
int | length | ||
) |
This function decodes a 64-bit variable of the ASN.1 INTEGER type.
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
object_p | Pointer to a variable to receive a decoded 64-bit integer value. |
tagging | An enumerated type whose value is set to either 'ASN1EXPL' (for explicit tagging) or 'ASN1IMPL' (for implicit). Controls whether the universal tag value for this type is added or not. Users will generally always set this value to 'ASN1EXPL'. |
length | The length, in octets, of the contents field to be decoded. This parameter only has meaning if the tagging parameter specifies implicit decoding. If explicit, the length is obtained from the decoded length field. |
int berDecStrmInt8 | ( | OSCTXT * | pctxt, |
OSINT8 * | object_p, | ||
ASN1TagType | tagging, | ||
int | length | ||
) |
This function decodes an 8-bit variable of the ASN.1 INTEGER type.
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
object_p | Pointer to a variable to receive a decoded 8-bit integer value. |
tagging | An enumerated type whose value is set to either 'ASN1EXPL' (for explicit tagging) or 'ASN1IMPL' (for implicit). Controls whether the universal tag value for this type is added or not. Users will generally always set this value to 'ASN1EXPL'. |
length | The length, in octets, of the contents field to be decoded. This parameter only has meaning if the tagging parameter specifies implicit decoding. If explicit, the length is obtained from the decoded length field. |
int berDecStrmLength | ( | OSCTXT * | pctxt, |
int * | len_p | ||
) |
This function decodes a BER length determinant value.
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
len_p | Pointer to a variable to receive the decoded length of the tagged component. The returned value will either be the actual length or the special constant 'ASN_K_INDEFLEN', which indicates indefinite length. |
int berDecStrmLength2 | ( | OSCTXT * | pctxt, |
OSSIZE * | pLength, | ||
OSBOOL * | pIndefLen | ||
) |
This function decodes a BER length determinant value. This version of the function can support lengths larger than can be held in a signed 32-bit integer value (up to 64-bits unsigned on a 64-bit machine).
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
pLength | Pointer to a variable to receive the decoded length of the tagged component. |
pIndefLen | Pointer to boolean variable which will be set to true if length is indefinite. Length returned in pLength should be disregarded in this case. |
int berDecStrmMatchEOC | ( | OSCTXT * | pctxt | ) |
This function does a comparison between the end-of-contents octets (EOC) and the tag at the current decode pointer position to determine if they match. It then returns the result of the match operation. If match is not successful, the decode pointer will be unchanged; otherwise the pointer will be moved behind the EOC.
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
int berDecStrmMatchTag | ( | OSCTXT * | pctxt, |
ASN1TAG | tag, | ||
int * | len_p, | ||
OSBOOL | advance | ||
) |
This function does a comparison between the given tag and the tag at the current decode pointer position to determine if they match. It then returns the result of the match operation.
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
tag | Tag variable to match. |
len_p | Pointer to a variable to receive the decoded length of the tagged component. The returned value will either be the actual length or the special constant 'ASN_K_INDEFLEN', which indicates indefinite length. |
advance | The boolean value indicates the behaviour of the decode pointer. If it is set to TRUE and match is successful, then the pointer will be moved behind the tag. Otherwise, it will be left unchanged. |
int berDecStrmMatchTag2 | ( | OSCTXT * | pctxt, |
ASN1TAG | tag, | ||
OSSIZE * | len_p, | ||
OSBOOL * | pIndefLen, | ||
OSBOOL | advance | ||
) |
This function does a comparison between the given tag and the tag at the current decode pointer position to determine if they match. It then returns the result of the match operation.
This version of the function can support lengths larger than can be held in a signed 32-bit integer value (up to 64-bits unsigned on a 64-bit machine).
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
tag | Tag variable to match. |
len_p | Pointer to a variable to receive the decoded length of the tagged component. |
pIndefLen | Pointer to boolean variable which will be set to true if length is indefinite. Length returned in len_p should be disregarded in this case. |
advance | The boolean value indicates the behaviour of the decode pointer. If it is set to TRUE and match is successful, then the pointer will be moved behind the tag. Otherwise, it will be left unchanged. |
int berDecStrmNextElement | ( | OSCTXT * | pctxt | ) |
This function moves the decode pointer to the next tagged element in the decode stream. It is useful for use in an error handling callback function because it allows an unknown or bogus element to be skipped.
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
int berDecStrmNull | ( | OSCTXT * | pctxt, |
ASN1TagType | tagging | ||
) |
This function decodes an ASN.1 NULL placeholder.
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
tagging | An enumerated type whose value is set to either 'ASN1EXPL' (for explicit tagging) or 'ASN1IMPL' (for implicit). Controls whether the universal tag value for this type is added or not. Users will generally always set this value to 'ASN1EXPL'. |
int berDecStrmObjId | ( | OSCTXT * | pctxt, |
ASN1OBJID * | object_p, | ||
ASN1TagType | tagging, | ||
int | length | ||
) |
This function decodes a value of the ASN.1 OBJECT IDENTIFIER type.
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
object_p | Pointer to value to receive decoded result. The ASN1OBJID structure contains an integer to hold the number of subidentifiers and an array to hold the subidentifier values. |
tagging | An enumerated type whose value is set to either 'ASN1EXPL' (for explicit tagging) or 'ASN1IMPL' (for implicit). Controls whether the universal tag value for this type is added or not. Users will generally always set this value to 'ASN1EXPL'. |
length | The length, in octets, of the contents field to be decoded. This parameter only has meaning if the tagging parameter specifies implicit decoding. If explicit, the length is obtained from the decoded length field. |
int berDecStrmObjId64 | ( | OSCTXT * | pctxt, |
ASN1OID64 * | object_p, | ||
ASN1TagType | tagging, | ||
int | length | ||
) |
This function decodes a value of the ASN.1 OBJECT IDENTIFIER type using 64-bit subidentifiers.
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
object_p | Pointer to value to receive decoded result. The ASN1OID64 structure contains an integer to hold the number of subidentifiers and an array of 64-bit unsigned integers to hold the subidentifier values. |
tagging | An enumerated type whose value is set to either 'ASN1EXPL' (for explicit tagging) or 'ASN1IMPL' (for implicit). Controls whether the universal tag value for this type is added or not. Users will generally always set this value to 'ASN1EXPL'. |
length | The length, in octets, of the contents field to be decoded. This parameter only has meaning if the tagging parameter specifies implicit decoding. If explicit, the length is obtained from the decoded length field. |
int berDecStrmOctStr | ( | OSCTXT * | pctxt, |
OSOCTET * | pvalue, | ||
OSUINT32 * | pnocts, | ||
ASN1TagType | tagging, | ||
int | length | ||
) |
This function decodes a variable of the ASN.1 OCTET STRING type into a static memory structure. This function call is generated by ASN1C to decode a sized octet string production.
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
pvalue | Pointer to a variable to receive the decoded octet string. This is assumed to be a static array large enough to hold the number of octets specified in the *pnocts input parameter. |
pnocts | Pointer to an integer variable containing the size (in octets) of the sized ASN.1 octet string. An error will occur if the number of octets in the decoded string is larger than this value. Note that this is also used as an output variable - the actual number of decoded octets will be returned in this variable. |
tagging | An enumerated type whose value is set to either 'ASN1EXPL' (for explicit tagging) or 'ASN1IMPL' (for implicit). Controls whether the universal tag value for this type is added or not. Users will generally always set this value to 'ASN1EXPL'. |
length | The length, in octets, of the contents field to be decoded. This parameter only has meaning if the tagging parameter specifies implicit decoding. If explicit, the length is obtained from the decoded length field. |
int berDecStrmOpenType | ( | OSCTXT * | pctxt, |
const OSOCTET ** | object_p2, | ||
OSSIZE * | pnumocts | ||
) |
This function decodes a variable of an ASN.1 open type. This includes the now deprecated ANY and ANY DEFINED BY types from the 1990 standard as well as other types defined to be open in the new standards (for example, a variable type declaration in an X.681 Information Object Class definition).
Decoding is accomplished by returning a pointer to the encoded message component at the current decode pointer location and skipping to the next field. The caller must then call additional decode functions to further decode the component.
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
object_p2 | A pointer to a pointer (**) to hold the address of a byte buffer. This buffer will contain a copy of the encoded message component located at the current decode pointer location. |
pnumocts | Pointer to a size-typed variable to receive the decoded number of octets. |
int berDecStrmOpenTypeAppend | ( | OSCTXT * | pctxt, |
OSRTDList * | pElemList | ||
) |
This function is similar to the berDecStrmOpenType. The difference is that after it decodes the open type data into an ASN1OpenType structure, it appends the structure to a doubly-linked list. This function is typically used for decoding extension items in extensible types. The user is provided with a list of each extension item in the message.
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
pElemList | The pointer to linked list structure. The decoded ASN1OpenType structure will be appended to this list. |
int berDecStrmOpenTypeExt | ( | OSCTXT * | pctxt, |
ASN1CCB * | ccb_p, | ||
ASN1TAG * | tags, | ||
int | tagCount, | ||
OSRTDList * | pElemList | ||
) |
This function is similar to the berDecStrmOpenType function except that it is used in places where open type extensions are specified. An open type extension is defined as an extensibility marker on a constructed type without any extension elements defined (for example, SEQUENCE { a INTEGER, : }). The difference is that this is an implicit field that can span one or more elements whereas the standard Open Type is assumed to be a single tagged field.
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
ccb_p | Pointer to a 'context control block' structure. This is basically a loop control mechanism to keep the variable associated with parsing a nested constructed element straight. |
tags | Array of next expected tag values (null if last field). The routine will loop through elements until a matching tag is found or some other error occurs. |
tagCount | The number of tags in the tags array. |
pElemList | The pointer to linked list structure. The decoded ASN1OpenType structure will be appended to this list. |
int berDecStrmPeekTagAndLen | ( | OSCTXT * | pctxt, |
ASN1TAG * | ptag, | ||
int * | plen | ||
) |
This function "peeks" the tag and length at the current decode pointer location and returns the results. The decode pointer location is left as it was before call to this function.
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
ptag | Pointer to a variable to receive the decoded ASN.1 tag value. |
plen | Pointer to a variable to receive the decoded length of the tagged component. The returned value will either be the actual length or the special constant 'ASN_K_INDEFLEN', which indicates indefinite length. |
int berDecStrmReadDynTLV | ( | OSCTXT * | pctxt, |
OSOCTET ** | ppbuf | ||
) |
This function reads a complete tag-length-value (TLV) from the decode stream into a dynamic memory buffer.
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
ppbuf | Pointer to a pointer to a buffer to receive the allocated memory pointer. The memory is allocated using the rtxMem* memory management functions. This may be freed using rtxMemFree or rtxMemFreePtr. |
int berDecStrmReadTLV | ( | OSCTXT * | pctxt, |
OSOCTET * | buf, | ||
OSSIZE | bufsiz | ||
) |
This function reads a complete tag-length-value (TLV) from the decode stream into the given memory buffer.
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
buf | Pointer to a buffer to receive a data. |
bufsiz | Size of the buffer. |
int berDecStrmReal | ( | OSCTXT * | pctxt, |
OSREAL * | object_p, | ||
ASN1TagType | tagging, | ||
int | length | ||
) |
This function decodes a variable of the binary encoded ASN.1 REAL type. This function allows the encoding to be in any base. This is used for REAL values that could be base 2 or base 10, for BER.
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
object_p | Pointer to a variable to receive the decoded real value. |
tagging | An enumerated type whose value is set to either 'ASN1EXPL' (for explicit tagging) or 'ASN1IMPL' (for implicit). Controls whether the universal tag value for this type is added or not. Users will generally always set this value to 'ASN1EXPL'. |
length | The length, in octets, of the contents field to be decoded. This parameter only has meaning if the tagging parameter specifies implicit decoding. If explicit, the length is obtained from the decoded length field. |
int berDecStrmReal10 | ( | OSCTXT * | pctxt, |
const char ** | object_p, | ||
ASN1TagType | tagging, | ||
int | length | ||
) |
This function decodes a value of the decimal encoded ASN.1 REAL type.
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
object_p | Pointer to a character pointer variable to receive the decoded result. Dynamic memory is allocated for the variable using the ::rtxMemAlloc function. |
tagging | An enumerated type whose value is set to either 'ASN1EXPL' (for explicit tagging) or 'ASN1IMPL' (for implicit). Controls whether the universal tag value for this type is added or not. Users will generally always set this value to 'ASN1EXPL'. |
length | The length, in octets, of the contents field to be decoded. This parameter only has meaning if the tagging parameter specifies implicit decoding. If explicit, the length is obtained from the decoded length field. |
int berDecStrmRealBin | ( | OSCTXT * | pctxt, |
OSREAL * | object_p, | ||
ASN1TagType | tagging, | ||
int | length | ||
) |
This function decodes a variable of the binary encoded ASN.1 REAL type. This function requires the encoding to be in base 2, 8, or 16. This is used for REAL values that must be base 2, for BER.
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
object_p | Pointer to a variable to receive the decoded real value. |
tagging | An enumerated type whose value is set to either 'ASN1EXPL' (for explicit tagging) or 'ASN1IMPL' (for implicit). Controls whether the universal tag value for this type is added or not. Users will generally always set this value to 'ASN1EXPL'. |
length | The length, in octets, of the contents field to be decoded. This parameter only has meaning if the tagging parameter specifies implicit decoding. If explicit, the length is obtained from the decoded length field. |
int berDecStrmRealDer | ( | OSCTXT * | pctxt, |
OSREAL * | object_p, | ||
ASN1TagType | tagging, | ||
int | length | ||
) |
This function decodes a variable of the binary encoded ASN.1 REAL type. This function requires the encoding to be in base 2. This is used for REAL values that must be base 2, for CER and DER.
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
object_p | Pointer to a variable to receive the decoded real value. |
tagging | An enumerated type whose value is set to either 'ASN1EXPL' (for explicit tagging) or 'ASN1IMPL' (for implicit). Controls whether the universal tag value for this type is added or not. Users will generally always set this value to 'ASN1EXPL'. |
length | The length, in octets, of the contents field to be decoded. This parameter only has meaning if the tagging parameter specifies implicit decoding. If explicit, the length is obtained from the decoded length field. |
int berDecStrmRelativeOID | ( | OSCTXT * | pctxt, |
ASN1OBJID * | object_p, | ||
ASN1TagType | tagging, | ||
int | length | ||
) |
This function decodes a value of the ASN.1 RELATIVE-OID type.
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
object_p | Pointer to value to receive decoded result. The ASN1OBJID structure contains an integer to hold the number of subidentifiers and an array to hold the subidentifier values. |
tagging | An enumerated type whose value is set to either 'ASN1EXPL' (for explicit tagging) or 'ASN1IMPL' (for implicit). Controls whether the universal tag value for this type is added or not. Users will generally always set this value to 'ASN1EXPL'. |
length | The length, in octets, of the contents field to be decoded. This parameter only has meaning if the tagging parameter specifies implicit decoding. If explicit, the length is obtained from the decoded length field. |
int berDecStrmTag | ( | OSCTXT * | pctxt, |
ASN1TAG * | tag_p | ||
) |
This function decodes the tag at the current decode pointer location and returns the results.
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
tag_p | Pointer to a variable to receive the decoded ASN.1 tag value. |
int berDecStrmTagAndLen | ( | OSCTXT * | pctxt, |
ASN1TAG * | tag_p, | ||
int * | len_p | ||
) |
This function decodes the tag and length at the current decode pointer location and returns the results.
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
tag_p | Pointer to a variable to receive the decoded ASN.1 tag value. |
len_p | Pointer to a variable to receive the decoded length of the tagged component. The returned value will either be the actual length or the special constant 'ASN_K_INDEFLEN', which indicates indefinite length. |
int berDecStrmTagAndLen2 | ( | OSCTXT * | pctxt, |
ASN1TAG * | tag_p, | ||
OSSIZE * | len_p, | ||
OSBOOL * | pIndefLen | ||
) |
This function decodes the tag and length at the current decode pointer location and returns the results.
This version of the function can support lengths larger than can be held in a signed 32-bit integer value (up to 64-bits unsigned on a 64-bit machine).
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
tag_p | Pointer to a variable to receive the decoded ASN.1 tag value. |
len_p | Pointer to a variable to receive the decoded length of the tagged component. |
pIndefLen | Pointer to boolean variable which will be set to true if length is indefinite. Length returned in len_p should be disregarded in this case. |
OSBOOL berDecStrmTestEOC | ( | OSCTXT * | pctxt, |
ASN1CCB * | ccb_p | ||
) |
This function does a quick test on end-of-contents octets at the current decode pointer. In contrast to the berDecStrmMatchEOC this function never moves the decode pointer and it returns a boolean result of testing.
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
ccb_p | Pointer to a 'context control block' structure. This is basically a loop control mechanism to keep the variable associated with parsing a nested constructed element straight. |
int berDecStrmTestTag | ( | OSCTXT * | pctxt, |
ASN1TAG | tag, | ||
int * | len_p, | ||
OSBOOL | advance | ||
) |
This function does a comparison between the given tag and the tag at the current decode pointer position to determine if they match. It then returns the result of the match operation. In contrary to the berDecStrmMatchTag
function this one does NOT log error, if tags are not matched.
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
tag | Tag variable to match. |
len_p | Pointer to a variable to receive the decoded length of the tagged component. The returned value will either be the actual length or the special constant 'ASN_K_INDEFLEN', which indicates indefinite length. |
advance | The boolean value indicates the behaviour of the decode pointer. If it is set to TRUE and match is successful, then the pointer will be moved behind the tag. Otherwise, it will be left unchanged. |
int berDecStrmTimeOfDayStr | ( | OSCTXT * | pctxt, |
const char ** | ppvalue, | ||
ASN1TagType | tagging, | ||
ASN1TAG | tag, | ||
int | length | ||
) |
This function decodes a variable of one of the ASN.1 ISO 8601 Time-Of-Day character string types.
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
ppvalue | Pointer to a character string pointer variable to receive the decoded string. The string is stored as a standard null-terminated C string. Memory is allocated for the string by the ::rtxMemAlloc function. |
tagging | An enumerated type whose value is set to either 'ASN1EXPL' (for explicit tagging) or 'ASN1IMPL' (for implicit). Controls whether the universal tag value for this type is added or not. Users will generally always set this value to 'ASN1EXPL'. |
tag | The ASN.1 tag to be decoded. This parameter is passed using the ASN1C internal tag representation. It is passed as an unsigned 32-bit integer. This parameter only has meaning if the tagging parameter specifies explicit decoding. |
length | The length, in octets, of the contents field to be decoded. This parameter only has meaning if the tagging parameter specifies implicit decoding. If explicit, the length is obtained from the decoded length field. |
int berDecStrmTimeStr | ( | OSCTXT * | pctxt, |
const char ** | ppvalue, | ||
ASN1TagType | tagging, | ||
ASN1TAG | tag, | ||
int | length | ||
) |
This function decodes a variable of one of the ASN.1 ISO 8601 Time character string types.
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
ppvalue | Pointer to a character string pointer variable to receive the decoded string. The string is stored as a standard null-terminated C string. Memory is allocated for the string by the ::rtxMemAlloc function. |
tagging | An enumerated type whose value is set to either 'ASN1EXPL' (for explicit tagging) or 'ASN1IMPL' (for implicit). Controls whether the universal tag value for this type is added or not. Users will generally always set this value to 'ASN1EXPL'. |
tag | The ASN.1 tag to be decoded. This parameter is passed using the ASN1C internal tag representation. It is passed as an unsigned 32-bit integer. This parameter only has meaning if the tagging parameter specifies explicit decoding. |
length | The length, in octets, of the contents field to be decoded. This parameter only has meaning if the tagging parameter specifies implicit decoding. If explicit, the length is obtained from the decoded length field. |
int berDecStrmUInt | ( | OSCTXT * | pctxt, |
OSUINT32 * | object_p, | ||
ASN1TagType | tagging, | ||
int | length | ||
) |
This function decodes a variable of the unsigned variant of ASN.1 INTEGER type.
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
object_p | Pointer to a variable to receive a decoded unsigned 32-bit integer value. |
tagging | An enumerated type whose value is set to either 'ASN1EXPL' (for explicit tagging) or 'ASN1IMPL' (for implicit). Controls whether the universal tag value for this type is added or not. Users will generally always set this value to 'ASN1EXPL'. |
length | The length, in octets, of the contents field to be decoded. This parameter only has meaning if the tagging parameter specifies implicit decoding. If explicit, the length is obtained from the decoded length field. |
int berDecStrmUInt16 | ( | OSCTXT * | pctxt, |
OSUINT16 * | object_p, | ||
ASN1TagType | tagging, | ||
int | length | ||
) |
This function decodes a 16-bit variable of the unsigned variant of ASN.1 INTEGER type.
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
object_p | Pointer to a variable to receive a decoded unsigned 16-bit integer value. |
tagging | An enumerated type whose value is set to either 'ASN1EXPL' (for explicit tagging) or 'ASN1IMPL' (for implicit). Controls whether the universal tag value for this type is added or not. Users will generally always set this value to 'ASN1EXPL'. |
length | The length, in octets, of the contents field to be decoded. This parameter only has meaning if the tagging parameter specifies implicit decoding. If explicit, the length is obtained from the decoded length field. |
int berDecStrmUInt64 | ( | OSCTXT * | pctxt, |
OSUINT64 * | object_p, | ||
ASN1TagType | tagging, | ||
int | length | ||
) |
This function decodes a 64-bit variable of the unsigned variant of ASN.1 INTEGER type.
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
object_p | Pointer to a variable to receive a decoded unsigned 64-bit integer value. |
tagging | An enumerated type whose value is set to either 'ASN1EXPL' (for explicit tagging) or 'ASN1IMPL' (for implicit). Controls whether the universal tag value for this type is added or not. Users will generally always set this value to 'ASN1EXPL'. |
length | The length, in octets, of the contents field to be decoded. This parameter only has meaning if the tagging parameter specifies implicit decoding. If explicit, the length is obtained from the decoded length field. |
int berDecStrmUInt8 | ( | OSCTXT * | pctxt, |
OSUINT8 * | object_p, | ||
ASN1TagType | tagging, | ||
int | length | ||
) |
This function decodes an 8-bit variable of the unsigned variant of ASN.1 INTEGER type.
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
object_p | Pointer to a variable to receive a decoded unsigned 8-bit integer value. |
tagging | An enumerated type whose value is set to either 'ASN1EXPL' (for explicit tagging) or 'ASN1IMPL' (for implicit). Controls whether the universal tag value for this type is added or not. Users will generally always set this value to 'ASN1EXPL'. |
length | The length, in octets, of the contents field to be decoded. This parameter only has meaning if the tagging parameter specifies implicit decoding. If explicit, the length is obtained from the decoded length field. |
int berDecStrmUnivStr | ( | OSCTXT * | pctxt, |
Asn132BitCharString * | object_p, | ||
ASN1TagType | tagging, | ||
int | length | ||
) |
This function decodes a variable an ASN.1 32-bit character UniversalString type.
pctxt | Pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls. |
object_p | Pointer to a structure variable to receive the decoded string. The string is stored as an array of unsigned integer characters. Memory is allocated for the string by the ::rtxMemAlloc function. |
tagging | An enumerated type whose value is set to either 'ASN1EXPL' (for explicit tagging) or 'ASN1IMPL' (for implicit). Controls whether the universal tag value for this type is added or not. Users will generally always set this value to 'ASN1EXPL'. |
length | The length, in octets, of the contents field to be decoded. This parameter only has meaning if the tagging parameter specifies implicit decoding. If explicit, the length is obtained from the decoded length field. |