doc: document that 'openssl rand' is cryptographically secure
[openssl.git] / doc / man1 / openssl-cms.pod.in
1 =pod
2 {- OpenSSL::safe::output_do_not_edit_headers(); -}
3
4 =head1 NAME
5
6 openssl-cms - CMS utility
7
8 =head1 SYNOPSIS
9
10 B<openssl> B<cms>
11 [B<-help>]
12 [B<-encrypt>]
13 [B<-decrypt>]
14 [B<-debug_decrypt>]
15 [B<-sign>]
16 [B<-verify>]
17 [B<-verify_retcode>]
18 [B<-no_attr_verify>]
19 [B<-nosigs>]
20 [B<-no_content_verify>]
21 [B<-cmsout>]
22 [B<-resign>]
23 [B<-cades>]
24 [B<-data_create>]
25 [B<-data_out>]
26 [B<-digest_create>]
27 [B<-digest_verify>]
28 [B<-compress>]
29 [B<-uncompress>]
30 [B<-EncryptedData_decrypt>]
31 [B<-EncryptedData_encrypt>]
32 [B<-sign_receipt>]
33 [B<-verify_receipt> I<receipt>]
34 [B<-in> I<filename>]
35 [B<-out> I<filename>]
36 [B<-inform> B<DER>|B<PEM>|B<SMIME>]
37 [B<-outform> B<DER>|B<PEM>|B<SMIME>]
38 [B<-rctform> B<DER>|B<PEM>|B<SMIME>]
39 [B<-keyform> B<DER>|B<PEM>|B<ENGINE>]
40 [B<-stream>]
41 [B<-indef>]
42 [B<-noindef>]
43 [B<-content> I<filename>]
44 [B<-text>]
45 [B<-noout>]
46 [B<-print>]
47 [B<-md> I<digest>]
48 [B<-I<cipher>>]
49 [B<-nointern>]
50 [B<-noverify>]
51 [B<-nocerts>]
52 [B<-noattr>]
53 [B<-nosmimecap>]
54 [B<-binary>]
55 [B<-crlfeol>]
56 [B<-asciicrlf>]
57 [B<-nodetach>]
58 [B<-certfile> I<file>]
59 [B<-certsout> I<file>]
60 [B<-signer> I<file>]
61 [B<-recip> I<file>]
62 [B<-keyid>]
63 [B<-receipt_request_all>]
64 [B<-receipt_request_first>]
65 [B<-receipt_request_from> I<emailaddress>]
66 [B<-receipt_request_to> I<emailaddress>]
67 [B<-receipt_request_print>]
68 [B<-pwri_password> I<password>]
69 [B<-secretkey> I<key>]
70 [B<-secretkeyid> I<id>]
71 [B<-econtent_type> I<type>]
72 [B<-inkey> I<file>]
73 [B<-keyopt> I<name>:I<parameter>]
74 [B<-passin> I<arg>]
75 [B<-to> I<addr>]
76 [B<-from> I<addr>]
77 [B<-subject> I<subj>]
78 {- $OpenSSL::safe::opt_v_synopsis -}
79 {- $OpenSSL::safe::opt_trust_synopsis -}
80 {- $OpenSSL::safe::opt_r_synopsis -}
81 {- $OpenSSL::safe::opt_engine_synopsis -}
82 [I<cert.pem> ...]
83
84 =for openssl ifdef des-wrap engine
85
86 =head1 DESCRIPTION
87
88 This command handles S/MIME v3.1 mail. It can encrypt, decrypt,
89 sign and verify, compress and uncompress S/MIME messages.
90
91 =head1 OPTIONS
92
93 There are fourteen operation options that set the type of operation to be
94 performed. The meaning of the other options varies according to the operation
95 type.
96
97 =over 4
98
99 =item B<-help>
100
101 Print out a usage message.
102
103 =item B<-encrypt>
104
105 Encrypt mail for the given recipient certificates. Input file is the message
106 to be encrypted. The output file is the encrypted mail in MIME format. The
107 actual CMS type is <B>EnvelopedData<B>.
108
109 Note that no revocation check is done for the recipient cert, so if that
110 key has been compromised, others may be able to decrypt the text.
111
112 =item B<-decrypt>
113
114 Decrypt mail using the supplied certificate and private key. Expects an
115 encrypted mail message in MIME format for the input file. The decrypted mail
116 is written to the output file.
117
118 =item B<-debug_decrypt>
119
120 This option sets the B<CMS_DEBUG_DECRYPT> flag. This option should be used
121 with caution: see the notes section below.
122
123 =item B<-sign>
124
125 Sign mail using the supplied certificate and private key. Input file is
126 the message to be signed. The signed message in MIME format is written
127 to the output file.
128
129 =item B<-verify>
130
131 Verify signed mail. Expects a signed mail message on input and outputs
132 the signed data. Both clear text and opaque signing is supported.
133
134 =item B<-verify_retcode>
135
136 Exit nonzero on verification failure.
137
138 =item B<-no_attr_verify>
139
140 Do not verify signed attribute signatures.
141
142 =item B<-no_content_verify>
143
144 Do not verify signed content signatures.
145
146 =item B<-nosigs>
147
148 Don't verify message signature.
149
150 =item B<-cmsout>
151
152 Takes an input message and writes out a PEM encoded CMS structure.
153
154 =item B<-resign>
155
156 Resign a message: take an existing message and one or more new signers.
157
158 =item B<-cades>
159
160 Add an ESS signing-certificate or ESS signing-certificate-v2 signed-attribute to the SignerInfo, in order to make
161 the signature comply with the requirements for a CAdES Basic Electronic Signature (CAdES-BES). See the NOTES
162 section for more details.
163
164 =item B<-data_create>
165
166 Create a CMS B<Data> type.
167
168 =item B<-data_out>
169
170 B<Data> type and output the content.
171
172 =item B<-digest_create>
173
174 Create a CMS B<DigestedData> type.
175
176 =item B<-digest_verify>
177
178 Verify a CMS B<DigestedData> type and output the content.
179
180 =item B<-compress>
181
182 Create a CMS B<CompressedData> type. OpenSSL must be compiled with B<zlib>
183 support for this option to work, otherwise it will output an error.
184
185 =item B<-uncompress>
186
187 Uncompress a CMS B<CompressedData> type and output the content. OpenSSL must be
188 compiled with B<zlib> support for this option to work, otherwise it will
189 output an error.
190
191 =item B<-EncryptedData_decrypt>
192
193 Decrypt content using supplied symmetric key and algorithm using a CMS
194 B<EncryptedData> type and output the content.
195
196 =item B<-EncryptedData_encrypt>
197
198 Encrypt content using supplied symmetric key and algorithm using a CMS
199 B<EncryptedData> type and output the content.
200
201 =item B<-sign_receipt>
202
203 Generate and output a signed receipt for the supplied message. The input
204 message B<must> contain a signed receipt request. Functionality is otherwise
205 similar to the B<-sign> operation.
206
207 =item B<-verify_receipt> I<receipt>
208
209 Verify a signed receipt in filename B<receipt>. The input message B<must>
210 contain the original receipt request. Functionality is otherwise similar
211 to the B<-verify> operation.
212
213 =item B<-in> I<filename>
214
215 The input message to be encrypted or signed or the message to be decrypted
216 or verified.
217
218 =item B<-out> I<filename>
219
220 The message text that has been decrypted or verified or the output MIME
221 format message that has been signed or verified.
222
223 =item B<-inform> B<DER>|B<PEM>|B<SMIME>
224
225 The input format of the CMS structure (if one is being read);
226 the default is B<SMIME>.
227 See L<openssl(1)/Format Options> for details.
228
229 =item B<-outform> B<DER>|B<PEM>|B<SMIME>
230
231 The output format of the CMS structure (if one is being written);
232 the default is B<SMIME>.
233 See L<openssl(1)/Format Options> for details.
234
235 =item B<-keyform> B<DER>|B<PEM>|B<ENGINE>
236
237 The format of the private key file; the default is B<PEM>.
238 See L<openssl(1)/Format Options> for details.
239
240 =item B<-rctform> B<DER>|B<PEM>|B<SMIME>
241
242 The signed receipt format for use with the B<-receipt_verify>; the default
243 is B<SMIME>.
244 See L<openssl(1)/Format Options> for details.
245
246 =item B<-stream>, B<-indef>
247
248 The B<-stream> and B<-indef> options are equivalent and enable streaming I/O
249 for encoding operations. This permits single pass processing of data without
250 the need to hold the entire contents in memory, potentially supporting very
251 large files. Streaming is automatically set for S/MIME signing with detached
252 data if the output format is B<SMIME> it is currently off by default for all
253 other operations.
254
255 =item B<-noindef>
256
257 Disable streaming I/O where it would produce and indefinite length constructed
258 encoding. This option currently has no effect. In future streaming will be
259 enabled by default on all relevant operations and this option will disable it.
260
261 =item B<-content> I<filename>
262
263 This specifies a file containing the detached content, this is only
264 useful with the B<-verify> command. This is only usable if the CMS
265 structure is using the detached signature form where the content is
266 not included. This option will override any content if the input format
267 is S/MIME and it uses the multipart/signed MIME content type.
268
269 =item B<-text>
270
271 This option adds plain text (text/plain) MIME headers to the supplied
272 message if encrypting or signing. If decrypting or verifying it strips
273 off text headers: if the decrypted or verified message is not of MIME
274 type text/plain then an error occurs.
275
276 =item B<-noout>
277
278 For the B<-cmsout> operation do not output the parsed CMS structure. This
279 is useful when combined with the B<-print> option or if the syntax of the CMS
280 structure is being checked.
281
282 =item B<-print>
283
284 For the B<-cmsout> operation print out all fields of the CMS structure. This
285 is mainly useful for testing purposes.
286
287 =item B<-md> I<digest>
288
289 Digest algorithm to use when signing or resigning. If not present then the
290 default digest algorithm for the signing key will be used (usually SHA1).
291
292 =item B<-I<cipher>>
293
294 The encryption algorithm to use. For example triple DES (168 bits) - B<-des3>
295 or 256 bit AES - B<-aes256>. Any standard algorithm name (as used by the
296 EVP_get_cipherbyname() function) can also be used preceded by a dash, for
297 example B<-aes-128-cbc>. See L<openssl-enc(1)> for a list of ciphers
298 supported by your version of OpenSSL.
299
300 If not specified triple DES is used. Only used with B<-encrypt> and
301 B<-EncryptedData_create> commands.
302
303 =item B<-nointern>
304
305 When verifying a message normally certificates (if any) included in
306 the message are searched for the signing certificate. With this option
307 only the certificates specified in the B<-certfile> option are used.
308 The supplied certificates can still be used as untrusted CAs however.
309
310 =item B<-noverify>
311
312 Do not verify the signers certificate of a signed message.
313
314 =item B<-nocerts>
315
316 When signing a message the signer's certificate is normally included
317 with this option it is excluded. This will reduce the size of the
318 signed message but the verifier must have a copy of the signers certificate
319 available locally (passed using the B<-certfile> option for example).
320
321 =item B<-noattr>
322
323 Normally when a message is signed a set of attributes are included which
324 include the signing time and supported symmetric algorithms. With this
325 option they are not included.
326
327 =item B<-nosmimecap>
328
329 Exclude the list of supported algorithms from signed attributes, other options
330 such as signing time and content type are still included.
331
332 =item B<-binary>
333
334 Normally the input message is converted to "canonical" format which is
335 effectively using CR and LF as end of line: as required by the S/MIME
336 specification. When this option is present no translation occurs. This
337 is useful when handling binary data which may not be in MIME format.
338
339 =item B<-crlfeol>
340
341 Normally the output file uses a single B<LF> as end of line. When this
342 option is present B<CRLF> is used instead.
343
344 =item B<-asciicrlf>
345
346 When signing use ASCII CRLF format canonicalisation. This strips trailing
347 whitespace from all lines, deletes trailing blank lines at EOF and sets
348 the encapsulated content type. This option is normally used with detached
349 content and an output signature format of DER. This option is not normally
350 needed when verifying as it is enabled automatically if the encapsulated
351 content format is detected.
352
353 =item B<-nodetach>
354
355 When signing a message use opaque signing: this form is more resistant
356 to translation by mail relays but it cannot be read by mail agents that
357 do not support S/MIME.  Without this option cleartext signing with
358 the MIME type multipart/signed is used.
359
360 =item B<-certfile> I<file>
361
362 Allows additional certificates to be specified. When signing these will
363 be included with the message. When verifying these will be searched for
364 the signers certificates. The certificates should be in PEM format.
365
366 =item B<-certsout> I<file>
367
368 Any certificates contained in the message are written to I<file>.
369
370 =item B<-signer> I<file>
371
372 A signing certificate when signing or resigning a message, this option can be
373 used multiple times if more than one signer is required. If a message is being
374 verified then the signers certificates will be written to this file if the
375 verification was successful.
376
377 =item B<-recip> I<file>
378
379 When decrypting a message this specifies the recipients certificate. The
380 certificate must match one of the recipients of the message or an error
381 occurs.
382
383 When encrypting a message this option may be used multiple times to specify
384 each recipient. This form B<must> be used if customised parameters are
385 required (for example to specify RSA-OAEP).
386
387 Only certificates carrying RSA, Diffie-Hellman or EC keys are supported by this
388 option.
389
390 =item B<-keyid>
391
392 Use subject key identifier to identify certificates instead of issuer name and
393 serial number. The supplied certificate B<must> include a subject key
394 identifier extension. Supported by B<-sign> and B<-encrypt> options.
395
396 =item B<-receipt_request_all>, B<-receipt_request_first>
397
398 For B<-sign> option include a signed receipt request. Indicate requests should
399 be provided by all recipient or first tier recipients (those mailed directly
400 and not from a mailing list). Ignored it B<-receipt_request_from> is included.
401
402 =item B<-receipt_request_from> I<emailaddress>
403
404 For B<-sign> option include a signed receipt request. Add an explicit email
405 address where receipts should be supplied.
406
407 =item B<-receipt_request_to> I<emailaddress>
408
409 Add an explicit email address where signed receipts should be sent to. This
410 option B<must> but supplied if a signed receipt it requested.
411
412 =item B<-receipt_request_print>
413
414 For the B<-verify> operation print out the contents of any signed receipt
415 requests.
416
417 =item B<-pwri_password> I<password>
418
419 Specify password for recipient.
420
421 =item B<-secretkey> I<key>
422
423 Specify symmetric key to use. The key must be supplied in hex format and be
424 consistent with the algorithm used. Supported by the B<-EncryptedData_encrypt>
425 B<-EncryptedData_decrypt>, B<-encrypt> and B<-decrypt> options. When used
426 with B<-encrypt> or B<-decrypt> the supplied key is used to wrap or unwrap the
427 content encryption key using an AES key in the B<KEKRecipientInfo> type.
428
429 =item B<-secretkeyid> I<id>
430
431 The key identifier for the supplied symmetric key for B<KEKRecipientInfo> type.
432 This option B<must> be present if the B<-secretkey> option is used with
433 B<-encrypt>. With B<-decrypt> operations the I<id> is used to locate the
434 relevant key if it is not supplied then an attempt is used to decrypt any
435 B<KEKRecipientInfo> structures.
436
437 =item B<-econtent_type> I<type>
438
439 Set the encapsulated content type to I<type> if not supplied the B<Data> type
440 is used. The I<type> argument can be any valid OID name in either text or
441 numerical format.
442
443 =item B<-inkey> I<file>
444
445 The private key to use when signing or decrypting. This must match the
446 corresponding certificate. If this option is not specified then the
447 private key must be included in the certificate file specified with
448 the B<-recip> or B<-signer> file. When signing this option can be used
449 multiple times to specify successive keys.
450
451 =item B<-keyopt> I<name>:I<parameter>
452
453 For signing and encryption this option can be used multiple times to
454 set customised parameters for the preceding key or certificate. It can
455 currently be used to set RSA-PSS for signing, RSA-OAEP for encryption
456 or to modify default parameters for ECDH.
457
458 =item B<-passin> I<arg>
459
460 The private key password source. For more information about the format of B<arg>
461 see L<openssl(1)/Pass Phrase Options>.
462
463 =item B<-to>, B<-from>, B<-subject>
464
465 The relevant mail headers. These are included outside the signed
466 portion of a message so they may be included manually. If signing
467 then many S/MIME mail clients check the signers certificate's email
468 address matches that specified in the From: address.
469
470 {- $OpenSSL::safe::opt_v_item -}
471
472 Any verification errors cause the command to exit.
473
474 {- $OpenSSL::safe::opt_trust_item -}
475
476 {- $OpenSSL::safe::opt_r_item -}
477
478 {- $OpenSSL::safe::opt_engine_item -}
479
480 =item I<cert.pem> ...
481
482 One or more certificates of message recipients: used when encrypting
483 a message.
484
485 =back
486
487 =head1 NOTES
488
489 The MIME message must be sent without any blank lines between the
490 headers and the output. Some mail programs will automatically add
491 a blank line. Piping the mail directly to sendmail is one way to
492 achieve the correct format.
493
494 The supplied message to be signed or encrypted must include the
495 necessary MIME headers or many S/MIME clients won't display it
496 properly (if at all). You can use the B<-text> option to automatically
497 add plain text headers.
498
499 A "signed and encrypted" message is one where a signed message is
500 then encrypted. This can be produced by encrypting an already signed
501 message: see the examples section.
502
503 This version of the program only allows one signer per message but it
504 will verify multiple signers on received messages. Some S/MIME clients
505 choke if a message contains multiple signers. It is possible to sign
506 messages "in parallel" by signing an already signed message.
507
508 The options B<-encrypt> and B<-decrypt> reflect common usage in S/MIME
509 clients. Strictly speaking these process CMS enveloped data: CMS
510 encrypted data is used for other purposes.
511
512 The B<-resign> option uses an existing message digest when adding a new
513 signer. This means that attributes must be present in at least one existing
514 signer using the same message digest or this operation will fail.
515
516 The B<-stream> and B<-indef> options enable streaming I/O support.
517 As a result the encoding is BER using indefinite length constructed encoding
518 and no longer DER. Streaming is supported for the B<-encrypt> operation and the
519 B<-sign> operation if the content is not detached.
520
521 Streaming is always used for the B<-sign> operation with detached data but
522 since the content is no longer part of the CMS structure the encoding
523 remains DER.
524
525 If the B<-decrypt> option is used without a recipient certificate then an
526 attempt is made to locate the recipient by trying each potential recipient
527 in turn using the supplied private key. To thwart the MMA attack
528 (Bleichenbacher's attack on PKCS #1 v1.5 RSA padding) all recipients are
529 tried whether they succeed or not and if no recipients match the message
530 is "decrypted" using a random key which will typically output garbage.
531 The B<-debug_decrypt> option can be used to disable the MMA attack protection
532 and return an error if no recipient can be found: this option should be used
533 with caution. For a fuller description see L<CMS_decrypt(3)>).
534
535 =head1 CADES BASIC ELECTRONIC SIGNATURE (CADES-BES)
536
537 A CAdES Basic Electronic Signature (CAdES-BES), as defined in the European Standard ETSI EN 319 122-1 V1.1.1, contains:
538
539 =over 4
540
541 =item *
542
543 The signed user data as defined in CMS (RFC 3852);
544
545 =item *
546
547 Content-type of the EncapsulatedContentInfo value being signed;
548
549 =item *
550
551 Message-digest of the eContent OCTET STRING within encapContentInfo being signed;
552
553 =item *
554
555 An ESS signing-certificate or ESS signing-certificate-v2 attribute, as defined in Enhanced Security Services (ESS), RFC 2634 and RFC 5035.
556 An ESS signing-certificate attribute only allows for the use of SHA-1 as a digest algorithm.
557 An ESS signing-certificate-v2 attribute allows for the use of any digest algorithm.
558
559 =item *
560
561 The digital signature value computed on the user data and, when present, on the signed attributes.
562
563 Note that currently the B<-cades> option applies only to the B<-sign> operation and is ignored during
564 the B<-verify> operation, i.e. the signing certification is not checked during the verification process.
565 This feature might be added in a future version.
566
567 =back
568
569 =head1 EXIT CODES
570
571 =over 4
572
573 =item Z<>0
574
575 The operation was completely successfully.
576
577 =item Z<>1
578
579 An error occurred parsing the command options.
580
581 =item Z<>2
582
583 One of the input files could not be read.
584
585 =item Z<>3
586
587 An error occurred creating the CMS file or when reading the MIME
588 message.
589
590 =item Z<>4
591
592 An error occurred decrypting or verifying the message.
593
594 =item Z<>5
595
596 The message was verified correctly but an error occurred writing out
597 the signers certificates.
598
599 =back
600
601 =head1 COMPATIBILITY WITH PKCS#7 FORMAT
602
603 L<openssl-smime(1)> can only process the older B<PKCS#7> format.
604 B<openssl cms> supports Cryptographic Message Syntax format.
605 Use of some features will result in messages which cannot be processed by
606 applications which only support the older format. These are detailed below.
607
608 The use of the B<-keyid> option with B<-sign> or B<-encrypt>.
609
610 The B<-outform> I<PEM> option uses different headers.
611
612 The B<-compress> option.
613
614 The B<-secretkey> option when used with B<-encrypt>.
615
616 The use of PSS with B<-sign>.
617
618 The use of OAEP or non-RSA keys with B<-encrypt>.
619
620 Additionally the B<-EncryptedData_create> and B<-data_create> type cannot
621 be processed by the older L<openssl-smime(1)> command.
622
623 =head1 EXAMPLES
624
625 Create a cleartext signed message:
626
627  openssl cms -sign -in message.txt -text -out mail.msg \
628         -signer mycert.pem
629
630 Create an opaque signed message
631
632  openssl cms -sign -in message.txt -text -out mail.msg -nodetach \
633         -signer mycert.pem
634
635 Create a signed message, include some additional certificates and
636 read the private key from another file:
637
638  openssl cms -sign -in in.txt -text -out mail.msg \
639         -signer mycert.pem -inkey mykey.pem -certfile mycerts.pem
640
641 Create a signed message with two signers, use key identifier:
642
643  openssl cms -sign -in message.txt -text -out mail.msg \
644         -signer mycert.pem -signer othercert.pem -keyid
645
646 Send a signed message under Unix directly to sendmail, including headers:
647
648  openssl cms -sign -in in.txt -text -signer mycert.pem \
649         -from steve@openssl.org -to someone@somewhere \
650         -subject "Signed message" | sendmail someone@somewhere
651
652 Verify a message and extract the signer's certificate if successful:
653
654  openssl cms -verify -in mail.msg -signer user.pem -out signedtext.txt
655
656 Send encrypted mail using triple DES:
657
658  openssl cms -encrypt -in in.txt -from steve@openssl.org \
659         -to someone@somewhere -subject "Encrypted message" \
660         -des3 user.pem -out mail.msg
661
662 Sign and encrypt mail:
663
664  openssl cms -sign -in ml.txt -signer my.pem -text \
665         | openssl cms -encrypt -out mail.msg \
666         -from steve@openssl.org -to someone@somewhere \
667         -subject "Signed and Encrypted message" -des3 user.pem
668
669 Note: the encryption command does not include the B<-text> option because the
670 message being encrypted already has MIME headers.
671
672 Decrypt mail:
673
674  openssl cms -decrypt -in mail.msg -recip mycert.pem -inkey key.pem
675
676 The output from Netscape form signing is a PKCS#7 structure with the
677 detached signature format. You can use this program to verify the
678 signature by line wrapping the base64 encoded structure and surrounding
679 it with:
680
681  -----BEGIN PKCS7-----
682  -----END PKCS7-----
683
684 and using the command,
685
686  openssl cms -verify -inform PEM -in signature.pem -content content.txt
687
688 alternatively you can base64 decode the signature and use
689
690  openssl cms -verify -inform DER -in signature.der -content content.txt
691
692 Create an encrypted message using 128 bit Camellia:
693
694  openssl cms -encrypt -in plain.txt -camellia128 -out mail.msg cert.pem
695
696 Add a signer to an existing message:
697
698  openssl cms -resign -in mail.msg -signer newsign.pem -out mail2.msg
699
700 Sign mail using RSA-PSS:
701
702  openssl cms -sign -in message.txt -text -out mail.msg \
703         -signer mycert.pem -keyopt rsa_padding_mode:pss
704
705 Create encrypted mail using RSA-OAEP:
706
707  openssl cms -encrypt -in plain.txt -out mail.msg \
708         -recip cert.pem -keyopt rsa_padding_mode:oaep
709
710 Use SHA256 KDF with an ECDH certificate:
711
712  openssl cms -encrypt -in plain.txt -out mail.msg \
713         -recip ecdhcert.pem -keyopt ecdh_kdf_md:sha256
714
715 =head1 BUGS
716
717 The MIME parser isn't very clever: it seems to handle most messages that I've
718 thrown at it but it may choke on others.
719
720 The code currently will only write out the signer's certificate to a file: if
721 the signer has a separate encryption certificate this must be manually
722 extracted. There should be some heuristic that determines the correct
723 encryption certificate.
724
725 Ideally a database should be maintained of a certificates for each email
726 address.
727
728 The code doesn't currently take note of the permitted symmetric encryption
729 algorithms as supplied in the SMIMECapabilities signed attribute. this means the
730 user has to manually include the correct encryption algorithm. It should store
731 the list of permitted ciphers in a database and only use those.
732
733 No revocation checking is done on the signer's certificate.
734
735 =head1 SEE ALSO
736
737 L<ossl_store-file(7)>
738
739 =head1 HISTORY
740
741 The use of multiple B<-signer> options and the B<-resign> command were first
742 added in OpenSSL 1.0.0.
743
744 The B<-keyopt> option was added in OpenSSL 1.0.2.
745
746 Support for RSA-OAEP and RSA-PSS was added in OpenSSL 1.0.2.
747
748 The use of non-RSA keys with B<-encrypt> and B<-decrypt>
749 was added in OpenSSL 1.0.2.
750
751 The -no_alt_chains option was added in OpenSSL 1.0.2b.
752
753 =head1 COPYRIGHT
754
755 Copyright 2008-2019 The OpenSSL Project Authors. All Rights Reserved.
756
757 Licensed under the Apache License 2.0 (the "License").  You may not use
758 this file except in compliance with the License.  You can obtain a copy
759 in the file LICENSE in the source distribution or at
760 L<https://www.openssl.org/source/license.html>.
761
762 =cut