C Streaming BER Decode Functions.
[Streaming BER Runtime Library Functions.]
Detailed Description
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.
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 | 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 | berDecStrmDynBitStr (OSCTXT *pctxt, const OSOCTET **ppvalue, OSUINT32 *pnbits, ASN1TagType tagging, int length) |
| int | berDecStrmDynOctStr (OSCTXT *pctxt, const OSOCTET **ppvalue, OSUINT32 *pnocts, ASN1TagType tagging, int length) |
| int | berDecStrmEnum (OSCTXT *pctxt, OSINT32 *object_p, ASN1TagType tagging, int length) |
| 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 | berDecStrmMatchEOC (OSCTXT *pctxt) |
| int | berDecStrmMatchTag (OSCTXT *pctxt, ASN1TAG tag, int *len_p, 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, OSUINT32 *pnumocts) |
| int | berDecStrmOpenTypeAppend (OSCTXT *pctxt, OSRTDList *pElemList) |
| int | berDecStrmOpenTypeExt (OSCTXT *pctxt, ASN1CCB *ccb_p, ASN1TAG tag, OSRTDList *pElemList) |
| int | berDecStrmPeekTagAndLen (OSCTXT *pctxt, ASN1TAG *ptag, int *plen) |
| int | berDecStrmReadDynTLV (OSCTXT *pctxt, OSOCTET **ppbuf) |
| int | berDecStrmReadTLV (OSCTXT *pctxt, OSOCTET *buf, size_t bufsiz) |
| int | berDecStrmReal (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) |
| OSBOOL | berDecStrmTestEOC (OSCTXT *pctxt, ASN1CCB *ccb_p) |
| 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) |
Function Documentation
|
||||||||||||||||||||
|
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.
|
|
||||||||||||||||||||||||
|
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.
|
|
||||||||||||||||||||
|
This function decodes a variable an ASN.1 16-bit character string type. This includes the BMPString type.
|
|
||||||||||||||||||||
|
This function decodes a variable of the ASN.1 BOOLEAN type.
|
|
||||||||||||||||||||||||
|
This function decodes a variable of one of the ASN.1 8-bit character string types. These types include IA5String, VisibleString, PrintableString, and NumericString.
|
|
||||||||||||||||||||||||
|
This function decodes a variable of the ASN.1 BIT STRING type. It will allocate dynamic memory to store the decoded result.
|
|
||||||||||||||||||||||||
|
This function decodes a variable of the ASN.1 OCTET STRING type. It will allocate dynamic memory to store the decoded result.
|
|
||||||||||||||||||||
|
This function decodes a variable of the ASN.1 ENUMERATED type.
|
|
|
This function returns the length of the tag-length-value at the current position in the stream.
|
|
||||||||||||||||||||
|
This function decodes a variable of the ASN.1 INTEGER type.
|
|
||||||||||||||||||||
|
This function decodes a 16-bit variable of the ASN.1 INTEGER type.
|
|
||||||||||||||||||||
|
This function decodes a 64-bit variable of the ASN.1 INTEGER type.
|
|
||||||||||||||||||||
|
This function decodes an 8-bit variable of the ASN.1 INTEGER type.
|
|
||||||||||||
|
This function decodes a BER length determinant value.
|
|
|
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.
|
|
||||||||||||||||||||
|
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 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.
|
|
||||||||||||
|
This function decodes an ASN.1 NULL placeholder.
|
|
||||||||||||||||||||
|
This function decodes a value of the ASN.1 OBJECT IDENTIFIER type.
|
|
||||||||||||||||||||
|
This function decodes a value of the ASN.1 OBJECT IDENTIFIER type using 64-bit subidentifiers.
|
|
||||||||||||||||||||||||
|
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.
|
|
||||||||||||||||
|
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).
|
|
||||||||||||
|
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.
|
|
||||||||||||||||||||
|
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.
|
|
||||||||||||||||
|
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.
|
|
||||||||||||
|
This function reads a complete tag-length-value (TLV) from the decode stream into a dynamic memory buffer.
|
|
||||||||||||||||
|
This function reads a complete tag-length-value (TLV) from the decode stream into the given memory buffer.
|
|
||||||||||||||||||||
|
This function decodes a variable of the binary encoded ASN.1 REAL type.
|
|
||||||||||||||||||||
|
This function decodes a value of the decimal encoded ASN.1 REAL type.
|
|
||||||||||||||||||||
|
This function decodes a value of the ASN.1 RELATIVE-OID type.
|
|
||||||||||||
|
This function decodes the tag at the current decode pointer location and returns the results.
|
|
||||||||||||||||
|
This function decodes the tag and length at the current decode pointer location and returns the results.
|
|
||||||||||||
|
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.
|
|
||||||||||||||||||||
|
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
|
|
||||||||||||||||||||
|
This function decodes a variable of the unsigned variant of ASN.1 INTEGER type.
|
|
||||||||||||||||||||
|
This function decodes a 16-bit variable of the unsigned variant of ASN.1 INTEGER type.
|
|
||||||||||||||||||||
|
This function decodes a 64-bit variable of the unsigned variant of ASN.1 INTEGER type.
|
|
||||||||||||||||||||
|
This function decodes an 8-bit variable of the unsigned variant of ASN.1 INTEGER type.
|
|
||||||||||||||||||||
|
This function decodes a variable an ASN.1 32-bit character UniversalString type.
|
