sc_asn1_encode(3)

sc_asn1_encode3

Encode asn.1 entries into a stream

Usage

#include <opensc.h>
int sc_asn1_encode(struct sc_context *ctx, const struct sc_asn1_entry *asn1,
                   unsigned char **newbuf, size_t *size);

Overview

This function encodes an array of entries pointed to by asn1 and terminated by a NULL entry (i.e. where the name field of the entry is NULL) into a newly allocated buffer.

The new buffer containing the ASN.1 stream will be stored in newbuf, and the size of this buffer is stored in size. The application must free this buffer after use.

Return value

Returns 0 if successful, or a negative value in case of error.

Releases

3 releases since Debian 4.0 (Etch); the text changed 2 times.

  1. 4.0
  2. 5.0
  3. 6.0

From libopensc2-dev 0.11.13-1.1 in Debian 6.0 (Squeeze). Parsed by carta from the page's man source.