"Fossies" - the Fresh Open Source Software Archive

Member "opensc-0.22.0/doc/tools/opensc-explorer.1.xml" (10 Aug 2021, 26543 Bytes) of package /linux/privat/opensc-0.22.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) XML source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "opensc-explorer.1.xml": 0.20.0_vs_0.21.0.

    1 <?xml version="1.0" encoding="UTF-8"?>
    2 <refentry id="opensc-explorer">
    3     <refmeta>
    4         <refentrytitle>opensc-explorer</refentrytitle>
    5         <manvolnum>1</manvolnum>
    6         <refmiscinfo class="productname">OpenSC</refmiscinfo>
    7         <refmiscinfo class="manual">OpenSC Tools</refmiscinfo>
    8         <refmiscinfo class="source">opensc</refmiscinfo>
    9     </refmeta>
   10 
   11     <refnamediv>
   12         <refname>opensc-explorer</refname>
   13         <refpurpose>
   14             generic interactive utility for accessing smart card
   15             and similar security token functions
   16         </refpurpose>
   17     </refnamediv>
   18 
   19     <refsynopsisdiv>
   20         <cmdsynopsis>
   21             <command>opensc-explorer</command>
   22             <arg choice="opt"><replaceable class="option">OPTIONS</replaceable></arg>
   23             <arg choice="opt"><replaceable class="parameter">SCRIPT</replaceable></arg>
   24         </cmdsynopsis>
   25     </refsynopsisdiv>
   26 
   27     <refsect1>
   28         <title>Description</title>
   29         <para>
   30             The <command>opensc-explorer</command> utility can be
   31             used to perform miscellaneous operations
   32             such as exploring the contents of or sending arbitrary
   33             APDU commands to a smart card or similar security token.
   34         </para>
   35         <para>
   36             If a <replaceable class="parameter">SCRIPT</replaceable> is given,
   37             <command>opensc-explorer</command> runs in non-interactive mode,
   38             reading the commands from <replaceable class="parameter">SCRIPT</replaceable>,
   39             one command per line.
   40             If no script is given, <command>opensc-explorer</command>
   41             runs in interactive mode, reading commands from standard input.
   42         </para>
   43     </refsect1>
   44 
   45     <refsect1>
   46         <title>Options</title>
   47         <para>
   48             The following are the command-line options for
   49             <command>opensc-explorer</command>.  There are additional
   50             interactive commands available once it is running.
   51             <variablelist>
   52                 <varlistentry>
   53                     <term>
   54                         <option>--card-driver</option> <replaceable>driver</replaceable>,
   55                         <option>-c</option> <replaceable>driver</replaceable>
   56                     </term>
   57                     <listitem><para>
   58                         Use the given card driver.
   59                         The default is to auto-detect the correct card driver.
   60                         The literal value <literal>?</literal> lists
   61                         all available card drivers and terminates
   62                         <command>opensc-explorer</command>.
   63                     </para></listitem>
   64                 </varlistentry>
   65                 <varlistentry>
   66                     <term>
   67                         <option>--mf</option> <replaceable>path</replaceable>,
   68                         <option>-m</option> <replaceable>path</replaceable>
   69                     </term>
   70                     <listitem>
   71                         <para>
   72                             Select the file referenced by the given path on startup.
   73                             The default is the path to the standard master file,
   74                             <literal>3F00</literal>. If <replaceable>path</replaceable>
   75                             is empty (e.g. <command>opensc-explorer --mf ""</command>),
   76                             then no file is explicitly selected.
   77                         </para>
   78                     </listitem>
   79                 </varlistentry>
   80                 <varlistentry>
   81                     <term>
   82                         <option>--reader</option> <replaceable>arg</replaceable>,
   83                         <option>-r</option> <replaceable>arg</replaceable>
   84                     </term>
   85                     <listitem>
   86                         <para>
   87                             Number of the reader to use. By default, the first
   88                             reader with a present card is used. If
   89                             <replaceable>arg</replaceable> is an ATR, the
   90                             reader with a matching card will be chosen.
   91                         </para>
   92                     </listitem>
   93                 </varlistentry>
   94                 <varlistentry>
   95                     <term>
   96                         <option>--verbose</option>, <option>-v</option>
   97                     </term>
   98                     <listitem>
   99                         <para>
  100                             Cause <command>opensc-explorer</command> to be more
  101                             verbose. Specify this flag several times to enable
  102                             debug output in the opensc library.
  103                         </para>
  104                     </listitem>
  105                 </varlistentry>
  106                 <varlistentry>
  107                     <term>
  108                         <option>--wait</option>, <option>-w</option>
  109                     </term>
  110                     <listitem>
  111                         <para>
  112                             Wait for a card to be inserted.
  113                         </para>
  114                     </listitem>
  115                 </varlistentry>
  116             </variablelist>
  117         </para>
  118     </refsect1>
  119 
  120     <refsect1>
  121         <title>Commands</title>
  122         <para>
  123             <command>opensc-explorer</command> supports commands with arguments
  124             at its interactive prompt or in script files passed via the command line
  125             parameter <replaceable class="parameter">SCRIPT</replaceable>.
  126         </para>
  127         <para>
  128             Similar to a command shell like e.g. <code>bash</code>,
  129             each input line is split into white-space separated words.
  130             Of these words, the first one is used as the command,
  131             while the remaining ones are treated as arguments to that command.
  132         </para>
  133         <para>
  134             The following commands are supported:
  135             <variablelist>
  136                 <varlistentry>
  137                     <term>
  138                         <command>#</command>
  139                         <arg choice="plain" rep="repeat"><replaceable></replaceable></arg>
  140                     </term>
  141                     <listitem>
  142                         <para>
  143                             Treat line as a comment.
  144                             Ignore anything until the end of the line introduced by
  145                             <literal>#</literal>.
  146                         </para>
  147                     </listitem>
  148                 </varlistentry>
  149 
  150                 <varlistentry>
  151                     <term>
  152                         <command>apdu</command>
  153                         <arg choice="plain" rep="repeat"><replaceable>data</replaceable></arg>
  154                     </term>
  155                     <listitem>
  156                         <para>
  157                             Send a custom APDU command to the card.
  158                             <replaceable>data</replaceable> is a series of
  159                             sequences of hexadecimal values and strings enclosed
  160                             in double quotes (<literal>"..."</literal>).
  161                         </para>
  162                     </listitem>
  163                 </varlistentry>
  164 
  165                 <varlistentry>
  166                     <term>
  167                         <command>asn1</command>
  168                         <replaceable>file-id</replaceable>
  169                         <arg choice="opt"><replaceable>rec-no</replaceable></arg>
  170                         <arg choice="opt"><replaceable>offs</replaceable></arg>
  171                     </term>
  172                     <listitem>
  173                         <para>
  174                             Parse and print the ASN.1 encoded content of the working EF
  175                             specified by <replaceable>file-id</replaceable>.
  176                             If the optional parameter
  177                             <replaceable>rec-no</replaceable> is given and the file is
  178                             a record-oriented EF, parse and print only the record
  179                             indicated by this parameter.
  180                             If the optional parameter
  181                             <replaceable>offs</replaceable> is given, start parsing
  182                             and printing the file or record at the offset indicated
  183                             by the value given.
  184                             If this parameter is not given, the default offset is
  185                             <literal>0</literal>.
  186                         </para>
  187                     </listitem>
  188                 </varlistentry>
  189 
  190                 <varlistentry>
  191                     <term>
  192                         <command>cat</command>
  193                         <group choice="opt">
  194                             <arg choice="plain"><replaceable>file-id</replaceable></arg>
  195                             <arg choice="plain"><literal>sfi:</literal><replaceable>short-id</replaceable></arg>
  196                         </group>
  197                         <arg choice="opt"><replaceable>rec-no</replaceable></arg>
  198                     </term>
  199                     <listitem>
  200                         <para>
  201                             Print the contents of the working EF specified by
  202                             <replaceable>file-id</replaceable> or the short file id
  203                             <replaceable>short-id</replaceable>.
  204                             If the optional second parameter
  205                             <replaceable>rec-no</replaceable> is given,
  206                             only print the record indicated by this parameter.
  207                             If no argument is given, print the the contents
  208                             of the currently selected EF.
  209                         </para>
  210                     </listitem>
  211                 </varlistentry>
  212 
  213                 <varlistentry>
  214                     <term>
  215                         <command>cd</command>
  216                         <group choice="req">
  217                             <arg choice="plain"><literal>..</literal></arg>
  218                             <arg choice="plain"><replaceable>file-id</replaceable></arg>
  219                             <arg choice="plain"><literal>aid:</literal><replaceable>DF-name</replaceable></arg>
  220                         </group>
  221                     </term>
  222                     <listitem>
  223                         <para>
  224                             Change to another DF specified by the argument passed.
  225                             If the argument given is <literal>..</literal>,
  226                             then move up one level in the file system hierarchy.
  227                             If it is a <replaceable>file-id</replaceable>,
  228                             which must be a DF directly
  229                             beneath the current DF, then change to that DF.
  230                             If it is an application identifier given as
  231                             <literal>aid:</literal><replaceable>DF-name</replaceable>,
  232                             then jump to the MF of the application denoted by
  233                             <replaceable>DF-name</replaceable>.
  234                         </para>
  235                     </listitem>
  236                 </varlistentry>
  237 
  238                 <varlistentry>
  239                     <term>
  240                         <command>change</command>
  241                         <arg choice="plain"><literal>CHV</literal><replaceable>pin-ref</replaceable></arg>
  242                         <arg choice="opt">
  243                             <arg choice="opt"><replaceable>old-pin</replaceable></arg>
  244                             <replaceable>new-pin</replaceable>
  245                         </arg>
  246                     </term>
  247                     <listitem>
  248                         <para>
  249                             Change the PIN specified by <replaceable>pin-ref</replaceable>
  250                             from the value given by <replaceable>old-pin</replaceable> and
  251                             change its value to <replaceable>new-pin</replaceable>.
  252                         </para>
  253                         <para>
  254                             <replaceable>old-pin</replaceable> and
  255                             <replaceable>new-pin</replaceable> can be
  256                             sequences of hexadecimal values,
  257                             strings enclosed in double quotes (<literal>"..."</literal>),
  258                             empty (<literal>""</literal>), or absent.
  259                             If absent, the values are read from the card reader's pin pad.
  260                         </para>
  261                         <para>
  262                             Examples:
  263                             <variablelist>
  264                                 <varlistentry>
  265                                     <term><code>change CHV2 00:00:00:00:00:00 "foobar"</code></term>
  266                                     <listitem><para>
  267                                             Change PIN <literal>CHV2</literal>
  268                                             to the new value <literal>foobar</literal>,
  269                                             giving the old value <literal>00:00:00:00:00:00</literal>.
  270                                     </para></listitem>
  271                                 </varlistentry>
  272                                 <varlistentry>
  273                                     <term><code>change CHV2 "foobar"</code></term>
  274                                     <listitem><para>
  275                                             Set PIN <literal>CHV2</literal>
  276                                             to the new value <literal>foobar</literal>.
  277                                     </para></listitem>
  278                                 </varlistentry>
  279                                 <varlistentry>
  280                                     <term><code>change CHV2</code></term>
  281                                     <listitem><para>
  282                                             Change PIN <literal>CHV2</literal> using the card reader's pinpad.
  283                                     </para></listitem>
  284                                 </varlistentry>
  285                             </variablelist>
  286                         </para>
  287                     </listitem>
  288                 </varlistentry>
  289 
  290                 <varlistentry>
  291                     <term>
  292                         <command>create</command>
  293                         <replaceable>file-id</replaceable>
  294                         <replaceable>size</replaceable>
  295                     </term>
  296                     <listitem>
  297                         <para>
  298                             Create a new EF.
  299                             <replaceable>file-id</replaceable> specifies the numeric id, and
  300                             <replaceable>size</replaceable> the size of the EF to create.
  301                         </para>
  302                     </listitem>
  303                 </varlistentry>
  304 
  305                 <varlistentry>
  306                     <term>
  307                         <command>debug</command>
  308                         <arg choice="opt"><replaceable>level</replaceable></arg>
  309                     </term>
  310                     <listitem>
  311                         <para>
  312                             Set OpenSC debug level to <replaceable>level</replaceable>.
  313                         </para>
  314                         <para>
  315                             If <replaceable>level</replaceable> is omitted,
  316                             show the current debug level.
  317                         </para>
  318                     </listitem>
  319                 </varlistentry>
  320 
  321                 <varlistentry>
  322                     <term>
  323                         <command>delete</command>
  324                         <replaceable>file-id</replaceable>
  325                     </term>
  326                     <listitem>
  327                         <para>
  328                             Remove the EF or DF specified by
  329                             <replaceable>file-id</replaceable>.
  330                         </para>
  331                     </listitem>
  332                 </varlistentry>
  333 
  334                 <varlistentry>
  335                     <term>
  336                         <command>do_get</command>
  337                         <replaceable>hex-tag</replaceable>
  338                         <arg choice="opt"><replaceable>output</replaceable></arg>
  339                     </term>
  340                     <listitem>
  341                         <para>
  342                             Copy the contents of the card's data object
  343                             (<acronym>DO</acronym>)
  344                             specified by <replaceable>hex-tag</replaceable>
  345                             to the local host computer's file named
  346                             <replaceable>output</replaceable>.
  347                         </para>
  348                         <para>
  349                             If <replaceable>output</replaceable> is not given,
  350                             the contents of <replaceable>hex-tag</replaceable>
  351                             will be displayed as hex-dump.
  352                         </para>
  353                     </listitem>
  354                 </varlistentry>
  355 
  356                 <varlistentry>
  357                     <term>
  358                         <command>do_put</command>
  359                         <replaceable>hex-tag</replaceable>
  360                         <replaceable>data</replaceable>
  361                     </term>
  362                     <listitem>
  363                         <para>
  364                             Change the contents of the card's data object
  365                             (<acronym>DO</acronym>)
  366                             specified by <replaceable>hex-tag</replaceable>
  367                             to <replaceable>data</replaceable>.
  368                         </para>
  369                         <para>
  370                             <replaceable>data</replaceable> is either a
  371                             sequence of hexadecimal values or a string enclosed
  372                             in double quotes (<literal>"..."</literal>).
  373                         </para>
  374                     </listitem>
  375                 </varlistentry>
  376 
  377                 <varlistentry>
  378                     <term>
  379                         <command>echo</command>
  380                         <arg choice="plain" rep="repeat"><replaceable>string</replaceable></arg>
  381                     </term>
  382                     <listitem>
  383                         <para>
  384                             Print the <replaceable>string</replaceable>s given.
  385                         </para>
  386                     </listitem>
  387                 </varlistentry>
  388 
  389                 <varlistentry>
  390                     <term>
  391                         <command>erase</command>
  392                     </term>
  393                     <listitem>
  394                         <para>
  395                             Erase the card, if the card supports it.
  396                         </para>
  397                     </listitem>
  398                 </varlistentry>
  399 
  400                 <varlistentry>
  401                     <term>
  402                         <command>get</command>
  403                         <replaceable>file-id</replaceable>
  404                         <arg choice="opt"><replaceable>output</replaceable></arg>
  405                     </term>
  406                     <listitem>
  407                         <para>
  408                             Copy an EF to a local file.
  409                             The local file is specified by
  410                             <replaceable>output</replaceable>
  411                             while the card file is specified by
  412                             <replaceable>file-id</replaceable>.
  413                         </para>
  414                         <para>
  415                             If <replaceable>output</replaceable> is omitted,
  416                             the name of the output file will be derived from the
  417                             full card path to <replaceable>file-id</replaceable>.
  418                         </para>
  419                     </listitem>
  420                 </varlistentry>
  421 
  422                 <varlistentry>
  423                     <term>
  424                         <command>get_record</command>
  425                         <replaceable>file-id</replaceable>
  426                         <replaceable>rec-no</replaceable>
  427                         <arg choice="opt"><replaceable>output</replaceable></arg>
  428                     </term>
  429                     <listitem>
  430                         <para>
  431                             Copy a record of a record-oriented EF to a local file.
  432                             The local file is specified by
  433                             <replaceable>output</replaceable>
  434                             while the card file and the record are specified by
  435                             <replaceable>file-id</replaceable> and
  436                             <replaceable>rec-no</replaceable>,
  437                         </para>
  438                         <para>
  439                             If <replaceable>output</replaceable> is omitted,
  440                             the name of the output file will be derived from the
  441                             full card path to <replaceable>file-id</replaceable>.
  442                             and the <replaceable>rec-no</replaceable>.
  443                         </para>
  444                     </listitem>
  445                 </varlistentry>
  446 
  447                 <varlistentry>
  448                     <term>
  449                         <command>help</command>
  450                         <arg choice="opt"><replaceable>pattern</replaceable></arg>
  451                     </term>
  452                     <listitem>
  453                         <para>
  454                             Display the list of available commands, their options
  455                             and parameters together with a short help text.
  456                             If <replaceable>pattern</replaceable> is given,
  457                             the commands shown are limited to those matching
  458                             <replaceable>pattern</replaceable>.
  459                         </para>
  460                     </listitem>
  461                 </varlistentry>
  462 
  463                 <varlistentry>
  464                     <term>
  465                         <command>info</command>
  466                         <arg choice="opt"><replaceable>file-id</replaceable></arg>
  467                     </term>
  468                     <listitem>
  469                         <para>
  470                             Display attributes of a file specified by
  471                             <replaceable>file-id</replaceable>.
  472                             If <replaceable>file-id</replaceable> is not supplied,
  473                             the attributes of the current file are displayed.
  474                         </para>
  475                     </listitem>
  476                 </varlistentry>
  477 
  478                 <varlistentry>
  479                     <term>
  480                         <command>ls</command>
  481                         <arg choice="opt" rep="repeat"><replaceable>pattern</replaceable></arg>
  482                     </term>
  483                     <listitem>
  484                         <para>
  485                             List files in the current DF.
  486                             If no <replaceable>pattern</replaceable> is given,
  487                             then all files are listed.
  488                             If one ore more <replaceable>pattern</replaceable>s are given,
  489                             only files matching at least one
  490                             <replaceable>pattern</replaceable> are listed.
  491                         </para>
  492                     </listitem>
  493                 </varlistentry>
  494 
  495                 <varlistentry>
  496                     <term>
  497                         <command>find</command>
  498                         <arg choice="opt">
  499                             <replaceable>start-id</replaceable>
  500                             <arg choice="opt"><replaceable>end-id</replaceable></arg>
  501                         </arg>
  502                     </term>
  503                     <listitem>
  504                         <para>
  505                             Find all files in the current DF.
  506                             Files are found by selecting all file identifiers in the range
  507                             from <replaceable>start-fid</replaceable>
  508                             to <replaceable>end-fid</replaceable>.
  509                         </para>
  510                         <para>
  511                             If not given, the default value for
  512                             <replaceable>start-fid</replaceable> is <literal>0000</literal>,
  513                             while the default for <replaceable>end-fid</replaceable> is
  514                             <literal>FFFF</literal>.
  515                         </para>
  516                     </listitem>
  517                 </varlistentry>
  518 
  519                 <varlistentry>
  520                     <term>
  521                         <command>find_tags</command>
  522                         <arg choice="opt">
  523                             <replaceable>start-tag</replaceable>
  524                             <arg choice="opt"><replaceable>end-tag</replaceable></arg>
  525                         </arg>
  526                     </term>
  527                     <listitem>
  528                         <para>
  529                             Find all tags of data objects in the current context.
  530                             Tags are found by using GET DATA in the range from
  531                             from <replaceable>start-tag</replaceable>
  532                             to <replaceable>end-tag</replaceable>.
  533                         </para>
  534                         <para>
  535                             If not given, the default value for
  536                             <replaceable>start-tag</replaceable> is <literal>0000</literal>,
  537                             while the default for <replaceable>end-tag</replaceable> is
  538                             <literal>FFFF</literal>.
  539                         </para>
  540                     </listitem>
  541                 </varlistentry>
  542 
  543                 <varlistentry>
  544                     <term>
  545                         <command>mkdir</command>
  546                         <replaceable>file-id</replaceable>
  547                         <replaceable>size</replaceable>
  548                     </term>
  549                     <listitem>
  550                         <para>
  551                             Create a DF.
  552                             <replaceable>file-id</replaceable> specifies the numeric id,
  553                             and <replaceable>size</replaceable> the size of the DF to create.
  554                         </para>
  555                     </listitem>
  556                 </varlistentry>
  557 
  558                 <varlistentry>
  559                     <term>
  560                         <command>pin_info</command>
  561                         <replaceable>key-type</replaceable><replaceable>key-id</replaceable>
  562                     </term>
  563                     <listitem>
  564                         <para>
  565                             Get information on a PIN or key from the card, where
  566                             <replaceable>key-type</replaceable> can be one of
  567                             <literal>CHV</literal>, <literal>KEY</literal>,
  568                             <literal>AUT</literal> or <literal>PRO</literal>.
  569                             <replaceable>key-id</replaceable> is a number
  570                             representing the key or PIN reference.
  571                         </para>
  572                     </listitem>
  573                 </varlistentry>
  574 
  575                 <varlistentry>
  576                     <term>
  577                         <command>put</command>
  578                         <replaceable>file-id</replaceable>
  579                         <replaceable>input</replaceable>
  580                     </term>
  581                     <listitem>
  582                         <para>
  583                             Copy a local file to the card.
  584                             The local file is specified by <replaceable>input</replaceable>
  585                             while the card file is specified by
  586                             <replaceable>file-id</replaceable>.
  587                         </para>
  588                     </listitem>
  589                 </varlistentry>
  590 
  591                 <varlistentry>
  592                     <term>
  593                         <command>quit</command>
  594                     </term>
  595                     <listitem><para>Exit the program.</para></listitem>
  596                 </varlistentry>
  597 
  598                 <varlistentry>
  599                     <term>
  600                         <command>random</command>
  601                         <replaceable>count</replaceable>
  602                         <arg choice="opt"><replaceable>output-file</replaceable></arg>
  603                     </term>
  604                     <listitem>
  605                         <para>
  606                             Generate <replaceable>count</replaceable> bytes
  607                             of random data.
  608                             If <replaceable>output-file</replaceable> is given,
  609                             write the data to the host computer's file denoted
  610                             by it, otherwise show the data as hex dump.
  611                         </para>
  612                     </listitem>
  613                 </varlistentry>
  614 
  615                 <varlistentry>
  616                     <term>
  617                         <command>rm</command>
  618                         <replaceable>file-id</replaceable>
  619                     </term>
  620                     <listitem>
  621                         <para>
  622                             Remove the EF or DF specified by
  623                             <replaceable>file-id</replaceable>.
  624                         </para>
  625                     </listitem>
  626                 </varlistentry>
  627 
  628                 <varlistentry>
  629                     <term>
  630                         <command>unblock</command>
  631                         <literal>CHV</literal><replaceable>pin-ref</replaceable>
  632                         <arg choice="opt">
  633                             <replaceable>puk</replaceable>
  634                             <arg choice="opt"><replaceable>new-pin</replaceable></arg>
  635                         </arg>
  636                     </term>
  637                     <listitem>
  638                         <para>
  639                             Unblock the PIN denoted by <replaceable>pin-ref</replaceable>
  640                             using the PUK <replaceable>puk</replaceable>, and potentially
  641                             change its value to <replaceable>new-pin</replaceable>.
  642                         </para>
  643                         <para>
  644                             <replaceable>puk</replaceable> and
  645                             <replaceable>new-pin</replaceable> can be
  646                             sequences of hexadecimal values,
  647                             strings enclosed in double quotes (<literal>"..."</literal>),
  648                             empty (<literal>""</literal>), or absent.
  649                             If absent, the values are read from the card reader's pin pad.
  650                         </para>
  651                         <para>
  652                             Examples:
  653                             <variablelist>
  654                                 <varlistentry>
  655                                     <term><code>unblock CHV2 00:00:00:00:00:00 "foobar"</code></term>
  656                                     <listitem><para>
  657                                             Unblock PIN <literal>CHV2</literal> using PUK
  658                                             <literal>00:00:00:00:00:00</literal>
  659                                             and set it to the new value <literal>foobar</literal>.
  660                                     </para></listitem>
  661                                 </varlistentry>
  662                                 <varlistentry>
  663                                     <term><code>unblock CHV2 00:00:00:00:00:00 ""</code></term>
  664                                     <listitem><para>
  665                                             Unblock PIN <literal>CHV2</literal> using PUK
  666                                             <literal>00:00:00:00:00:00</literal> keeping the old value.
  667                                     </para></listitem>
  668                                 </varlistentry>
  669                                 <varlistentry>
  670                                     <term><code>unblock CHV2 "" "foobar"</code></term>
  671                                     <listitem><para>
  672                                             Set new value of PIN <literal>CHV2</literal>
  673                                             to <literal>foobar</literal>.
  674                                     </para></listitem>
  675                                 </varlistentry>
  676                                 <varlistentry>
  677                                     <term><code>unblock CHV2 00:00:00:00:00:00</code></term>
  678                                     <listitem><para>
  679                                             Unblock PIN <literal>CHV2</literal> using PUK
  680                                             <literal>00:00:00:00:00:00</literal>.
  681                                             The new PIN value is prompted by pinpad.
  682                                     </para></listitem>
  683                                 </varlistentry>
  684                                 <varlistentry>
  685                                     <term><code>unblock CHV2 ""</code></term>
  686                                     <listitem><para>
  687                                             Set PIN <literal>CHV2</literal>.
  688                                             The new PIN value is prompted by pinpad.
  689                                     </para></listitem>
  690                                 </varlistentry>
  691                                 <varlistentry>
  692                                     <term><code>unblock CHV2</code></term>
  693                                     <listitem><para>
  694                                             Unblock PIN <literal>CHV2</literal>.
  695                                             The unblock code and new PIN value are prompted by pinpad.
  696                                     </para></listitem>
  697                                 </varlistentry>
  698                             </variablelist>
  699                         </para>
  700                     </listitem>
  701                 </varlistentry>
  702 
  703                 <varlistentry>
  704                     <term>
  705                         <command>update_binary</command>
  706                         <replaceable>file-id</replaceable>
  707                         <replaceable>offs</replaceable>
  708                         <replaceable>data</replaceable>
  709                     </term>
  710                     <listitem>
  711                         <para>
  712                             Binary update of the file specified by
  713                             <replaceable>file-id</replaceable> with the literal data
  714                             <replaceable>data</replaceable> starting from offset specified
  715                             by <replaceable>offs</replaceable>.
  716                         </para>
  717                         <para>
  718                             <replaceable>data</replaceable> can be supplied as a sequence
  719                             of hexadecimal values or as a string enclosed in double quotes
  720                             (<literal>"..."</literal>).
  721                         </para>
  722                     </listitem>
  723                 </varlistentry>
  724 
  725                 <varlistentry>
  726                     <term>
  727                         <command>update_record</command>
  728                         <replaceable>file-id</replaceable>
  729                         <replaceable>rec-nr</replaceable>
  730                         <replaceable>rec-offs</replaceable>
  731                         <replaceable>data</replaceable>
  732                     </term>
  733                     <listitem>
  734                         <para>
  735                             Update record specified by <replaceable>rec-nr</replaceable>
  736                             of the file specified by <replaceable>file-id</replaceable>
  737                             with the literal data <replaceable>data</replaceable>
  738                             starting from offset specified by
  739                             <replaceable>rec-offs</replaceable>.
  740                         </para>
  741                         <para>
  742                             <replaceable>data</replaceable> can be supplied as a sequence
  743                             of hexadecimal values or as a string enclosed in double quotes
  744                             (<literal>"..."</literal>).
  745                         </para>
  746                     </listitem>
  747                 </varlistentry>
  748 
  749                 <varlistentry>
  750                     <term>
  751                         <command>verify</command>
  752                         <replaceable>key-type</replaceable><replaceable>key-id</replaceable>
  753                         <arg choice="opt"><replaceable>key</replaceable></arg>
  754                     </term>
  755                     <listitem>
  756                         <para>
  757                             Present a PIN or key to the card, where
  758                             <replaceable>key-type</replaceable> can be one of
  759                             <literal>CHV</literal>, <literal>KEY</literal>,
  760                             <literal>AUT</literal> or <literal>PRO</literal>.
  761                             <replaceable>key-id</replaceable> is a number representing
  762                             the key or PIN reference.
  763                             <replaceable>key</replaceable> is the key or PIN to be verified,
  764                             formatted as a colon-separated sequence of hexadecimal values
  765                             or a string enclosed in double quotes (<literal>"..."</literal>).
  766                         </para>
  767                         <para>
  768                             If <replaceable>key</replaceable> is omitted, the exact action
  769                             depends on the card reader's features:
  770                             if the card readers supports PIN input via a pin pad,
  771                             then the PIN will be verified using the card reader's pin pad.
  772                             If the card reader does not support PIN input,
  773                             then the PIN will be asked interactively.
  774                         </para>
  775                         <para>
  776                             Examples:
  777                             <variablelist>
  778                                 <varlistentry>
  779                                     <term><code>verify CHV2 31:32:33:34:00:00:00:00</code></term>
  780                                     <listitem><para>
  781                                             Verify <literal>CHV2</literal> using the hex value
  782                                             <literal>31:32:33:34:00:00:00:00</literal>
  783                                     </para></listitem>
  784                                 </varlistentry>
  785                                 <varlistentry>
  786                                     <term><code>verify CHV1 "secret"</code></term>
  787                                     <listitem><para>
  788                                             Verify <literal>CHV1</literal>
  789                                             using the string value <literal>secret</literal>.
  790                                     </para></listitem>
  791                                 </varlistentry>
  792                                 <varlistentry>
  793                                     <term><code>verify KEY2</code></term>
  794                                     <listitem><para>
  795                                             Verify <literal>KEY2</literal>,
  796                                             get the value from the card reader's pin pad.
  797                                     </para></listitem>
  798                                 </varlistentry>
  799                             </variablelist>
  800                         </para>
  801                     </listitem>
  802                 </varlistentry>
  803 
  804                 <varlistentry>
  805                     <term>
  806                         <command>sm</command>
  807                         <group choice="req">
  808                             <arg choice="plain"><literal>open</literal></arg>
  809                             <arg choice="plain"><literal>close</literal></arg>
  810                         </group>
  811                     </term>
  812                     <listitem>
  813                         <para>
  814                             Call the card's <literal>open</literal> or
  815                             <literal>close</literal> Secure Messaging handler.
  816                         </para>
  817                     </listitem>
  818                 </varlistentry>
  819 
  820             </variablelist>
  821         </para>
  822     </refsect1>
  823 
  824     <refsect1>
  825         <title>See also</title>
  826         <para>
  827             <citerefentry>
  828                 <refentrytitle>opensc-tool</refentrytitle>
  829                 <manvolnum>1</manvolnum>
  830             </citerefentry>
  831         </para>
  832     </refsect1>
  833 
  834     <refsect1>
  835         <title>Authors</title>
  836         <para><command>opensc-explorer</command> was written by
  837         Juha Yrjölä <email>juha.yrjola@iki.fi</email>.</para>
  838     </refsect1>
  839 
  840 </refentry>