2005-07-20 00:43:38 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<refentry id="opensc-explorer">
|
|
|
|
<refmeta>
|
|
|
|
<refentrytitle>opensc-explorer</refentrytitle>
|
|
|
|
<manvolnum>1</manvolnum>
|
2011-08-14 21:27:55 +00:00
|
|
|
<refmiscinfo class="productname">OpenSC</refmiscinfo>
|
|
|
|
<refmiscinfo class="manual">OpenSC Tools</refmiscinfo>
|
|
|
|
<refmiscinfo class="source">opensc</refmiscinfo>
|
2005-07-20 00:43:38 +00:00
|
|
|
</refmeta>
|
|
|
|
|
|
|
|
<refnamediv>
|
|
|
|
<refname>opensc-explorer</refname>
|
|
|
|
<refpurpose>
|
|
|
|
generic interactive utility for accessing smart card
|
|
|
|
and similar security token functions
|
|
|
|
</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
|
2011-08-14 19:52:02 +00:00
|
|
|
<refsynopsisdiv>
|
|
|
|
<cmdsynopsis>
|
|
|
|
<command>opensc-explorer</command>
|
|
|
|
<arg choice="opt"><replaceable class="option">OPTIONS</replaceable></arg>
|
2012-05-25 17:15:32 +00:00
|
|
|
<arg choice="opt"><replaceable class="parameter">SCRIPT</replaceable></arg>
|
2011-08-14 19:52:02 +00:00
|
|
|
</cmdsynopsis>
|
|
|
|
</refsynopsisdiv>
|
2005-07-20 00:43:38 +00:00
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>Description</title>
|
|
|
|
<para>
|
|
|
|
The <command>opensc-explorer</command> utility can be
|
|
|
|
used interactively to perform miscellaneous operations
|
|
|
|
such as exploring the contents of or sending arbitrary
|
|
|
|
APDU commands to a smart card or similar security token.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>Options</title>
|
|
|
|
<para>
|
|
|
|
The following are the command-line options for
|
|
|
|
<command>opensc-explorer</command>. There are additional
|
|
|
|
interactive commands available once it is running.
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term>
|
2011-08-15 14:58:01 +00:00
|
|
|
<option>--card-driver</option> <replaceable>driver</replaceable>,
|
|
|
|
<option>-c</option> <replaceable>driver</replaceable>
|
2005-07-20 00:43:38 +00:00
|
|
|
</term>
|
|
|
|
<listitem><para>
|
|
|
|
Use the given card driver. The default is
|
|
|
|
auto-detected.
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
2010-08-20 22:51:39 +00:00
|
|
|
<varlistentry>
|
|
|
|
<term>
|
2011-08-15 14:58:01 +00:00
|
|
|
<option>--mf</option> <replaceable>path</replaceable>,
|
|
|
|
<option>-m</option> <replaceable>path</replaceable>
|
2010-08-20 22:51:39 +00:00
|
|
|
</term>
|
2018-06-30 17:28:29 +00:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Select the file referenced by the given path on startup.
|
|
|
|
The default is the path to the standard master file,
|
|
|
|
<literal>3F00</literal>. If <replaceable>path</replaceable>
|
|
|
|
is empty (e.g. <command>opensc-explorer --mf ""</command>),
|
|
|
|
then no file is explicitly selected.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
2010-08-20 22:51:39 +00:00
|
|
|
</varlistentry>
|
2009-11-13 14:51:32 +00:00
|
|
|
<varlistentry>
|
2011-08-15 14:58:01 +00:00
|
|
|
<term>
|
2011-08-21 10:45:13 +00:00
|
|
|
<option>--reader</option> <replaceable>num</replaceable>,
|
|
|
|
<option>-r</option> <replaceable>num</replaceable>
|
2011-08-15 14:58:01 +00:00
|
|
|
</term>
|
2018-05-04 21:22:45 +00:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Specify the reader to use. By default, the first
|
|
|
|
reader with a present card is used. If
|
|
|
|
<replaceable>num</replaceable> is an ATR, the
|
|
|
|
reader with a matching card will be chosen.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
2009-11-13 14:51:32 +00:00
|
|
|
</varlistentry>
|
2005-07-20 00:43:38 +00:00
|
|
|
<varlistentry>
|
2011-08-15 14:58:01 +00:00
|
|
|
<term>
|
|
|
|
<option>--verbose</option>, <option>-v</option>
|
|
|
|
</term>
|
2018-06-30 17:28:29 +00:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Cause <command>opensc-explorer</command> to be more
|
|
|
|
verbose. Specify this flag several times to enable
|
|
|
|
debug output in the opensc library.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
2005-07-20 00:43:38 +00:00
|
|
|
</varlistentry>
|
2011-08-21 10:45:13 +00:00
|
|
|
<varlistentry>
|
|
|
|
<term>
|
|
|
|
<option>--wait</option>, <option>-w</option>
|
|
|
|
</term>
|
2018-06-30 17:28:29 +00:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Wait for a card to be inserted.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
2011-08-21 10:45:13 +00:00
|
|
|
</varlistentry>
|
2005-07-20 00:43:38 +00:00
|
|
|
</variablelist>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
2018-05-08 06:25:15 +00:00
|
|
|
<refsect1>
|
|
|
|
<title>Commands</title>
|
|
|
|
<para>
|
|
|
|
The following commands are supported at <command>opensc-explorer</command>'s
|
|
|
|
interactive prompt or in script files passed via the command line parameter
|
|
|
|
<replaceable class="parameter">SCRIPT</replaceable>.
|
|
|
|
<variablelist>
|
2018-06-30 17:28:29 +00:00
|
|
|
<varlistentry>
|
|
|
|
<term>
|
|
|
|
<command>#</command>
|
|
|
|
<arg choice="plain" rep="repeat"><replaceable></replaceable></arg>
|
|
|
|
</term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Treat line as a comment.
|
|
|
|
Ignore anything until the end of the line introduced by
|
|
|
|
<literal>#</literal>.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2018-05-08 06:25:15 +00:00
|
|
|
<varlistentry>
|
|
|
|
<term>
|
2018-05-26 19:05:55 +00:00
|
|
|
<command>apdu</command>
|
2018-06-30 17:28:29 +00:00
|
|
|
<arg choice="plain" rep="repeat"><replaceable>data</replaceable></arg>
|
2018-05-08 06:25:15 +00:00
|
|
|
</term>
|
|
|
|
<listitem>
|
2018-06-30 17:28:29 +00:00
|
|
|
<para>
|
|
|
|
Send a custom APDU command to the card.
|
|
|
|
<replaceable>data</replaceable> is a series of
|
|
|
|
sequences of hexadecimal values and strings enclosed
|
|
|
|
in double quotes (<literal>"..."</literal>).
|
|
|
|
</para>
|
2018-05-08 06:25:15 +00:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term>
|
2018-05-26 19:05:55 +00:00
|
|
|
<command>asn1</command>
|
|
|
|
<replaceable>file-id</replaceable>
|
2018-05-08 06:25:15 +00:00
|
|
|
</term>
|
2018-06-30 17:28:29 +00:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Parse and print the ASN.1 encoded content of the working EF
|
|
|
|
specified by <replaceable>file-id</replaceable>.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
2018-05-08 06:25:15 +00:00
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term>
|
2018-05-26 19:05:55 +00:00
|
|
|
<command>cat</command>
|
|
|
|
<group choice="opt">
|
|
|
|
<arg choice="plain"><replaceable>file-id</replaceable></arg>
|
|
|
|
<arg choice="plain"><literal>sfi:</literal><replaceable>short-id</replaceable></arg>
|
|
|
|
</group>
|
2018-05-08 06:25:15 +00:00
|
|
|
</term>
|
2018-06-30 17:28:29 +00:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Print the contents of the working EF specified by
|
|
|
|
<replaceable>file-id</replaceable> or the short file id
|
2018-05-08 06:25:15 +00:00
|
|
|
<replaceable>short-id</replaceable>.
|
2018-06-30 17:28:29 +00:00
|
|
|
If no argument is given, print the the contents
|
|
|
|
of the currently selected EF.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
2018-05-08 06:25:15 +00:00
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term>
|
2018-05-26 19:05:55 +00:00
|
|
|
<command>cd</command>
|
|
|
|
<group choice="req">
|
|
|
|
<arg choice="plain"><literal>..</literal></arg>
|
|
|
|
<arg choice="plain"><replaceable>file-id</replaceable></arg>
|
|
|
|
<arg choice="plain"><literal>aid:</literal><replaceable>DF-name</replaceable></arg>
|
|
|
|
</group>
|
2018-05-08 06:25:15 +00:00
|
|
|
</term>
|
2018-06-30 17:28:29 +00:00
|
|
|
<listitem>
|
|
|
|
<para>
|
2018-05-08 06:25:15 +00:00
|
|
|
Change to another DF specified by the argument passed.
|
2018-05-26 19:05:55 +00:00
|
|
|
If the argument given is <literal>..</literal>,
|
|
|
|
then move up one level in the file system hierarchy.
|
2018-06-30 17:28:29 +00:00
|
|
|
If it is a <replaceable>file-id</replaceable>,
|
2018-05-26 19:05:55 +00:00
|
|
|
which must be a DF directly
|
2018-05-08 06:25:15 +00:00
|
|
|
beneath the current DF, then change to that DF.
|
|
|
|
If it is an application identifier given as
|
|
|
|
<literal>aid:</literal><replaceable>DF-name</replaceable>,
|
|
|
|
then jump to the MF of the application denoted by
|
|
|
|
<replaceable>DF-name</replaceable>.
|
2018-06-30 17:28:29 +00:00
|
|
|
</para>
|
|
|
|
</listitem>
|
2018-05-08 06:25:15 +00:00
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term>
|
2018-05-26 19:05:55 +00:00
|
|
|
<command>change</command>
|
|
|
|
<arg choice="plain"><literal>CHV</literal><replaceable>pin-ref</replaceable></arg>
|
|
|
|
<arg choice="opt">
|
|
|
|
<arg choice="opt"><replaceable>old-pin</replaceable></arg>
|
|
|
|
<replaceable>new-pin</replaceable>
|
|
|
|
</arg>
|
2018-05-08 06:25:15 +00:00
|
|
|
</term>
|
|
|
|
<listitem>
|
2018-06-30 17:28:29 +00:00
|
|
|
<para>
|
|
|
|
Change the PIN specified by <replaceable>pin-ref</replaceable>
|
|
|
|
from the value given by <replaceable>old-pin</replaceable> and
|
|
|
|
change its value to <replaceable>new-pin</replaceable>.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
<replaceable>old-pin</replaceable> and
|
|
|
|
<replaceable>new-pin</replaceable> can be
|
|
|
|
sequences of hexadecimal values,
|
|
|
|
strings enclosed in double quotes (<literal>"..."</literal>),
|
|
|
|
empty (<literal>""</literal>), or absent.
|
|
|
|
If absent, the values are read from the card reader's pin pad.
|
|
|
|
</para>
|
2018-05-08 06:25:15 +00:00
|
|
|
<para>
|
|
|
|
Examples:
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term><code>change CHV2 00:00:00:00:00:00 "foobar"</code></term>
|
|
|
|
<listitem><para>
|
|
|
|
Change PIN <literal>CHV2</literal>
|
|
|
|
to the new value <literal>foobar</literal>,
|
|
|
|
giving the old value <literal>00:00:00:00:00:00</literal>.
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><code>change CHV2 "foobar"</code></term>
|
|
|
|
<listitem><para>
|
|
|
|
Set PIN <literal>CHV2</literal>
|
|
|
|
to the new value <literal>foobar</literal>.
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><code>change CHV2</code></term>
|
|
|
|
<listitem><para>
|
|
|
|
Change PIN <literal>CHV2</literal> using the card reader's pinpad.
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term>
|
2018-05-26 19:05:55 +00:00
|
|
|
<command>create</command>
|
|
|
|
<replaceable>file-id</replaceable>
|
|
|
|
<replaceable>size</replaceable>
|
2018-05-08 06:25:15 +00:00
|
|
|
</term>
|
2018-06-30 17:28:29 +00:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Create a new EF.
|
|
|
|
<replaceable>file-id</replaceable> specifies the numeric id, and
|
|
|
|
<replaceable>size</replaceable> the size of the EF to create.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
2018-05-08 06:25:15 +00:00
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term>
|
2018-05-26 19:05:55 +00:00
|
|
|
<command>debug</command>
|
|
|
|
<arg choice="opt"><replaceable>level</replaceable></arg>
|
2018-05-08 06:25:15 +00:00
|
|
|
</term>
|
|
|
|
<listitem>
|
2018-06-30 17:28:29 +00:00
|
|
|
<para>
|
|
|
|
Set OpenSC debug level to <replaceable>level</replaceable>.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
If <replaceable>level</replaceable> is omitted,
|
|
|
|
show the current debug level.
|
|
|
|
</para>
|
2018-05-08 06:25:15 +00:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term>
|
2018-05-26 19:05:55 +00:00
|
|
|
<command>delete</command>
|
|
|
|
<replaceable>file-id</replaceable>
|
2018-05-08 06:25:15 +00:00
|
|
|
</term>
|
2018-06-30 17:28:29 +00:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Remove the EF or DF specified by
|
|
|
|
<replaceable>file-id</replaceable>.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
2018-05-08 06:25:15 +00:00
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term>
|
2018-05-26 19:05:55 +00:00
|
|
|
<command>do_get</command>
|
|
|
|
<replaceable>hex-tag</replaceable>
|
|
|
|
<arg choice="opt"><replaceable>output</replaceable></arg>
|
2018-05-08 06:25:15 +00:00
|
|
|
</term>
|
|
|
|
<listitem>
|
2018-06-30 17:28:29 +00:00
|
|
|
<para>
|
|
|
|
Copy the contents of the card's data object
|
|
|
|
(<acronym>DO</acronym>)
|
|
|
|
specified by <replaceable>hex-tag</replaceable>
|
|
|
|
to the local host computer's file named
|
|
|
|
<replaceable>output</replaceable>.
|
2018-05-08 06:25:15 +00:00
|
|
|
</para>
|
|
|
|
<para>
|
2018-06-30 17:28:29 +00:00
|
|
|
If <replaceable>output</replaceable> is not given,
|
|
|
|
the contents of <replaceable>hex-tag</replaceable>
|
|
|
|
will be displayed as hex-dump.
|
2018-05-08 06:25:15 +00:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term>
|
2018-05-26 19:05:55 +00:00
|
|
|
<command>do_put</command>
|
|
|
|
<replaceable>hex-tag</replaceable>
|
2018-06-30 17:28:29 +00:00
|
|
|
<replaceable>data</replaceable>
|
2018-05-08 06:25:15 +00:00
|
|
|
</term>
|
|
|
|
<listitem>
|
2018-06-30 17:28:29 +00:00
|
|
|
<para>
|
|
|
|
Change the contents of the card's data object
|
|
|
|
(<acronym>DO</acronym>)
|
|
|
|
specified by <replaceable>hex-tag</replaceable>
|
|
|
|
to <replaceable>data</replaceable>.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
<replaceable>data</replaceable>
|
|
|
|
can be given either as a sequence of hexadecimal values,
|
|
|
|
or as string enclosed in double quotes (<literal>"..."</literal>),
|
2018-05-08 06:25:15 +00:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term>
|
2018-05-26 19:05:55 +00:00
|
|
|
<command>echo</command>
|
|
|
|
<arg choice="plain" rep="repeat"><replaceable>string</replaceable></arg>
|
2018-05-08 06:25:15 +00:00
|
|
|
</term>
|
|
|
|
<listitem>
|
2018-06-30 17:28:29 +00:00
|
|
|
<para>
|
|
|
|
Print the <replaceable>string</replaceable>s given.
|
|
|
|
</para>
|
2018-05-08 06:25:15 +00:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term>
|
|
|
|
<command>erase</command>
|
|
|
|
</term>
|
2018-06-30 17:28:29 +00:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Erase the card, if the card supports it.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
2018-05-08 06:25:15 +00:00
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term>
|
2018-05-26 19:05:55 +00:00
|
|
|
<command>get</command>
|
|
|
|
<replaceable>file-id</replaceable>
|
|
|
|
<arg choice="opt"><replaceable>output</replaceable></arg>
|
2018-05-08 06:25:15 +00:00
|
|
|
</term>
|
|
|
|
<listitem>
|
2018-06-30 17:28:29 +00:00
|
|
|
<para>
|
|
|
|
Copy an EF to a local file.
|
|
|
|
The local file is specified by
|
|
|
|
<replaceable>output</replaceable>
|
|
|
|
while the card file is specified by
|
|
|
|
<replaceable>file-id</replaceable>.
|
2018-05-08 06:25:15 +00:00
|
|
|
</para>
|
|
|
|
<para>
|
2018-06-30 17:28:29 +00:00
|
|
|
If <replaceable>output</replaceable> is omitted,
|
|
|
|
the name of the output file will be derived from the
|
|
|
|
full card path to <replaceable>file-id</replaceable>.
|
2018-05-08 06:25:15 +00:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term>
|
2018-05-26 19:05:55 +00:00
|
|
|
<command>info</command>
|
|
|
|
<arg choice="opt"><replaceable>file-id</replaceable></arg>
|
2018-05-08 06:25:15 +00:00
|
|
|
</term>
|
2018-06-30 17:28:29 +00:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Display attributes of a file specified by
|
|
|
|
<replaceable>file-id</replaceable>.
|
2018-05-08 06:25:15 +00:00
|
|
|
If <replaceable>file-id</replaceable> is not supplied,
|
2018-06-30 17:28:29 +00:00
|
|
|
the attributes of the current file are displayed.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
2018-05-08 06:25:15 +00:00
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term>
|
2018-05-26 19:05:55 +00:00
|
|
|
<command>ls</command>
|
|
|
|
<arg choice="opt" rep="repeat"><replaceable>pattern</replaceable></arg>
|
2018-05-08 06:25:15 +00:00
|
|
|
</term>
|
2018-06-30 17:28:29 +00:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
List files in the current DF.
|
|
|
|
If no <replaceable>pattern</replaceable> is given,
|
|
|
|
then all files are listed.
|
|
|
|
If one ore more <replaceable>pattern</replaceable>s are given,
|
|
|
|
only files matching at least one
|
|
|
|
<replaceable>pattern</replaceable> are listed.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
2018-05-08 06:25:15 +00:00
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term>
|
2018-05-26 19:05:55 +00:00
|
|
|
<command>find</command>
|
|
|
|
<arg choice="opt">
|
|
|
|
<replaceable>start-id</replaceable>
|
|
|
|
<arg choice="opt"><replaceable>end-id</replaceable></arg>
|
|
|
|
</arg>
|
2018-05-08 06:25:15 +00:00
|
|
|
</term>
|
2018-06-30 17:28:29 +00:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Find all files in the current DF.
|
|
|
|
Files are found by selecting all file identifiers in the range
|
|
|
|
from <replaceable>start-fid</replaceable>
|
|
|
|
to <replaceable>end-fid</replaceable>.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
If not given, the default value for
|
|
|
|
<replaceable>start-fid</replaceable> is <literal>0000</literal>,
|
|
|
|
while the default for <replaceable>end-fid</replaceable> is
|
|
|
|
<literal>FFFF</literal>.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
2018-05-08 06:25:15 +00:00
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term>
|
2018-05-26 19:05:55 +00:00
|
|
|
<command>find_tags</command>
|
|
|
|
<arg choice="opt">
|
|
|
|
<replaceable>start-tag</replaceable>
|
|
|
|
<arg choice="opt"><replaceable>end-tag</replaceable></arg>
|
|
|
|
</arg>
|
2018-05-08 06:25:15 +00:00
|
|
|
</term>
|
2018-06-30 17:28:29 +00:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Find all tags of data objects in the current context.
|
|
|
|
Tags are found by using GET DATA in the range from
|
|
|
|
from <replaceable>start-tag</replaceable>
|
|
|
|
to <replaceable>end-tag</replaceable>.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
If not given, the default value for
|
|
|
|
<replaceable>start-tag</replaceable> is <literal>0000</literal>,
|
|
|
|
while the default for <replaceable>end-tag</replaceable> is
|
|
|
|
<literal>FFFF</literal>.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
2018-05-08 06:25:15 +00:00
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term>
|
2018-05-26 19:05:55 +00:00
|
|
|
<command>mkdir</command>
|
|
|
|
<replaceable>file-id</replaceable>
|
|
|
|
<replaceable>size</replaceable>
|
2018-05-08 06:25:15 +00:00
|
|
|
</term>
|
2018-06-30 17:28:29 +00:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Create a DF.
|
|
|
|
<replaceable>file-id</replaceable> specifies the numeric id,
|
|
|
|
and <replaceable>size</replaceable> the size of the DF to create.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
2018-05-08 06:25:15 +00:00
|
|
|
</varlistentry>
|
|
|
|
|
2018-06-17 10:52:19 +00:00
|
|
|
<varlistentry>
|
|
|
|
<term>
|
|
|
|
<command>pin_info</command>
|
|
|
|
<replaceable>key-type</replaceable><replaceable>key-id</replaceable>
|
|
|
|
</term>
|
2018-06-30 17:28:29 +00:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Get information on a PIN or key from the card, where
|
|
|
|
<replaceable>key-type</replaceable> can be one of
|
|
|
|
<literal>CHV</literal>, <literal>KEY</literal>,
|
|
|
|
<literal>AUT</literal> or <literal>PRO</literal>.
|
|
|
|
<replaceable>key-id</replaceable> is a number
|
|
|
|
representing the key or PIN reference.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
2018-06-17 10:52:19 +00:00
|
|
|
</varlistentry>
|
|
|
|
|
2018-05-08 06:25:15 +00:00
|
|
|
<varlistentry>
|
|
|
|
<term>
|
2018-05-26 19:05:55 +00:00
|
|
|
<command>put</command>
|
|
|
|
<replaceable>file-id</replaceable>
|
|
|
|
<replaceable>input</replaceable>
|
2018-05-08 06:25:15 +00:00
|
|
|
</term>
|
2018-06-30 17:28:29 +00:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Copy a local file to the card.
|
|
|
|
The local file is specified by <replaceable>input</replaceable>
|
|
|
|
while the card file is specified by
|
|
|
|
<replaceable>file-id</replaceable>.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
2018-05-08 06:25:15 +00:00
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term>
|
|
|
|
<command>quit</command>
|
|
|
|
</term>
|
|
|
|
<listitem><para>Exit the program.</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term>
|
2018-05-26 19:05:55 +00:00
|
|
|
<command>random</command>
|
|
|
|
<replaceable>count</replaceable>
|
2018-05-08 06:25:15 +00:00
|
|
|
</term>
|
|
|
|
<listitem>
|
2018-06-30 17:28:29 +00:00
|
|
|
<para>
|
|
|
|
Generate <replaceable>count</replaceable> bytes of random data.
|
|
|
|
</para>
|
2018-05-08 06:25:15 +00:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term>
|
2018-05-26 19:05:55 +00:00
|
|
|
<command>rm</command>
|
|
|
|
<replaceable>file-id</replaceable>
|
2018-05-08 06:25:15 +00:00
|
|
|
</term>
|
2018-06-30 17:28:29 +00:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Remove the EF or DF specified by
|
|
|
|
<replaceable>file-id</replaceable>.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
2018-05-08 06:25:15 +00:00
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term>
|
2018-05-26 19:05:55 +00:00
|
|
|
<command>unblock</command>
|
|
|
|
<literal>CHV</literal><replaceable>pin-ref</replaceable>
|
|
|
|
<arg choice="opt">
|
|
|
|
<replaceable>puk</replaceable>
|
|
|
|
<arg choice="opt"><replaceable>new-pin</replaceable></arg>
|
|
|
|
</arg>
|
2018-05-08 06:25:15 +00:00
|
|
|
</term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Unblock the PIN denoted by <replaceable>pin-ref</replaceable>
|
2018-06-30 17:28:29 +00:00
|
|
|
using the PUK <replaceable>puk</replaceable>, and potentially
|
2018-05-26 19:05:55 +00:00
|
|
|
change its value to <replaceable>new-pin</replaceable>.
|
2018-05-08 06:25:15 +00:00
|
|
|
</para>
|
|
|
|
<para>
|
2018-06-30 17:28:29 +00:00
|
|
|
<replaceable>puk</replaceable> and
|
|
|
|
<replaceable>new-pin</replaceable> can be
|
|
|
|
sequences of hexadecimal values,
|
|
|
|
strings enclosed in double quotes (<literal>"..."</literal>),
|
|
|
|
empty (<literal>""</literal>), or absent.
|
|
|
|
If absent, the values are read from the card reader's pin pad.
|
2018-05-08 06:25:15 +00:00
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
Examples:
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term><code>unblock CHV2 00:00:00:00:00:00 "foobar"</code></term>
|
|
|
|
<listitem><para>
|
|
|
|
Unblock PIN <literal>CHV2</literal> using PUK
|
|
|
|
<literal>00:00:00:00:00:00</literal>
|
|
|
|
and set it to the new value <literal>foobar</literal>.
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><code>unblock CHV2 00:00:00:00:00:00 ""</code></term>
|
|
|
|
<listitem><para>
|
|
|
|
Unblock PIN <literal>CHV2</literal> using PUK
|
|
|
|
<literal>00:00:00:00:00:00</literal> keeping the old value.
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><code>unblock CHV2 "" "foobar"</code></term>
|
|
|
|
<listitem><para>
|
|
|
|
Set new value of PIN <literal>CHV2</literal>
|
|
|
|
to <literal>foobar</literal>.
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><code>unblock CHV2 00:00:00:00:00:00</code></term>
|
|
|
|
<listitem><para>
|
|
|
|
Unblock PIN <literal>CHV2</literal> using PUK
|
|
|
|
<literal>00:00:00:00:00:00</literal>.
|
|
|
|
The new PIN value is prompted by pinpad.
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><code>unblock CHV2 ""</code></term>
|
|
|
|
<listitem><para>
|
|
|
|
Set PIN <literal>CHV2</literal>.
|
|
|
|
The new PIN value is prompted by pinpad.
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><code>unblock CHV2</code></term>
|
|
|
|
<listitem><para>
|
|
|
|
Unblock PIN <literal>CHV2</literal>.
|
|
|
|
The unblock code and new PIN value are prompted by pinpad.
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term>
|
2018-05-26 19:05:55 +00:00
|
|
|
<command>update_binary</command>
|
|
|
|
<replaceable>file-id</replaceable>
|
|
|
|
<replaceable>offs</replaceable>
|
|
|
|
<replaceable>data</replaceable>
|
2018-05-08 06:25:15 +00:00
|
|
|
</term>
|
|
|
|
<listitem>
|
2018-06-30 17:28:29 +00:00
|
|
|
<para>
|
|
|
|
Binary update of the file specified by
|
2018-05-08 06:25:15 +00:00
|
|
|
<replaceable>file-id</replaceable> with the literal data
|
|
|
|
<replaceable>data</replaceable> starting from offset specified
|
2018-06-30 17:28:29 +00:00
|
|
|
by <replaceable>offs</replaceable>.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
<replaceable>data</replaceable> can be supplied as a sequence
|
|
|
|
of hexadecimal values or as a string enclosed in double quotes
|
|
|
|
(<literal>"..."</literal>).
|
|
|
|
</para>
|
2018-05-08 06:25:15 +00:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term>
|
2018-05-26 19:05:55 +00:00
|
|
|
<command>update_record</command>
|
|
|
|
<replaceable>file-id</replaceable>
|
|
|
|
<replaceable>rec-nr</replaceable>
|
|
|
|
<replaceable>rec-offs</replaceable>
|
|
|
|
<replaceable>data</replaceable>
|
2018-05-08 06:25:15 +00:00
|
|
|
</term>
|
|
|
|
<listitem>
|
2018-06-30 17:28:29 +00:00
|
|
|
<para>
|
|
|
|
Update record specified by <replaceable>rec-nr</replaceable>
|
|
|
|
of the file specified by <replaceable>file-id</replaceable>
|
|
|
|
with the literal data <replaceable>data</replaceable>
|
|
|
|
starting from offset specified by
|
|
|
|
<replaceable>rec-offs</replaceable>.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
<replaceable>data</replaceable> can be supplied as a sequence
|
|
|
|
of hexadecimal values or as a string enclosed in double quotes
|
|
|
|
(<literal>"..."</literal>).
|
|
|
|
</para>
|
2018-05-08 06:25:15 +00:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term>
|
2018-05-26 19:05:55 +00:00
|
|
|
<command>verify</command>
|
|
|
|
<replaceable>key-type</replaceable><replaceable>key-id</replaceable>
|
|
|
|
<arg choice="opt"><replaceable>key</replaceable></arg>
|
2018-05-08 06:25:15 +00:00
|
|
|
</term>
|
2018-06-30 17:28:29 +00:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Present a PIN or key to the card, where
|
|
|
|
<replaceable>key-type</replaceable> can be one of
|
|
|
|
<literal>CHV</literal>, <literal>KEY</literal>,
|
|
|
|
<literal>AUT</literal> or <literal>PRO</literal>.
|
|
|
|
<replaceable>key-id</replaceable> is a number representing
|
|
|
|
the key or PIN reference.
|
|
|
|
<replaceable>key</replaceable> is the key or PIN to be verified,
|
|
|
|
formatted as a colon-separated sequence of hexadecimal values
|
|
|
|
or a string enclosed in double quotes (<literal>"..."</literal>).
|
2018-05-08 06:25:15 +00:00
|
|
|
</para>
|
|
|
|
<para>
|
2018-06-30 17:28:29 +00:00
|
|
|
If <replaceable>key</replaceable> is omitted, the exact action
|
|
|
|
depends on the card reader's features:
|
|
|
|
if the card readers supports PIN input via a pin pad,
|
2018-05-08 06:25:15 +00:00
|
|
|
then the PIN will be verified using the card reader's pin pad.
|
2018-06-30 17:28:29 +00:00
|
|
|
If the card reader does not support PIN input,
|
|
|
|
then the PIN will be asked interactively.
|
2018-05-08 06:25:15 +00:00
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
Examples:
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
2018-06-30 17:28:29 +00:00
|
|
|
<term><code>verify CHV2 31:32:33:34:00:00:00:00</code></term>
|
2018-05-08 06:25:15 +00:00
|
|
|
<listitem><para>
|
|
|
|
Verify <literal>CHV2</literal> using the hex value
|
|
|
|
<literal>31:32:33:34:00:00:00:00</literal>
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><code>verify CHV1 "secret"</code></term>
|
|
|
|
<listitem><para>
|
|
|
|
Verify <literal>CHV1</literal>
|
|
|
|
using the string value <literal>secret</literal>.
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><code>verify KEY2</code></term>
|
|
|
|
<listitem><para>
|
|
|
|
Verify <literal>KEY2</literal>,
|
|
|
|
get the value from the card reader's pin pad.
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term>
|
2018-05-26 19:05:55 +00:00
|
|
|
<command>sm</command>
|
|
|
|
<group choice="req">
|
|
|
|
<arg choice="plain"><literal>open</literal></arg>
|
|
|
|
<arg choice="plain"><literal>close</literal></arg>
|
|
|
|
</group>
|
2018-05-08 06:25:15 +00:00
|
|
|
</term>
|
|
|
|
<listitem>
|
2018-06-30 17:28:29 +00:00
|
|
|
<para>
|
|
|
|
Call the card's <literal>open</literal> or
|
|
|
|
<literal>close</literal> Secure Messaging handler.
|
|
|
|
</para>
|
2018-05-08 06:25:15 +00:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
</variablelist>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
2011-08-15 08:40:57 +00:00
|
|
|
|
2005-07-20 00:43:38 +00:00
|
|
|
<refsect1>
|
|
|
|
<title>See also</title>
|
2011-08-14 20:31:31 +00:00
|
|
|
<para>
|
|
|
|
<citerefentry>
|
|
|
|
<refentrytitle>opensc-tool</refentrytitle>
|
|
|
|
<manvolnum>1</manvolnum>
|
|
|
|
</citerefentry>
|
|
|
|
</para>
|
2005-07-20 00:43:38 +00:00
|
|
|
</refsect1>
|
|
|
|
|
2018-05-08 06:25:15 +00:00
|
|
|
<refsect1>
|
|
|
|
<title>Authors</title>
|
|
|
|
<para><command>opensc-explorer</command> was written by
|
|
|
|
Juha Yrjölä <email>juha.yrjola@iki.fi</email>.</para>
|
|
|
|
</refsect1>
|
|
|
|
|
2005-07-20 00:43:38 +00:00
|
|
|
</refentry>
|