Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
asn1_decoder.h File Reference
#include <linux/asn1.h>

Go to the source code of this file.

Functions

int asn1_ber_decoder (const struct asn1_decoder *decoder, void *context, const unsigned char *data, size_t datalen)
 

Function Documentation

int asn1_ber_decoder ( const struct asn1_decoder decoder,
void context,
const unsigned char data,
size_t  datalen 
)

asn1_ber_decoder - Decoder BER/DER/CER ASN.1 according to pattern : The decoder definition (produced by asn1_compiler) : The caller's context (to be passed to the action functions) : The encoded data : The size of the encoded data

Decode BER/DER/CER encoded ASN.1 data according to a bytecode pattern produced by asn1_compiler. Action functions are called on marked tags to allow the caller to retrieve significant data.

LIMITATIONS:

To keep down the amount of stack used by this function, the following limits have been imposed:

(1) This won't handle datalen > 65535 without increasing the size of the cons stack elements and length_too_long checking.

(2) The stack of constructed types is 10 deep. If the depth of non-leaf constructed types exceeds this, the decode will fail.

(3) The SET type (not the SET OF type) isn't really supported as tracking what members of the set have been seen is a pain.

Definition at line 163 of file asn1_decoder.c.