summaryrefslogtreecommitdiffstats
path: root/secure/usr.bin/openssl/man/smime.1
diff options
context:
space:
mode:
Diffstat (limited to 'secure/usr.bin/openssl/man/smime.1')
-rw-r--r--secure/usr.bin/openssl/man/smime.1119
1 files changed, 88 insertions, 31 deletions
diff --git a/secure/usr.bin/openssl/man/smime.1 b/secure/usr.bin/openssl/man/smime.1
index 2c3f91b..d313abd 100644
--- a/secure/usr.bin/openssl/man/smime.1
+++ b/secure/usr.bin/openssl/man/smime.1
@@ -124,7 +124,7 @@
.\" ========================================================================
.\"
.IX Title "SMIME 1"
-.TH SMIME 1 "2012-05-10" "0.9.8x" "OpenSSL"
+.TH SMIME 1 "2012-05-10" "1.0.1c" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@@ -137,19 +137,10 @@ smime \- S/MIME utility
[\fB\-encrypt\fR]
[\fB\-decrypt\fR]
[\fB\-sign\fR]
+[\fB\-resign\fR]
[\fB\-verify\fR]
[\fB\-pk7out\fR]
-[\fB\-des\fR]
-[\fB\-des3\fR]
-[\fB\-rc2\-40\fR]
-[\fB\-rc2\-64\fR]
-[\fB\-rc2\-128\fR]
-[\fB\-aes128\fR]
-[\fB\-aes192\fR]
-[\fB\-aes256\fR]
-[\fB\-camellia128\fR]
-[\fB\-camellia192\fR]
-[\fB\-camellia256\fR]
+[\fB\-[cipher]\fR]
[\fB\-in file\fR]
[\fB\-certfile file\fR]
[\fB\-signer file\fR]
@@ -164,7 +155,11 @@ smime \- S/MIME utility
[\fB\-from ad\fR]
[\fB\-subject s\fR]
[\fB\-text\fR]
+[\fB\-indef\fR]
+[\fB\-noindef\fR]
+[\fB\-stream\fR]
[\fB\-rand file(s)\fR]
+[\fB\-md digest\fR]
[cert.pem]...
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
@@ -172,7 +167,7 @@ The \fBsmime\fR command handles S/MIME mail. It can encrypt, decrypt, sign and
verify S/MIME messages.
.SH "COMMAND OPTIONS"
.IX Header "COMMAND OPTIONS"
-There are five operation options that set the type of operation to be performed.
+There are six operation options that set the type of operation to be performed.
The meaning of the other options varies according to the operation type.
.IP "\fB\-encrypt\fR" 4
.IX Item "-encrypt"
@@ -195,6 +190,9 @@ the signed data. Both clear text and opaque signing is supported.
.IP "\fB\-pk7out\fR" 4
.IX Item "-pk7out"
takes an input message and writes out a \s-1PEM\s0 encoded PKCS#7 structure.
+.IP "\fB\-resign\fR" 4
+.IX Item "-resign"
+resign a message: take an existing message and one or more new signers.
.IP "\fB\-in filename\fR" 4
.IX Item "-in filename"
the input message to be encrypted or signed or the \s-1MIME\s0 message to
@@ -219,6 +217,19 @@ format change this to write \s-1PEM\s0 and \s-1DER\s0 format PKCS#7 structures
instead. This currently only affects the output format of the PKCS#7
structure, if no PKCS#7 structure is being output (for example with
\&\fB\-verify\fR or \fB\-decrypt\fR) this option has no effect.
+.IP "\fB\-stream \-indef \-noindef\fR" 4
+.IX Item "-stream -indef -noindef"
+the \fB\-stream\fR and \fB\-indef\fR options are equivalent and enable streaming I/O
+for encoding operations. This permits single pass processing of data without
+the need to hold the entire contents in memory, potentially supporting very
+large files. Streaming is automatically set for S/MIME signing with detached
+data if the output format is \fB\s-1SMIME\s0\fR it is currently off by default for all
+other operations.
+.IP "\fB\-noindef\fR" 4
+.IX Item "-noindef"
+disable streaming I/O where it would produce and indefinite length constructed
+encoding. This option currently has no effect. In future streaming will be
+enabled by default on all relevant operations and this option will disable it.
.IP "\fB\-content filename\fR" 4
.IX Item "-content filename"
This specifies a file containing the detached content, this is only
@@ -241,11 +252,19 @@ a directory containing trusted \s-1CA\s0 certificates, only used with
\&\fB\-verify\fR. This directory must be a standard certificate directory: that
is a hash of each subject name (using \fBx509 \-hash\fR) should be linked
to each certificate.
-.IP "\fB\-des \-des3 \-rc2\-40 \-rc2\-64 \-rc2\-128 \-aes128 \-aes192 \-aes256 \-camellia128 \-camellia192 \-camellia256\fR" 4
-.IX Item "-des -des3 -rc2-40 -rc2-64 -rc2-128 -aes128 -aes192 -aes256 -camellia128 -camellia192 -camellia256"
-the encryption algorithm to use. \s-1DES\s0 (56 bits), triple \s-1DES\s0 (168 bits),
-40, 64 or 128 bit \s-1RC2\s0, 128, 192 or 256 bit \s-1AES\s0, or 128, 192 or 256 bit Camellia respectively. If not
-specified 40 bit \s-1RC2\s0 is used. Only used with \fB\-encrypt\fR.
+.IP "\fB\-md digest\fR" 4
+.IX Item "-md digest"
+digest algorithm to use when signing or resigning. If not present then the
+default digest algorithm for the signing key will be used (usually \s-1SHA1\s0).
+.IP "\fB\-[cipher]\fR" 4
+.IX Item "-[cipher]"
+the encryption algorithm to use. For example \s-1DES\s0 (56 bits) \- \fB\-des\fR,
+triple \s-1DES\s0 (168 bits) \- \fB\-des3\fR,
+\&\fIEVP_get_cipherbyname()\fR function) can also be used preceded by a dash, for
+example \fB\-aes_128_cbc\fR. See \fBenc\fR for list of ciphers
+supported by your version of OpenSSL.
+.Sp
+If not specified 40 bit \s-1RC2\s0 is used. Only used with \fB\-encrypt\fR.
.IP "\fB\-nointern\fR" 4
.IX Item "-nointern"
when verifying a message normally certificates (if any) included in
@@ -292,9 +311,10 @@ be included with the message. When verifying these will be searched for
the signers certificates. The certificates should be in \s-1PEM\s0 format.
.IP "\fB\-signer file\fR" 4
.IX Item "-signer file"
-the signers certificate when signing a message. If a message is
-being verified then the signers certificates will be written to this
-file if the verification was successful.
+a signing certificate when signing or resigning a message, this option can be
+used multiple times if more than one signer is required. If a message is being
+verified then the signers certificates will be written to this file if the
+verification was successful.
.IP "\fB\-recip file\fR" 4
.IX Item "-recip file"
the recipients certificate when decrypting a message. This certificate
@@ -304,7 +324,8 @@ must match one of the recipients of the message or an error occurs.
the private key to use when signing or decrypting. This must match the
corresponding certificate. If this option is not specified then the
private key must be included in the certificate file specified with
-the \fB\-recip\fR or \fB\-signer\fR file.
+the \fB\-recip\fR or \fB\-signer\fR file. When signing this option can be used
+multiple times to specify successive keys.
.IP "\fB\-passin arg\fR" 4
.IX Item "-passin arg"
the private key password source. For more information about the format of \fBarg\fR
@@ -326,6 +347,10 @@ the relevant mail headers. These are included outside the signed
portion of a message so they may be included manually. If signing
then many S/MIME mail clients check the signers certificate's email
address matches that specified in the From: address.
+.IP "\fB\-purpose, \-ignore_critical, \-issuer_checks, \-crl_check, \-crl_check_all, \-policy_check, \-extended_crl, \-x509_strict, \-policy \-check_ss_sig\fR" 4
+.IX Item "-purpose, -ignore_critical, -issuer_checks, -crl_check, -crl_check_all, -policy_check, -extended_crl, -x509_strict, -policy -check_ss_sig"
+Set various options of certificate chain verification. See
+\&\fBverify\fR manual page for details.
.SH "NOTES"
.IX Header "NOTES"
The \s-1MIME\s0 message must be sent without any blank lines between the
@@ -350,6 +375,19 @@ messages \*(L"in parallel\*(R" by signing an already signed message.
The options \fB\-encrypt\fR and \fB\-decrypt\fR reflect common usage in S/MIME
clients. Strictly speaking these process PKCS#7 enveloped data: PKCS#7
encrypted data is used for other purposes.
+.PP
+The \fB\-resign\fR option uses an existing message digest when adding a new
+signer. This means that attributes must be present in at least one existing
+signer using the same message digest or this operation will fail.
+.PP
+The \fB\-stream\fR and \fB\-indef\fR options enable experimental streaming I/O support.
+As a result the encoding is \s-1BER\s0 using indefinite length constructed encoding
+and no longer \s-1DER\s0. Streaming is supported for the \fB\-encrypt\fR operation and the
+\&\fB\-sign\fR operation if the content is not detached.
+.PP
+Streaming is always used for the \fB\-sign\fR operation with detached data but
+since the content is no longer part of the PKCS#7 structure the encoding
+remains \s-1DER\s0.
.SH "EXIT CODES"
.IX Header "EXIT CODES"
.IP "0" 4
@@ -380,7 +418,7 @@ Create a cleartext signed message:
\& \-signer mycert.pem
.Ve
.PP
-Create and opaque signed message:
+Create an opaque signed message:
.PP
.Vb 2
\& openssl smime \-sign \-in message.txt \-text \-out mail.msg \-nodetach \e
@@ -395,6 +433,13 @@ read the private key from another file:
\& \-signer mycert.pem \-inkey mykey.pem \-certfile mycerts.pem
.Ve
.PP
+Create a signed message with two signers:
+.PP
+.Vb 2
+\& openssl smime \-sign \-in message.txt \-text \-out mail.msg \e
+\& \-signer mycert.pem \-signer othercert.pem
+.Ve
+.PP
Send a signed message under Unix directly to sendmail, including headers:
.PP
.Vb 3
@@ -426,8 +471,8 @@ Sign and encrypt mail:
\& \-subject "Signed and Encrypted message" \-des3 user.pem
.Ve
.PP
-Note: the encryption command does not include the \fB\-text\fR option because the message
-being encrypted already has \s-1MIME\s0 headers.
+Note: the encryption command does not include the \fB\-text\fR option because the
+message being encrypted already has \s-1MIME\s0 headers.
.PP
Decrypt mail:
.PP
@@ -462,16 +507,24 @@ Create an encrypted message using 128 bit Camellia:
.Vb 1
\& openssl smime \-encrypt \-in plain.txt \-camellia128 \-out mail.msg cert.pem
.Ve
+.PP
+Add a signer to an existing message:
+.PP
+.Vb 1
+\& openssl smime \-resign \-in mail.msg \-signer newsign.pem \-out mail2.msg
+.Ve
.SH "BUGS"
.IX Header "BUGS"
-The \s-1MIME\s0 parser isn't very clever: it seems to handle most messages that I've thrown
-at it but it may choke on others.
+The \s-1MIME\s0 parser isn't very clever: it seems to handle most messages that I've
+thrown at it but it may choke on others.
.PP
-The code currently will only write out the signer's certificate to a file: if the
-signer has a separate encryption certificate this must be manually extracted. There
-should be some heuristic that determines the correct encryption certificate.
+The code currently will only write out the signer's certificate to a file: if
+the signer has a separate encryption certificate this must be manually
+extracted. There should be some heuristic that determines the correct
+encryption certificate.
.PP
-Ideally a database should be maintained of a certificates for each email address.
+Ideally a database should be maintained of a certificates for each email
+address.
.PP
The code doesn't currently take note of the permitted symmetric encryption
algorithms as supplied in the SMIMECapabilities signed attribute. This means the
@@ -482,3 +535,7 @@ No revocation checking is done on the signer's certificate.
.PP
The current code can only handle S/MIME v2 messages, the more complex S/MIME v3
structures may cause parsing errors.
+.SH "HISTORY"
+.IX Header "HISTORY"
+The use of multiple \fB\-signer\fR options and the \fB\-resign\fR command were first
+added in OpenSSL 1.0.0
OpenPOWER on IntegriCloud