Blame nss/doc/signver.xml

Packit 40b132
Packit 40b132
Packit 40b132
  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
Packit 40b132
Packit 40b132
Packit 40b132
]>
Packit 40b132
Packit 40b132
<refentry id="signver">
Packit 40b132
Packit 40b132
  <refentryinfo>
Packit 40b132
    <date>&dat;;</date>
Packit 40b132
    <title>NSS Security Tools</title>
Packit 40b132
    <productname>nss-tools</productname>
Packit 40b132
    <productnumber>&version;</productnumber>
Packit 40b132
  </refentryinfo>
Packit 40b132
Packit 40b132
  <refmeta>
Packit 40b132
    <refentrytitle>SIGNVER</refentrytitle>
Packit 40b132
    <manvolnum>1</manvolnum>
Packit 40b132
  </refmeta>
Packit 40b132
Packit 40b132
  <refnamediv>
Packit 40b132
    <refname>signver</refname>
Packit 40b132
    <refpurpose>Verify a detached PKCS#7 signature for a file.</refpurpose>
Packit 40b132
  </refnamediv>
Packit 40b132
Packit 40b132
  <refsynopsisdiv>
Packit 40b132
    <cmdsynopsis>
Packit 40b132
      <command>signtool</command>
Packit 40b132
	<group choice="plain">
Packit 40b132
		<arg choice="plain">-A</arg>
Packit 40b132
		<arg choice="plain">-V</arg>
Packit 40b132
	</group>
Packit 40b132
      <arg choice="plain">-d <replaceable>directory</replaceable></arg>
Packit 40b132
      <arg>-a</arg>
Packit 40b132
	<arg>-i <replaceable>input_file</replaceable></arg>
Packit 40b132
	<arg>-o <replaceable>output_file</replaceable></arg>
Packit 40b132
	<arg>-s <replaceable>signature_file</replaceable></arg>
Packit 40b132
      <arg>-v</arg>
Packit 40b132
    </cmdsynopsis>
Packit 40b132
  </refsynopsisdiv>
Packit 40b132
Packit 40b132
  <refsection>
Packit 40b132
    <title>STATUS</title>
Packit 40b132
    <para>This documentation is still work in progress. Please contribute to the initial review in <ulink url="https://bugzilla.mozilla.org/show_bug.cgi?id=836477">Mozilla NSS bug 836477</ulink>
Packit 40b132
    </para>
Packit 40b132
  </refsection>
Packit 40b132
Packit 40b132
  <refsection id="description">
Packit 40b132
    <title>Description</title>
Packit 40b132
Packit 40b132
    <para>The Signature Verification Tool, <command>signver</command>, is a simple command-line utility that unpacks a base-64-encoded PKCS#7 signed object and verifies the digital signature using standard cryptographic techniques. The Signature Verification Tool can also display the contents of the signed object.</para>
Packit 40b132
  </refsection>
Packit 40b132
  
Packit 40b132
  <refsection id="options">
Packit 40b132
    <title>Options</title>
Packit 40b132
    <variablelist>
Packit 40b132
      <varlistentry>
Packit 40b132
        <term>-A</term>
Packit 40b132
        <listitem><para>Displays all of the information in the PKCS#7 signature.</para></listitem>
Packit 40b132
      </varlistentry>
Packit 40b132
      <varlistentry>
Packit 40b132
        <term>-V</term>
Packit 40b132
        <listitem><para>Verifies the digital signature.</para></listitem>
Packit 40b132
      </varlistentry>
Packit 40b132
      <varlistentry>
Packit 40b132
        <term>-d [sql:]<emphasis>directory</emphasis></term>
Packit 40b132
        <listitem><para>Specify the database directory which contains the certificates and keys.</para>
Packit 40b132
	<para><command>signver</command> supports two types of databases: the legacy security databases (<filename>cert8.db</filename>, <filename>key3.db</filename>, and <filename>secmod.db</filename>) and new SQLite databases (<filename>cert9.db</filename>, <filename>key4.db</filename>, and <filename>pkcs11.txt</filename>). If the prefix <command>sql:</command> is not used, then the tool assumes that the given databases are in the old format.</para></listitem>
Packit 40b132
      </varlistentry>
Packit 40b132
      <varlistentry>
Packit 40b132
        <term>-a</term>
Packit 40b132
        <listitem><para>Sets that the given signature file is in ASCII format.</para></listitem>
Packit 40b132
      </varlistentry>
Packit 40b132
      <varlistentry>
Packit 40b132
        <term>-i <emphasis>input_file</emphasis></term>
Packit 40b132
        <listitem><para>Gives the input file for the object with signed data.</para></listitem>
Packit 40b132
      </varlistentry>
Packit 40b132
      <varlistentry>
Packit 40b132
        <term>-o <emphasis>output_file</emphasis></term>
Packit 40b132
        <listitem><para>Gives the output file to which to write the results.</para></listitem>
Packit 40b132
      </varlistentry>
Packit 40b132
      <varlistentry>
Packit 40b132
        <term>-s <emphasis>signature_file</emphasis></term>
Packit 40b132
        <listitem><para>Gives the input file for the digital signature.</para></listitem>
Packit 40b132
      </varlistentry>
Packit 40b132
      <varlistentry>
Packit 40b132
        <term>-v</term>
Packit 40b132
        <listitem><para>Enables verbose output.</para></listitem>
Packit 40b132
      </varlistentry>
Packit 40b132
    </variablelist>
Packit 40b132
  </refsection>
Packit 40b132
Packit 40b132
  <refsection id="examples">
Packit 40b132
    <title>Extended Examples</title>
Packit 40b132
	<refsection><title>Verifying a Signature</title>
Packit 40b132
	<para>The <option>-V</option> option verifies that the signature in a given signature file is valid when used to sign the given object (from the input file).</para>
Packit 40b132
<programlisting>signver -V -s <replaceable>signature_file</replaceable> -i <replaceable>signed_file</replaceable> -d sql:/home/my/sharednssdb
Packit 40b132
Packit 40b132
signatureValid=yes</programlisting>
Packit 40b132
	</refsection>
Packit 40b132
Packit 40b132
	<refsection><title>Printing Signature Data</title>
Packit 40b132
		<para>
Packit 40b132
			The <option>-A</option> option prints all of the information contained in a signature file. Using the <option>-o</option> option prints the signature file information to the given output file rather than stdout.
Packit 40b132
		</para>
Packit 40b132
<programlisting>signver -A -s <replaceable>signature_file</replaceable> -o <replaceable>output_file</replaceable></programlisting>
Packit 40b132
	</refsection>
Packit 40b132
  </refsection>
Packit 40b132
Packit 40b132
<refsection id="databases"><title>NSS Database Types</title>
Packit 40b132
<para>NSS originally used BerkeleyDB databases to store security information. 
Packit 40b132
The last versions of these <emphasis>legacy</emphasis> databases are:</para>
Packit 40b132
<itemizedlist>
Packit 40b132
	<listitem>
Packit 40b132
		<para>
Packit 40b132
			cert8.db for certificates
Packit 40b132
		</para>
Packit 40b132
	</listitem>
Packit 40b132
	<listitem>
Packit 40b132
		<para>
Packit 40b132
			key3.db for keys
Packit 40b132
		</para>
Packit 40b132
	</listitem>
Packit 40b132
	<listitem>
Packit 40b132
		<para>
Packit 40b132
			secmod.db for PKCS #11 module information
Packit 40b132
		</para>
Packit 40b132
	</listitem>
Packit 40b132
</itemizedlist>
Packit 40b132
Packit 40b132
<para>BerkeleyDB has performance limitations, though, which prevent it from being easily used by multiple applications simultaneously. NSS has 
Packit 40b132
some flexibility that allows applications to use their own, independent database engine while keeping a shared database and working around the access issues. Still, NSS
Packit 40b132
requires more flexibility to provide a truly shared security database.</para>
Packit 40b132
Packit 40b132
<para>In 2009, NSS introduced a new set of databases that are SQLite databases rather than 
Packit 40b132
BerkleyDB. These new databases provide more accessibility and performance:</para>
Packit 40b132
<itemizedlist>
Packit 40b132
	<listitem>
Packit 40b132
		<para>
Packit 40b132
			cert9.db for certificates
Packit 40b132
		</para>
Packit 40b132
	</listitem>
Packit 40b132
	<listitem>
Packit 40b132
		<para>
Packit 40b132
			key4.db for keys
Packit 40b132
		</para>
Packit 40b132
	</listitem>
Packit 40b132
	<listitem>
Packit 40b132
		<para>
Packit 40b132
			pkcs11.txt, which is listing of all of the PKCS #11 modules contained in a new subdirectory in the security databases directory
Packit 40b132
		</para>
Packit 40b132
	</listitem>
Packit 40b132
</itemizedlist>
Packit 40b132
Packit 40b132
<para>Because the SQLite databases are designed to be shared, these are the <emphasis>shared</emphasis> database type. The shared database type is preferred; the legacy format is included for backward compatibility.</para>
Packit 40b132
Packit 40b132
<para>By default, the tools (<command>certutil</command>, <command>pk12util</command>, <command>modutil</command>) assume that the given security databases follow the more common legacy type. 
Packit 40b132
Using the SQLite databases must be manually specified by using the <command>sql:</command> prefix with the given security directory. For example:</para>
Packit 40b132
Packit 40b132
<programlisting># signver -A -s <replaceable>signature</replaceable> -d sql:/home/my/sharednssdb</programlisting>
Packit 40b132
Packit 40b132
<para>To set the shared database type as the default type for the tools, set the <envar>NSS_DEFAULT_DB_TYPE</envar> environment variable to <envar>sql</envar>:</para>
Packit 40b132
<programlisting>export NSS_DEFAULT_DB_TYPE="sql"</programlisting>
Packit 40b132
Packit 40b132
<para>This line can be added to the <filename>~/.bashrc</filename> file to make the change permanent for the user.</para>
Packit 40b132
Packit 40b132
<para>Most applications do not use the shared database by default, but they can be configured to use them. For example, this how-to article covers how to configure Firefox and Thunderbird to use the new shared NSS databases:</para>
Packit 40b132
<itemizedlist>
Packit 40b132
	<listitem>
Packit 40b132
		<para>
Packit 40b132
			https://wiki.mozilla.org/NSS_Shared_DB_Howto</para>
Packit 40b132
	</listitem>
Packit 40b132
</itemizedlist>
Packit 40b132
<para>For an engineering draft on the changes in the shared NSS databases, see the NSS project wiki:</para>
Packit 40b132
<itemizedlist>
Packit 40b132
	<listitem>
Packit 40b132
		<para>
Packit 40b132
			https://wiki.mozilla.org/NSS_Shared_DB
Packit 40b132
		</para>
Packit 40b132
	</listitem>
Packit 40b132
</itemizedlist>
Packit 40b132
</refsection>
Packit 40b132
Packit 40b132
  <refsection id="seealso">
Packit 40b132
    <title>See Also</title>
Packit 40b132
    <para>signtool (1)</para>
Packit 40b132
Packit 40b132
	<para>The NSS wiki has information on the new database design and how to configure applications to use it.</para>
Packit 40b132
	<itemizedlist>
Packit 40b132
		<listitem>
Packit 40b132
			<para>Setting up the shared NSS database</para>
Packit 40b132
			<para>https://wiki.mozilla.org/NSS_Shared_DB_Howto</para>
Packit 40b132
		</listitem>
Packit 40b132
		<listitem>
Packit 40b132
			<para>
Packit 40b132
				Engineering and technical information about the shared NSS database
Packit 40b132
			</para>
Packit 40b132
			<para>
Packit 40b132
				https://wiki.mozilla.org/NSS_Shared_DB
Packit 40b132
			</para>
Packit 40b132
		</listitem>
Packit 40b132
	</itemizedlist>
Packit 40b132
  </refsection>
Packit 40b132
Packit 40b132
Packit 40b132
  <refsection id="resources">
Packit 40b132
    <title>Additional Resources</title>
Packit 40b132
	<para>For information about NSS and other tools related to NSS (like JSS), check out the NSS project wiki at <ulink url="http://www.mozilla.org/projects/security/pki/nss/">http://www.mozilla.org/projects/security/pki/nss/</ulink>. The NSS site relates directly to NSS code changes and releases.</para>
Packit 40b132
	<para>Mailing lists: https://lists.mozilla.org/listinfo/dev-tech-crypto</para>
Packit 40b132
	<para>IRC: Freenode at #dogtag-pki</para>
Packit 40b132
  </refsection>
Packit 40b132
Packit 40b132
Packit 40b132
  <refsection id="authors">
Packit 40b132
    <title>Authors</title>
Packit 40b132
    <para>The NSS tools were written and maintained by developers with Netscape, Red Hat,  Sun, Oracle, Mozilla, and Google.</para>
Packit 40b132
    <para>
Packit 40b132
	Authors: Elio Maldonado <emaldona@redhat.com>, Deon Lackey <dlackey@redhat.com>.
Packit 40b132
    </para>
Packit 40b132
  </refsection>
Packit 40b132
Packit 40b132
Packit 40b132
  <refsection id="license">
Packit 40b132
    <title>LICENSE</title>
Packit 40b132
    <para>Licensed under the Mozilla Public License, v. 2.0.  If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
Packit 40b132
    </para>
Packit 40b132
  </refsection>
Packit 40b132
Packit 40b132
</refentry>