Latest update.
This commit is contained in:
+85
-106
@@ -23,23 +23,25 @@ B<openssl> B<cms>
|
||||
[B<-uncompress>]
|
||||
[B<-EncryptedData_encrypt>]
|
||||
[B<-sign_receipt>]
|
||||
[B<-verify_receipt receipt>]
|
||||
[B<-in filename>]
|
||||
[B<-inform SMIME|PEM|DER>]
|
||||
[B<-rctform SMIME|PEM|DER>]
|
||||
[B<-out filename>]
|
||||
[B<-outform SMIME|PEM|DER>]
|
||||
[B<-stream -indef -noindef>]
|
||||
[B<-verify_receipt> I<receipt>]
|
||||
[B<-in> I<filename>]
|
||||
[B<-inform> B<DER>|B<PEM>|B<SMIME>]
|
||||
[B<-rctform> B<DER>|B<PEM>|B<SMIME>]
|
||||
[B<-out> I<filename>]
|
||||
[B<-outform> B<DER>|B<PEM>|B<SMIME>]
|
||||
[B<-stream>]
|
||||
[B<-indef>]
|
||||
[B<-noindef>]
|
||||
[B<-content filename>]
|
||||
[B<-noindef>]
|
||||
[B<-content> I<filename>]
|
||||
[B<-text>]
|
||||
[B<-noout>]
|
||||
[B<-print>]
|
||||
[B<-CAfile file>]
|
||||
[B<-CApath dir>]
|
||||
[B<-CAfile> I<file>]
|
||||
[B<-CApath> I<dir>]
|
||||
[B<-no-CAfile>]
|
||||
[B<-no-CApath>]
|
||||
[B<-attime timestamp>]
|
||||
[B<-attime> I<timestamp>]
|
||||
[B<-check_ss_sig>]
|
||||
[B<-crl_check>]
|
||||
[B<-crl_check_all>]
|
||||
@@ -50,24 +52,24 @@ B<openssl> B<cms>
|
||||
[B<-inhibit_map>]
|
||||
[B<-no_check_time>]
|
||||
[B<-partial_chain>]
|
||||
[B<-policy arg>]
|
||||
[B<-policy> I<arg>]
|
||||
[B<-policy_check>]
|
||||
[B<-policy_print>]
|
||||
[B<-purpose purpose>]
|
||||
[B<-purpose> I<purpose>]
|
||||
[B<-suiteB_128>]
|
||||
[B<-suiteB_128_only>]
|
||||
[B<-suiteB_192>]
|
||||
[B<-trusted_first>]
|
||||
[B<-no_alt_chains>]
|
||||
[B<-use_deltas>]
|
||||
[B<-auth_level num>]
|
||||
[B<-verify_depth num>]
|
||||
[B<-verify_email email>]
|
||||
[B<-verify_hostname hostname>]
|
||||
[B<-verify_ip ip>]
|
||||
[B<-verify_name name>]
|
||||
[B<-auth_level> I<num>]
|
||||
[B<-verify_depth> I<num>]
|
||||
[B<-verify_email> I<email>]
|
||||
[B<-verify_hostname> I<hostname>]
|
||||
[B<-verify_ip> I<ip>]
|
||||
[B<-verify_name> I<name>]
|
||||
[B<-x509_strict>]
|
||||
[B<-md digest>]
|
||||
[B<-md> I<digest>]
|
||||
[B<-I<cipher>>]
|
||||
[B<-nointern>]
|
||||
[B<-noverify>]
|
||||
@@ -78,34 +80,35 @@ B<openssl> B<cms>
|
||||
[B<-crlfeol>]
|
||||
[B<-asciicrlf>]
|
||||
[B<-nodetach>]
|
||||
[B<-certfile file>]
|
||||
[B<-certsout file>]
|
||||
[B<-signer file>]
|
||||
[B<-recip file>]
|
||||
[B<-certfile> I<file>]
|
||||
[B<-certsout> I<file>]
|
||||
[B<-signer> I<file>]
|
||||
[B<-recip> I<file>]
|
||||
[B<-keyid>]
|
||||
[B<-receipt_request_all>]
|
||||
[B<-receipt_request_first>]
|
||||
[B<-receipt_request_from emailaddress>]
|
||||
[B<-receipt_request_to emailaddress>]
|
||||
[B<-receipt_request_from> I<emailaddress>]
|
||||
[B<-receipt_request_to> I<emailaddress>]
|
||||
[B<-receipt_request_print>]
|
||||
[B<-secretkey key>]
|
||||
[B<-secretkeyid id>]
|
||||
[B<-econtent_type type>]
|
||||
[B<-inkey file>]
|
||||
[B<-keyopt name:parameter>]
|
||||
[B<-passin arg>]
|
||||
[B<-rand file...>]
|
||||
[B<-writerand file>]
|
||||
[B<cert.pem...>]
|
||||
[B<-to addr>]
|
||||
[B<-from addr>]
|
||||
[B<-subject subj>]
|
||||
[cert.pem]...
|
||||
[B<-secretkey> I<key>]
|
||||
[B<-secretkeyid> I<id>]
|
||||
[B<-econtent_type> I<type>]
|
||||
[B<-inkey> I<file>]
|
||||
[B<-keyopt> I<name>:I<parameter>]
|
||||
[B<-passin> I<arg>]
|
||||
[B<-rand> I<files>]
|
||||
[B<-writerand> I<file>]
|
||||
[B<-to> I<addr>]
|
||||
[B<-from> I<addr>]
|
||||
[B<-subject> I<subj>]
|
||||
[I<cert.pem> ...]
|
||||
|
||||
=for openssl ifdef des-wrap engine
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The B<cms> command handles S/MIME v3.1 mail. It can encrypt, decrypt, sign and
|
||||
verify, compress and uncompress S/MIME messages.
|
||||
This command handles S/MIME v3.1 mail. It can encrypt, decrypt,
|
||||
sign and verify, compress and uncompress S/MIME messages.
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
@@ -202,18 +205,18 @@ Generate and output a signed receipt for the supplied message. The input
|
||||
message B<must> contain a signed receipt request. Functionality is otherwise
|
||||
similar to the B<-sign> operation.
|
||||
|
||||
=item B<-verify_receipt receipt>
|
||||
=item B<-verify_receipt> I<receipt>
|
||||
|
||||
Verify a signed receipt in filename B<receipt>. The input message B<must>
|
||||
contain the original receipt request. Functionality is otherwise similar
|
||||
to the B<-verify> operation.
|
||||
|
||||
=item B<-in filename>
|
||||
=item B<-in> I<filename>
|
||||
|
||||
The input message to be encrypted or signed or the message to be decrypted
|
||||
or verified.
|
||||
|
||||
=item B<-inform SMIME|PEM|DER>
|
||||
=item B<-inform> B<DER>|B<PEM>|B<SMIME>
|
||||
|
||||
This specifies the input format for the CMS structure. The default
|
||||
is B<SMIME> which reads an S/MIME format message. B<PEM> and B<DER>
|
||||
@@ -222,17 +225,17 @@ instead. This currently only affects the input format of the CMS
|
||||
structure, if no CMS structure is being input (for example with
|
||||
B<-encrypt> or B<-sign>) this option has no effect.
|
||||
|
||||
=item B<-rctform SMIME|PEM|DER>
|
||||
=item B<-rctform> B<DER>|B<PEM>|B<SMIME>
|
||||
|
||||
Specify the format for a signed receipt for use with the B<-receipt_verify>
|
||||
operation.
|
||||
|
||||
=item B<-out filename>
|
||||
=item B<-out> I<filename>
|
||||
|
||||
The message text that has been decrypted or verified or the output MIME
|
||||
format message that has been signed or verified.
|
||||
|
||||
=item B<-outform SMIME|PEM|DER>
|
||||
=item B<-outform> B<DER>|B<PEM>|B<SMIME>
|
||||
|
||||
This specifies the output format for the CMS structure. The default
|
||||
is B<SMIME> which writes an S/MIME format message. B<PEM> and B<DER>
|
||||
@@ -241,7 +244,7 @@ instead. This currently only affects the output format of the CMS
|
||||
structure, if no CMS structure is being output (for example with
|
||||
B<-verify> or B<-decrypt>) this option has no effect.
|
||||
|
||||
=item B<-stream -indef -noindef>
|
||||
=item B<-stream>, B<-indef>, B<-noindef>
|
||||
|
||||
The B<-stream> and B<-indef> options are equivalent and enable streaming I/O
|
||||
for encoding operations. This permits single pass processing of data without
|
||||
@@ -256,7 +259,7 @@ 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.
|
||||
|
||||
=item B<-content filename>
|
||||
=item B<-content> I<filename>
|
||||
|
||||
This specifies a file containing the detached content, this is only
|
||||
useful with the B<-verify> command. This is only usable if the CMS
|
||||
@@ -282,26 +285,11 @@ structure is being checked.
|
||||
For the B<-cmsout> operation print out all fields of the CMS structure. This
|
||||
is mainly useful for testing purposes.
|
||||
|
||||
=item B<-CAfile file>
|
||||
=item B<-CAfile> I<file>, B<-no-CAfile>, B<-CApath> I<dir>, B<-no-CApath>
|
||||
|
||||
A file containing trusted CA certificates, only used with B<-verify>.
|
||||
See L<openssl(1)/Trusted Certificate Options> for more information.
|
||||
|
||||
=item B<-CApath dir>
|
||||
|
||||
A directory containing trusted CA certificates, only used with
|
||||
B<-verify>. This directory must be a standard certificate directory: that
|
||||
is a hash of each subject name (using B<x509 -hash>) should be linked
|
||||
to each certificate.
|
||||
|
||||
=item B<-no-CAfile>
|
||||
|
||||
Do not load the trusted CA certificates from the default file location
|
||||
|
||||
=item B<-no-CApath>
|
||||
|
||||
Do not load the trusted CA certificates from the default directory location
|
||||
|
||||
=item B<-md digest>
|
||||
=item B<-md> I<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 SHA1).
|
||||
@@ -311,7 +299,7 @@ default digest algorithm for the signing key will be used (usually SHA1).
|
||||
The encryption algorithm to use. For example triple DES (168 bits) - B<-des3>
|
||||
or 256 bit AES - B<-aes256>. Any standard algorithm name (as used by the
|
||||
EVP_get_cipherbyname() function) can also be used preceded by a dash, for
|
||||
example B<-aes-128-cbc>. See L<enc(1)> for a list of ciphers
|
||||
example B<-aes-128-cbc>. See L<openssl-enc(1)> for a list of ciphers
|
||||
supported by your version of OpenSSL.
|
||||
|
||||
If not specified triple DES is used. Only used with B<-encrypt> and
|
||||
@@ -374,24 +362,24 @@ to translation by mail relays but it cannot be read by mail agents that
|
||||
do not support S/MIME. Without this option cleartext signing with
|
||||
the MIME type multipart/signed is used.
|
||||
|
||||
=item B<-certfile file>
|
||||
=item B<-certfile> I<file>
|
||||
|
||||
Allows additional certificates to be specified. When signing these will
|
||||
be included with the message. When verifying these will be searched for
|
||||
the signers certificates. The certificates should be in PEM format.
|
||||
|
||||
=item B<-certsout file>
|
||||
=item B<-certsout> I<file>
|
||||
|
||||
Any certificates contained in the message are written to B<file>.
|
||||
Any certificates contained in the message are written to I<file>.
|
||||
|
||||
=item B<-signer file>
|
||||
=item B<-signer> I<file>
|
||||
|
||||
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.
|
||||
|
||||
=item B<-recip file>
|
||||
=item B<-recip> I<file>
|
||||
|
||||
When decrypting a message this specifies the recipients certificate. The
|
||||
certificate must match one of the recipients of the message or an error
|
||||
@@ -416,12 +404,12 @@ For B<-sign> option include a signed receipt request. Indicate requests should
|
||||
be provided by all recipient or first tier recipients (those mailed directly
|
||||
and not from a mailing list). Ignored it B<-receipt_request_from> is included.
|
||||
|
||||
=item B<-receipt_request_from emailaddress>
|
||||
=item B<-receipt_request_from> I<emailaddress>
|
||||
|
||||
For B<-sign> option include a signed receipt request. Add an explicit email
|
||||
address where receipts should be supplied.
|
||||
|
||||
=item B<-receipt_request_to emailaddress>
|
||||
=item B<-receipt_request_to> I<emailaddress>
|
||||
|
||||
Add an explicit email address where signed receipts should be sent to. This
|
||||
option B<must> but supplied if a signed receipt it requested.
|
||||
@@ -431,7 +419,7 @@ option B<must> but supplied if a signed receipt it requested.
|
||||
For the B<-verify> operation print out the contents of any signed receipt
|
||||
requests.
|
||||
|
||||
=item B<-secretkey key>
|
||||
=item B<-secretkey> I<key>
|
||||
|
||||
Specify symmetric key to use. The key must be supplied in hex format and be
|
||||
consistent with the algorithm used. Supported by the B<-EncryptedData_encrypt>
|
||||
@@ -439,21 +427,21 @@ B<-EncryptedData_decrypt>, B<-encrypt> and B<-decrypt> options. When used
|
||||
with B<-encrypt> or B<-decrypt> the supplied key is used to wrap or unwrap the
|
||||
content encryption key using an AES key in the B<KEKRecipientInfo> type.
|
||||
|
||||
=item B<-secretkeyid id>
|
||||
=item B<-secretkeyid> I<id>
|
||||
|
||||
The key identifier for the supplied symmetric key for B<KEKRecipientInfo> type.
|
||||
This option B<must> be present if the B<-secretkey> option is used with
|
||||
B<-encrypt>. With B<-decrypt> operations the B<id> is used to locate the
|
||||
B<-encrypt>. With B<-decrypt> operations the I<id> is used to locate the
|
||||
relevant key if it is not supplied then an attempt is used to decrypt any
|
||||
B<KEKRecipientInfo> structures.
|
||||
|
||||
=item B<-econtent_type type>
|
||||
=item B<-econtent_type> I<type>
|
||||
|
||||
Set the encapsulated content type to B<type> if not supplied the B<Data> type
|
||||
is used. The B<type> argument can be any valid OID name in either text or
|
||||
Set the encapsulated content type to I<type> if not supplied the B<Data> type
|
||||
is used. The I<type> argument can be any valid OID name in either text or
|
||||
numerical format.
|
||||
|
||||
=item B<-inkey file>
|
||||
=item B<-inkey> I<file>
|
||||
|
||||
The private key to use when signing or decrypting. This must match the
|
||||
corresponding certificate. If this option is not specified then the
|
||||
@@ -461,37 +449,28 @@ private key must be included in the certificate file specified with
|
||||
the B<-recip> or B<-signer> file. When signing this option can be used
|
||||
multiple times to specify successive keys.
|
||||
|
||||
=item B<-keyopt name:opt>
|
||||
=item B<-keyopt> I<name>:I<parameter>
|
||||
|
||||
For signing and encryption this option can be used multiple times to
|
||||
set customised parameters for the preceding key or certificate. It can
|
||||
currently be used to set RSA-PSS for signing, RSA-OAEP for encryption
|
||||
or to modify default parameters for ECDH.
|
||||
|
||||
=item B<-passin arg>
|
||||
=item B<-passin> I<arg>
|
||||
|
||||
The private key password source. For more information about the format of B<arg>
|
||||
see the B<PASS PHRASE ARGUMENTS> section in L<openssl(1)>.
|
||||
see L<openssl(1)/Pass Phrase Options>.
|
||||
|
||||
=item B<-rand file...>
|
||||
=item B<-rand> I<files>, B<-writerand> I<file>
|
||||
|
||||
A file or files containing random data used to seed the random number
|
||||
generator.
|
||||
Multiple files can be specified separated by an OS-dependent character.
|
||||
The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for
|
||||
all others.
|
||||
See L<openssl(1)/Random State Options> for more information.
|
||||
|
||||
=item [B<-writerand file>]
|
||||
|
||||
Writes random data to the specified I<file> upon exit.
|
||||
This can be used with a subsequent B<-rand> flag.
|
||||
|
||||
=item B<cert.pem...>
|
||||
=item I<cert.pem> ...
|
||||
|
||||
One or more certificates of message recipients: used when encrypting
|
||||
a message.
|
||||
|
||||
=item B<-to, -from, -subject>
|
||||
=item B<-to>, B<-from>, B<-subject>
|
||||
|
||||
The relevant mail headers. These are included outside the signed
|
||||
portion of a message so they may be included manually. If signing
|
||||
@@ -507,7 +486,7 @@ B<-auth_level>, B<-verify_depth>, B<-verify_email>, B<-verify_hostname>,
|
||||
B<-verify_ip>, B<-verify_name>, B<-x509_strict>
|
||||
|
||||
Set various certificate chain validation options. See the
|
||||
L<verify(1)> manual page for details.
|
||||
L<openssl-verify(1)> manual page for details.
|
||||
|
||||
=back
|
||||
|
||||
@@ -627,14 +606,14 @@ the signers certificates.
|
||||
|
||||
=head1 COMPATIBILITY WITH PKCS#7 FORMAT
|
||||
|
||||
The B<smime> utility can only process the older B<PKCS#7> format. The B<cms>
|
||||
utility supports Cryptographic Message Syntax format. Use of some features
|
||||
will result in messages which cannot be processed by applications which only
|
||||
support the older format. These are detailed below.
|
||||
L<openssl-smime(1)> can only process the older B<PKCS#7> format.
|
||||
B<openssl cms> supports Cryptographic Message Syntax format.
|
||||
Use of some features will result in messages which cannot be processed by
|
||||
applications which only support the older format. These are detailed below.
|
||||
|
||||
The use of the B<-keyid> option with B<-sign> or B<-encrypt>.
|
||||
|
||||
The B<-outform PEM> option uses different headers.
|
||||
The B<-outform> I<PEM> option uses different headers.
|
||||
|
||||
The B<-compress> option.
|
||||
|
||||
@@ -645,7 +624,7 @@ The use of PSS with B<-sign>.
|
||||
The use of OAEP or non-RSA keys with B<-encrypt>.
|
||||
|
||||
Additionally the B<-EncryptedData_create> and B<-data_create> type cannot
|
||||
be processed by the older B<smime> command.
|
||||
be processed by the older L<openssl-smime(1)> command.
|
||||
|
||||
=head1 EXAMPLES
|
||||
|
||||
@@ -764,7 +743,7 @@ No revocation checking is done on the signer's certificate.
|
||||
The use of multiple B<-signer> options and the B<-resign> command were first
|
||||
added in OpenSSL 1.0.0.
|
||||
|
||||
The B<keyopt> option was added in OpenSSL 1.0.2.
|
||||
The B<-keyopt> option was added in OpenSSL 1.0.2.
|
||||
|
||||
Support for RSA-OAEP and RSA-PSS was added in OpenSSL 1.0.2.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user