<?xml version="1.0" encoding="UTF-8"?>
<refentry id="dnie-tool">
	<refmeta>
		<refentrytitle>dnie-tool</refentrytitle>
		<manvolnum>1</manvolnum>
		<refmiscinfo class="productname">OpenSC</refmiscinfo>
		<refmiscinfo class="manual">OpenSC Tools</refmiscinfo>
		<refmiscinfo class="source">opensc</refmiscinfo>
	</refmeta>

	<refnamediv>
		<refname>dnie-tool</refname>
		<refpurpose>displays information about DNIe based security tokens</refpurpose>
	</refnamediv>
	
	<refsynopsisdiv>
		<cmdsynopsis>
			<command>dnie-tool</command>
			<arg choice="opt"><replaceable class="option">OPTIONS</replaceable></arg>
		</cmdsynopsis>
	</refsynopsisdiv>

	<refsect1>
		<title>Description</title>
		<para>
			The <command>dnie-tool</command> utility is used to display additional information about DNIe, the Spanish National eID card.
		</para>
	</refsect1>

	<refsect1>
		<title>Options</title>
		<para>
			<variablelist>
				<varlistentry>
					<term>
						<option>--idesp</option>,
						<option>-i</option>
					</term>
					<listitem><para>Show the DNIe IDESP value.</para></listitem>
				</varlistentry>
				<varlistentry>
					<term>
						<option>--data</option>,
						<option>-d</option>
					</term>
					<listitem><para>Show DNIe personal information.
					Reads and print DNIe number and User Name and SurName</para></listitem>
				</varlistentry>
				<varlistentry>
					<term>
						<option>--all</option>,
						<option>-a</option>
					</term>
					<listitem><para>Displays every available information.
					This command is equivalent to -d -i -V -s</para></listitem>
				</varlistentry>
				<varlistentry>
					<term>
						<option>--serial</option>,
						<option>-s</option>
					</term>
					<listitem><para>Displays DNIe Serial Number
					</para></listitem>
				</varlistentry>
				<varlistentry>
					<term>
						<option>--version</option>,
						<option>-V</option>
					</term>
					<listitem><para>Show DNIe sw version.
					Displays software version for in-card DNIe OS</para></listitem>
				</varlistentry>
				<varlistentry>
					<term>
						<option>--pin</option> <replaceable>pin</replaceable>,
						<option>-p</option> <replaceable>pin</replaceable>
					</term>
					<listitem>
						<para>
							These options can be used to specify the PIN value
							on the command line. If the value is set to
							<literal>env:</literal><replaceable>VARIABLE</replaceable>, the value
							of the specified environment variable is used. By default,
							the code is prompted on the command line if needed.
						</para>
						<para>
							Note that on most operation systems, any user can
							display the command line of any process on the
							system using utilities such as
							<command>ps(1)</command>. Therefore, you should prefer
							passing the codes via an environment variable
							on an unsecured system.
						</para>
					</listitem>
				</varlistentry>
				<varlistentry>
					<term>
						<option>--reader</option> <replaceable>arg</replaceable>,
						<option>-r</option> <replaceable>arg</replaceable>
					</term>
					<listitem>
						<para>
							Number of the reader to use. By default, the first
							reader with a present card is used. If
							<replaceable>arg</replaceable> is an ATR, the
							reader with a matching card will be chosen.
						</para>
					</listitem>
				</varlistentry>
				<varlistentry>
					<term>
						<option>--wait</option>, 
						<option>-w</option>
					</term>
					<listitem><para>Causes <command>dnie-tool</command> to wait for the token to be inserted into reader.</para>
					</listitem>
				</varlistentry>
				<varlistentry>
					<term>
						<option>--verbose</option>,
						<option>-v</option>
					</term>
					<listitem><para>Causes <command>dnie-tool</command> to be more verbose. 
					Specify this flag several times
to enable debug output in the opensc library.</para></listitem>
				</varlistentry>
			</variablelist>
		</para>
	</refsect1>
	
	<refsect1>
		<title>Authors</title>
		<para><command>dnie-tool</command> was written by
		Juan Antonio Martinez <email>jonsito@terra.es</email>.</para>
	</refsect1>

</refentry>
