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="scasn1readtag">
|
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_read_tag</refentrytitle>
|
|
|
|
<manvolnum>3</manvolnum>
|
|
|
|
<refmiscinfo>opensc</refmiscinfo>
|
|
|
|
</refmeta>
|
|
|
|
|
|
|
|
<refnamediv>
|
|
|
|
<refname>sc_asn1_read_tag</refname>
|
|
|
|
<refpurpose>Extract a tag from an ASN.1 entry</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>Synopsis</title>
|
|
|
|
<para>
|
|
|
|
<programlisting>
|
|
|
|
#include <opensc.h>
|
|
|
|
|
|
|
|
int sc_asn1_read_tag(const unsigned char **buf, size_t buflen,
|
|
|
|
unsigned int *cla_out, unsigned int *tag_out, size_t *taglen);
|
|
|
|
</programlisting>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>Description</title>
|
|
|
|
<para>
|
|
|
|
This function extracts a tag from an ASN.1 entry at the buffer pointed to by
|
|
|
|
the pointer in <emphasis>buf</emphasis>. The buffer is <emphasis>buflen</emphasis> bytes long.
|
|
|
|
The tag class will be stored in <emphasis>cla_out</emphasis>, the tag itself in
|
|
|
|
<emphasis>tag_out</emphasis>, and the length of the extracted tag in
|
|
|
|
<emphasis>tag_len</emphasis>.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>Return value</title>
|
|
|
|
<para>
|
|
|
|
Returns 1 if successful, or -1 in case of error.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
</refentry>
|