2005-03-02 02:06:41 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
2005-02-23 02:52:20 +00:00
|
|
|
<refentry id="scasn1puttag">
|
2005-03-02 02:06:41 +00:00
|
|
|
<refentryinfo><title>OpenSC API Reference</title></refentryinfo>
|
2005-02-23 02:52:20 +00:00
|
|
|
<refmeta>
|
|
|
|
<refentrytitle>sc_asn1_put_tag</refentrytitle>
|
|
|
|
<manvolnum>3</manvolnum>
|
|
|
|
<refmiscinfo>opensc</refmiscinfo>
|
|
|
|
</refmeta>
|
|
|
|
|
|
|
|
<refnamediv>
|
|
|
|
<refname>sc_asn1_put_tag</refname>
|
|
|
|
<refpurpose>Construct an ASN.1 entry in a buffer</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>Synopsis</title>
|
|
|
|
<para>
|
|
|
|
<programlisting>
|
|
|
|
#include <opensc.h>
|
|
|
|
|
|
|
|
int sc_asn1_put_tag(int tag, const unsigned char *data, int datalen,
|
|
|
|
unsigned char *out, int outlen, unsigned char **nextbuf);
|
|
|
|
</programlisting>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>Description</title>
|
|
|
|
<para>
|
|
|
|
This function constructs a single entry in an ASN.1 stream, at the buffer pointed to by
|
|
|
|
<emphasis>out</emphasis> (which is <emphasis>outlen</emphasis> bytes long). The tag to be used
|
|
|
|
is in <emphasis>tag</emphasis>, and the entry payload is pointed to by <emphasis>data</emphasis>,
|
|
|
|
which is <emphasis>datalen</emphasis> bytes long.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
If <emphasis>nextbuf</emphasis> is not NULL, it will be filled in with a pointer to the buffer
|
|
|
|
address immediately following the newly copied entry.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>Return value</title>
|
|
|
|
<para>
|
|
|
|
Returns 0 if successful, or a negative value in case of error.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
</refentry>
|