man-pages/man1/spkac.1ssl.html
2021-03-31 01:06:50 +01:00

237 lines
6.0 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of SPKAC</TITLE>
</HEAD><BODY>
<H1>SPKAC</H1>
Section: OpenSSL (1SSL)<BR>Updated: 2021-03-22<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
openssl-spkac, spkac - SPKAC printing and generating utility
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<B>openssl</B> <B>spkac</B>
[<B>-help</B>]
[<B>-in filename</B>]
[<B>-out filename</B>]
[<B>-key keyfile</B>]
[<B>-keyform PEM|DER|ENGINE</B>]
[<B>-passin arg</B>]
[<B>-challenge string</B>]
[<B>-pubkey</B>]
[<B>-spkac spkacname</B>]
[<B>-spksect section</B>]
[<B>-noout</B>]
[<B>-verify</B>]
[<B>-engine id</B>]
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
The <B>spkac</B> command processes Netscape signed public key and challenge
(<FONT SIZE="-1">SPKAC</FONT>) files. It can print out their contents, verify the signature and
produce its own SPKACs from a supplied private key.
<A NAME="lbAE">&nbsp;</A>
<H2>OPTIONS</H2>
<DL COMPACT>
<DT id="1"><B>-help</B><DD>
Print out a usage message.
<DT id="2"><B>-in filename</B><DD>
This specifies the input filename to read from or standard input if this
option is not specified. Ignored if the <B>-key</B> option is used.
<DT id="3"><B>-out filename</B><DD>
Specifies the output filename to write to or standard output by
default.
<DT id="4"><B>-key keyfile</B><DD>
Create an <FONT SIZE="-1">SPKAC</FONT> file using the private key in <B>keyfile</B>. The
<B>-in</B>, <B>-noout</B>, <B>-spksect</B> and <B>-verify</B> options are ignored if
present.
<DT id="5"><B>-keyform PEM|DER|ENGINE</B><DD>
Whether the key format is <FONT SIZE="-1">PEM, DER,</FONT> or an engine-backed key.
The default is <FONT SIZE="-1">PEM.</FONT>
<DT id="6"><B>-passin password</B><DD>
The input file password source. For more information about the format of <B>arg</B>
see the <B></B><FONT SIZE="-1"><B>PASS PHRASE ARGUMENTS</B></FONT><B></B> section in <B><A HREF="/cgi-bin/man/man2html?1+openssl">openssl</A></B>(1).
<DT id="7"><B>-challenge string</B><DD>
Specifies the challenge string if an <FONT SIZE="-1">SPKAC</FONT> is being created.
<DT id="8"><B>-spkac spkacname</B><DD>
Allows an alternative name form the variable containing the
<FONT SIZE="-1">SPKAC.</FONT> The default is ``<FONT SIZE="-1">SPKAC''.</FONT> This option affects both
generated and input <FONT SIZE="-1">SPKAC</FONT> files.
<DT id="9"><B>-spksect section</B><DD>
Allows an alternative name form the section containing the
<FONT SIZE="-1">SPKAC.</FONT> The default is the default section.
<DT id="10"><B>-noout</B><DD>
Don't output the text version of the <FONT SIZE="-1">SPKAC</FONT> (not used if an
<FONT SIZE="-1">SPKAC</FONT> is being created).
<DT id="11"><B>-pubkey</B><DD>
Output the public key of an <FONT SIZE="-1">SPKAC</FONT> (not used if an <FONT SIZE="-1">SPKAC</FONT> is
being created).
<DT id="12"><B>-verify</B><DD>
Verifies the digital signature on the supplied <FONT SIZE="-1">SPKAC.</FONT>
<DT id="13"><B>-engine id</B><DD>
Specifying an engine (by its unique <B>id</B> string) will cause <B>spkac</B>
to attempt to obtain a functional reference to the specified engine,
thus initialising it if needed. The engine will then be set as the default
for all available algorithms.
</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>EXAMPLES</H2>
Print out the contents of an <FONT SIZE="-1">SPKAC:</FONT>
<P>
<PRE>
openssl spkac -in spkac.cnf
</PRE>
<P>
Verify the signature of an <FONT SIZE="-1">SPKAC:</FONT>
<P>
<PRE>
openssl spkac -in spkac.cnf -noout -verify
</PRE>
<P>
Create an <FONT SIZE="-1">SPKAC</FONT> using the challenge string ``hello'':
<P>
<PRE>
openssl spkac -key key.pem -challenge hello -out spkac.cnf
</PRE>
<P>
Example of an <FONT SIZE="-1">SPKAC,</FONT> (long lines split up for clarity):
<P>
<PRE>
SPKAC=MIG5MGUwXDANBgkqhkiG9w0BAQEFAANLADBIAkEA\
1cCoq2Wa3Ixs47uI7FPVwHVIPDx5yso105Y6zpozam135a\
8R0CpoRvkkigIyXfcCjiVi5oWk+6FfPaD03uPFoQIDAQAB\
FgVoZWxsbzANBgkqhkiG9w0BAQQFAANBAFpQtY/FojdwkJ\
h1bEIYuc2EeM2KHTWPEepWYeawvHD0gQ3DngSC75YCWnnD\
dq+NQ3F+X4deMx9AaEglZtULwV4=
</PRE>
<A NAME="lbAG">&nbsp;</A>
<H2>NOTES</H2>
A created <FONT SIZE="-1">SPKAC</FONT> with suitable <FONT SIZE="-1">DN</FONT> components appended can be fed into
the <B>ca</B> utility.
<P>
SPKACs are typically generated by Netscape when a form is submitted
containing the <B></B><FONT SIZE="-1"><B>KEYGEN</B></FONT><B></B> tag as part of the certificate enrollment
process.
<P>
The challenge string permits a primitive form of proof of possession
of private key. By checking the <FONT SIZE="-1">SPKAC</FONT> signature and a random challenge
string some guarantee is given that the user knows the private key
corresponding to the public key being certified. This is important in
some applications. Without this it is possible for a previous <FONT SIZE="-1">SPKAC</FONT>
to be used in a ``replay attack''.
<A NAME="lbAH">&nbsp;</A>
<H2>SEE ALSO</H2>
<B><A HREF="/cgi-bin/man/man2html?1+ca">ca</A></B>(1)
<A NAME="lbAI">&nbsp;</A>
<H2>COPYRIGHT</H2>
Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved.
<P>
Licensed under the OpenSSL license (the ``License''). You may not use
this file except in compliance with the License. You can obtain a copy
in the file <FONT SIZE="-1">LICENSE</FONT> in the source distribution or at
&lt;<A HREF="https://www.openssl.org/source/license.html">https://www.openssl.org/source/license.html</A>&gt;.
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="14"><A HREF="#lbAB">NAME</A><DD>
<DT id="15"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="16"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="17"><A HREF="#lbAE">OPTIONS</A><DD>
<DT id="18"><A HREF="#lbAF">EXAMPLES</A><DD>
<DT id="19"><A HREF="#lbAG">NOTES</A><DD>
<DT id="20"><A HREF="#lbAH">SEE ALSO</A><DD>
<DT id="21"><A HREF="#lbAI">COPYRIGHT</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:27 GMT, March 31, 2021
</BODY>
</HTML>