deprecate EC precomputation functionality
[openssl.git] / doc / man1 / openssl-x509.pod.in
1 =pod
2 {- OpenSSL::safe::output_do_not_edit_headers(); -}
3
4 =head1 NAME
5
6 openssl-x509 - Certificate display and signing command
7
8 =head1 SYNOPSIS
9
10 B<openssl> B<x509>
11 [B<-help>]
12 [B<-inform> B<DER>|B<PEM>]
13 [B<-outform> B<DER>|B<PEM>]
14 [B<-keyform> B<DER>|B<PEM>|B<P12>|B<ENGINE>]
15 [B<-CAform> B<DER>|B<PEM>|B<P12>]
16 [B<-CAkeyform> B<DER>|B<PEM>|B<P12>|B<ENGINE>]
17 [B<-in> I<filename>]
18 [B<-out> I<filename>]
19 [B<-serial>]
20 [B<-hash>]
21 [B<-subject_hash>]
22 [B<-subject_hash_old>]
23 [B<-issuer_hash>]
24 [B<-issuer_hash_old>]
25 [B<-ocspid>]
26 [B<-subject>]
27 [B<-issuer>]
28 [B<-email>]
29 [B<-ocsp_uri>]
30 [B<-startdate>]
31 [B<-enddate>]
32 [B<-purpose>]
33 [B<-dates>]
34 [B<-checkend> I<num>]
35 [B<-modulus>]
36 [B<-pubkey>]
37 [B<-fingerprint>]
38 [B<-alias>]
39 [B<-noout>]
40 [B<-trustout>]
41 [B<-clrtrust>]
42 [B<-clrreject>]
43 [B<-addtrust> I<arg>]
44 [B<-addreject> I<arg>]
45 [B<-setalias> I<arg>]
46 [B<-days> I<arg>]
47 [B<-set_serial> I<n>]
48 [B<-signkey> I<arg>]
49 [B<-badsig>]
50 [B<-passin> I<arg>]
51 [B<-x509toreq>]
52 [B<-req>]
53 [B<-CA> I<filename>]
54 [B<-CAkey> I<filename>]
55 [B<-CAcreateserial>]
56 [B<-CAserial> I<filename>]
57 [B<-new>]
58 [B<-next_serial>]
59 [B<-nocert>]
60 [B<-force_pubkey> I<filename>]
61 [B<-subj> I<arg>]
62 [B<-text>]
63 [B<-ext> I<extensions>]
64 [B<-certopt> I<option>]
65 [B<-checkhost> I<host>]
66 [B<-checkemail> I<host>]
67 [B<-checkip> I<ipaddr>]
68 [B<-C>]
69 [B<-I<digest>>]
70 [B<-clrext>]
71 [B<-extfile> I<filename>]
72 [B<-extensions> I<section>]
73 [B<-sigopt> I<nm>:I<v>]
74 [B<-vfyopt> I<nm>:I<v>]
75 [B<-preserve_dates>]
76 {- $OpenSSL::safe::opt_name_synopsis -}
77 {- $OpenSSL::safe::opt_r_synopsis -}
78 {- $OpenSSL::safe::opt_engine_synopsis -}
79 {- $OpenSSL::safe::opt_provider_synopsis -}
80
81 =for openssl ifdef engine subject_hash_old issuer_hash_old
82
83 =head1 DESCRIPTION
84
85 This command is a multi-purposes certificate command. It can
86 be used to display certificate information, convert certificates to
87 various forms, sign certificate requests like a "mini CA" or edit
88 certificate trust settings.
89
90 Since there are a large number of options they will split up into
91 various sections.
92
93 =head1 OPTIONS
94
95 =head2 Input, Output, and General Purpose Options
96
97 =over 4
98
99 =item B<-help>
100
101 Print out a usage message.
102
103 =item B<-inform> B<DER>|B<PEM>
104
105 The CSR input format; the default is B<PEM>.
106 See L<openssl(1)/Format Options> for details.
107
108 The input is normally an X.509 certificate file of any format,
109 but this can change if other options such as B<-req> are used.
110
111 B<-outform> B<DER>|B<PEM>
112
113 The output format; the default is B<PEM>.
114 See L<openssl(1)/Format Options> for details.
115
116 =item B<-in> I<filename>
117
118 This specifies the input filename to read a certificate from or standard input
119 if this option is not specified.
120
121 =item B<-out> I<filename>
122
123 This specifies the output filename to write to or standard output by
124 default.
125
126 =item B<-I<digest>>
127
128 The digest to use.
129 This affects any signing or display option that uses a message
130 digest, such as the B<-fingerprint>, B<-signkey> and B<-CA> options.
131 Any digest supported by the L<openssl-dgst(1)> command can be used.
132 If not specified then SHA1 is used with B<-fingerprint> or
133 the default digest for the signing algorithm is used, typically SHA256.
134
135 =item B<-preserve_dates>
136
137 When signing a certificate, preserve the "notBefore" and "notAfter" dates
138 instead of adjusting them to current time and duration.
139 Cannot be used with the B<-days> option.
140
141 {- $OpenSSL::safe::opt_r_synopsis -}
142
143 {- $OpenSSL::safe::opt_engine_item -}
144
145 {- $OpenSSL::safe::opt_provider_item -}
146
147 =back
148
149 =head2 Display Options
150
151 Note: the B<-alias> and B<-purpose> options are also display options
152 but are described in the L</Trust Settings> section.
153
154 =over 4
155
156 =item B<-text>
157
158 Prints out the certificate in text form. Full details are output including the
159 public key, signature algorithms, issuer and subject names, serial number
160 any extensions present and any trust settings.
161
162 =item B<-ext> I<extensions>
163
164 Prints out the certificate extensions in text form. Extensions are specified
165 with a comma separated string, e.g., "subjectAltName,subjectKeyIdentifier".
166 See the L<x509v3_config(5)> manual page for the extension names.
167
168 =item B<-certopt> I<option>
169
170 Customise the output format used with B<-text>. The I<option> argument
171 can be a single option or multiple options separated by commas. The
172 B<-certopt> switch may be also be used more than once to set multiple
173 options. See the L</Text Options> section for more information.
174
175 =item B<-checkhost> I<host>
176
177 Check that the certificate matches the specified host.
178
179 =item B<-checkemail> I<email>
180
181 Check that the certificate matches the specified email address.
182
183 =item B<-checkip> I<ipaddr>
184
185 Check that the certificate matches the specified IP address.
186
187 =item B<-noout>
188
189 This option prevents output of the encoded version of the certificate.
190
191 =item B<-pubkey>
192
193 Outputs the certificate's SubjectPublicKeyInfo block in PEM format.
194
195 =item B<-modulus>
196
197 This option prints out the value of the modulus of the public key
198 contained in the certificate.
199
200 =item B<-serial>
201
202 Outputs the certificate serial number.
203
204 =item B<-subject_hash>
205
206 Outputs the "hash" of the certificate subject name. This is used in OpenSSL to
207 form an index to allow certificates in a directory to be looked up by subject
208 name.
209
210 =item B<-issuer_hash>
211
212 Outputs the "hash" of the certificate issuer name.
213
214 =item B<-ocspid>
215
216 Outputs the OCSP hash values for the subject name and public key.
217
218 =item B<-hash>
219
220 Synonym for "-subject_hash" for backward compatibility reasons.
221
222 =item B<-subject_hash_old>
223
224 Outputs the "hash" of the certificate subject name using the older algorithm
225 as used by OpenSSL before version 1.0.0.
226
227 =item B<-issuer_hash_old>
228
229 Outputs the "hash" of the certificate issuer name using the older algorithm
230 as used by OpenSSL before version 1.0.0.
231
232 =item B<-subject>
233
234 Outputs the subject name.
235
236 =item B<-issuer>
237
238 Outputs the issuer name.
239
240 {- $OpenSSL::safe::opt_name_item -}
241
242 =item B<-email>
243
244 Outputs the email address(es) if any.
245
246 =item B<-ocsp_uri>
247
248 Outputs the OCSP responder address(es) if any.
249
250 =item B<-startdate>
251
252 Prints out the start date of the certificate, that is the notBefore date.
253
254 =item B<-enddate>
255
256 Prints out the expiry date of the certificate, that is the notAfter date.
257
258 =item B<-dates>
259
260 Prints out the start and expiry dates of a certificate.
261
262 =item B<-checkend> I<arg>
263
264 Checks if the certificate expires within the next I<arg> seconds and exits
265 nonzero if yes it will expire or zero if not.
266
267 =item B<-fingerprint>
268
269 Calculates and outputs the digest of the DER encoded version of the entire
270 certificate (see digest options).
271 This is commonly called a "fingerprint". Because of the nature of message
272 digests, the fingerprint of a certificate is unique to that certificate and
273 two certificates with the same fingerprint can be considered to be the same.
274
275 =item B<-C>
276
277 This outputs the certificate in the form of a C source file.
278
279 =back
280
281 =head2 Trust Settings
282
283 A B<trusted certificate> is an ordinary certificate which has several
284 additional pieces of information attached to it such as the permitted
285 and prohibited uses of the certificate and an "alias".
286
287 Normally when a certificate is being verified at least one certificate
288 must be "trusted". By default a trusted certificate must be stored
289 locally and must be a root CA: any certificate chain ending in this CA
290 is then usable for any purpose.
291
292 Trust settings currently are only used with a root CA. They allow a finer
293 control over the purposes the root CA can be used for. For example a CA
294 may be trusted for SSL client but not SSL server use.
295
296 See the description in L<openssl-verify(1)> for more information
297 on the meaning of trust settings.
298
299 Future versions of OpenSSL will recognize trust settings on any
300 certificate: not just root CAs.
301
302
303 =over 4
304
305 =item B<-trustout>
306
307 Output a B<trusted> certificate rather than an ordinary. An ordinary
308 or trusted certificate can be input but by default an ordinary
309 certificate is output and any trust settings are discarded. With the
310 B<-trustout> option a trusted certificate is output. A trusted
311 certificate is automatically output if any trust settings are modified.
312
313 =item B<-setalias> I<arg>
314
315 Sets the alias of the certificate. This will allow the certificate
316 to be referred to using a nickname for example "Steve's Certificate".
317
318 =item B<-alias>
319
320 Outputs the certificate alias, if any.
321
322 =item B<-clrtrust>
323
324 Clears all the permitted or trusted uses of the certificate.
325
326 =item B<-clrreject>
327
328 Clears all the prohibited or rejected uses of the certificate.
329
330 =item B<-addtrust> I<arg>
331
332 Adds a trusted certificate use.
333 Any object name can be used here but currently only B<clientAuth> (SSL client
334 use), B<serverAuth> (SSL server use), B<emailProtection> (S/MIME email) and
335 B<anyExtendedKeyUsage> are used.
336 As of OpenSSL 1.1.0, the last of these blocks all purposes when rejected or
337 enables all purposes when trusted.
338 Other OpenSSL applications may define additional uses.
339
340 =item B<-addreject> I<arg>
341
342 Adds a prohibited use. It accepts the same values as the B<-addtrust>
343 option.
344
345 =item B<-purpose>
346
347 This option performs tests on the certificate extensions and outputs
348 the results. For a more complete description see the
349 L</CERTIFICATE EXTENSIONS> section.
350
351 =back
352
353 =head2 Signing Options
354
355 This command can be used to sign certificates and requests: it
356 can thus behave like a "mini CA".
357
358 =over 4
359
360 =item B<-signkey> I<arg>
361
362 This option causes the input file to be self signed using the supplied
363 private key or engine.
364
365 It sets the issuer name to the subject name (i.e., makes it self-issued)
366 and changes the public key to the supplied value (unless overridden by
367 B<-force_pubkey>). It sets the validity start date to the current time
368 and the end date to a value determined by the B<-days> option.
369 It retains any certificate extensions unless the B<-clrext> option is supplied;
370 this includes, for example, any existing key identifier extensions.
371
372 =item B<-badsig>
373
374 Corrupt the signature before writing it; this can be useful
375 for testing.
376
377 =item B<-sigopt> I<nm>:I<v>
378
379 Pass options to the signature algorithm during sign operations.
380 Names and values of these options are algorithm-specific.
381
382 =item B<-vfyopt> I<nm>:I<v>
383
384 Pass options to the signature algorithm during verify operations.
385 Names and values of these options are algorithm-specific.
386
387 =item B<-passin> I<arg>
388
389 The key password source. For more information about the format of I<arg>
390 see L<openssl(1)/Pass Phrase Options>.
391
392 =item B<-clrext>
393
394 Delete any extensions from a certificate. This option is used when a
395 certificate is being created from another certificate (for example with
396 the B<-signkey> or the B<-CA> options). Normally all extensions are
397 retained.
398
399 =item B<-keyform> B<DER>|B<PEM>|B<P12>|B<ENGINE>
400
401 The key format; the default is B<PEM>.
402 The only value with effect is B<ENGINE>; all others have become obsolete.
403 See L<openssl(1)/Format Options> for details.
404
405 =item B<-CAform> B<DER>|B<PEM>|B<P12>,
406
407 The format for the CA certificate.
408 This option has no effect and is retained for backward compatibility.
409
410 =item B<-CAkeyform> B<DER>|B<PEM>|B<P12>|B<ENGINE>
411
412 The format for the CA key; the default is B<PEM>.
413 The only value with effect is B<ENGINE>; all others have become obsolete.
414 See L<openssl(1)/Format Options> for details.
415
416 =item B<-days> I<arg>
417
418 Specifies the number of days to make a certificate valid for. The default
419 is 30 days. Cannot be used with the B<-preserve_dates> option.
420
421 =item B<-x509toreq>
422
423 Converts a certificate into a certificate request. The B<-signkey> option
424 is used to pass the required private key.
425
426 =item B<-req>
427
428 By default a certificate is expected on input. With this option a
429 certificate request is expected instead.
430
431 =item B<-set_serial> I<n>
432
433 Specifies the serial number to use. This option can be used with either
434 the B<-signkey> or B<-CA> options. If used in conjunction with the B<-CA>
435 option the serial number file (as specified by the B<-CAserial> or
436 B<-CAcreateserial> options) is not used.
437
438 The serial number can be decimal or hex (if preceded by C<0x>).
439
440 =item B<-CA> I<filename>
441
442 Specifies the CA certificate to be used for signing. When this option is
443 present, this command behaves like a "mini CA". The input file is signed by
444 this CA using this option: that is its issuer name is set to the subject name
445 of the CA and it is digitally signed using the CAs private key.
446
447 This option is normally combined with the B<-req> option. Without the
448 B<-req> option the input is a certificate which must be self signed.
449
450 =item B<-CAkey> I<filename>
451
452 Sets the CA private key to sign a certificate with. If this option is
453 not specified then it is assumed that the CA private key is present in
454 the CA certificate file.
455
456 =item B<-CAserial> I<filename>
457
458 Sets the CA serial number file to use.
459
460 When the B<-CA> option is used to sign a certificate it uses a serial
461 number specified in a file. This file consists of one line containing
462 an even number of hex digits with the serial number to use. After each
463 use the serial number is incremented and written out to the file again.
464
465 The default filename consists of the CA certificate file base name with
466 F<.srl> appended. For example if the CA certificate file is called
467 F<mycacert.pem> it expects to find a serial number file called
468 F<mycacert.srl>.
469
470 =item B<-CAcreateserial>
471
472 With this option the CA serial number file is created if it does not exist:
473 it will contain the serial number "02" and the certificate being signed will
474 have the 1 as its serial number. If the B<-CA> option is specified
475 and the serial number file does not exist a random number is generated;
476 this is the recommended practice.
477
478 =item B<-extfile> I<filename>
479
480 File containing certificate extensions to use. If not specified then
481 no extensions are added to the certificate.
482
483 =item B<-extensions> I<section>
484
485 The section to add certificate extensions from. If this option is not
486 specified then the extensions should either be contained in the unnamed
487 (default) section or the default section should contain a variable called
488 "extensions" which contains the section to use. See the
489 L<x509v3_config(5)> manual page for details of the
490 extension section format.
491
492 =item B<-new>
493
494 Generate a certificate from scratch, not using an input certificate
495 or certificate request. So the B<-in> option must not be used in this case.
496 Instead, the B<-subj> and <-force_pubkey> options need to be given.
497
498 =item B<-next_serial>
499
500 Set the serial to be one more than the number in the certificate.
501
502 =item B<-nocert>
503
504 Do not generate or output a certificate.
505
506 =item B<-force_pubkey> I<filename>
507
508 When a certificate is created set its public key to the key in I<filename>
509 instead of the key contained in the input or given with the B<-signkey> option.
510
511 This option is useful for creating self-issued certificates that are not
512 self-signed, for instance when the key cannot be used for signing, such as DH.
513 It can also be used in conjunction with b<-new> and B<-subj> to directly
514 generate a certificate containing any desired public key.
515
516 =item B<-subj> I<arg>
517
518 When a certificate is created set its subject name to the given value.
519 The arg must be formatted as C</type0=value0/type1=value1/type2=...>.
520 Keyword characters may be escaped by \ (backslash), and whitespace is retained.
521 Empty values are permitted, but the corresponding type will not be included
522 in the certificate. Giving a single C</> will lead to an empty sequence of RDNs
523 (a NULL subject DN).
524
525 Unless the B<-CA> option is given the issuer is set to the same value.
526
527 This option can be used in conjunction with the B<-force_pubkey> option
528 to create a certificate even without providing an input certificate
529 or certificate request.
530
531 =back
532
533 =head2 Text Options
534
535 As well as customising the name output format, it is also possible to
536 customise the actual fields printed using the B<certopt> options when
537 the B<text> option is present. The default behaviour is to print all fields.
538
539 =over 4
540
541 =item B<compatible>
542
543 Use the old format. This is equivalent to specifying no output options at all.
544
545 =item B<no_header>
546
547 Don't print header information: that is the lines saying "Certificate"
548 and "Data".
549
550 =item B<no_version>
551
552 Don't print out the version number.
553
554 =item B<no_serial>
555
556 Don't print out the serial number.
557
558 =item B<no_signame>
559
560 Don't print out the signature algorithm used.
561
562 =item B<no_validity>
563
564 Don't print the validity, that is the B<notBefore> and B<notAfter> fields.
565
566 =item B<no_subject>
567
568 Don't print out the subject name.
569
570 =item B<no_issuer>
571
572 Don't print out the issuer name.
573
574 =item B<no_pubkey>
575
576 Don't print out the public key.
577
578 =item B<no_sigdump>
579
580 Don't give a hexadecimal dump of the certificate signature.
581
582 =item B<no_aux>
583
584 Don't print out certificate trust information.
585
586 =item B<no_extensions>
587
588 Don't print out any X509V3 extensions.
589
590 =item B<ext_default>
591
592 Retain default extension behaviour: attempt to print out unsupported
593 certificate extensions.
594
595 =item B<ext_error>
596
597 Print an error message for unsupported certificate extensions.
598
599 =item B<ext_parse>
600
601 ASN1 parse unsupported extensions.
602
603 =item B<ext_dump>
604
605 Hex dump unsupported extensions.
606
607 =item B<ca_default>
608
609 The value used by L<openssl-ca(1)>, equivalent to B<no_issuer>, B<no_pubkey>,
610 B<no_header>, and B<no_version>.
611
612 =back
613
614 =head1 EXAMPLES
615
616 Note: in these examples the '\' means the example should be all on one
617 line.
618
619 Display the contents of a certificate:
620
621  openssl x509 -in cert.pem -noout -text
622
623 Display the "Subject Alternative Name" extension of a certificate:
624
625  openssl x509 -in cert.pem -noout -ext subjectAltName
626
627 Display more extensions of a certificate:
628
629  openssl x509 -in cert.pem -noout -ext subjectAltName,nsCertType
630
631 Display the certificate serial number:
632
633  openssl x509 -in cert.pem -noout -serial
634
635 Display the certificate subject name:
636
637  openssl x509 -in cert.pem -noout -subject
638
639 Display the certificate subject name in RFC2253 form:
640
641  openssl x509 -in cert.pem -noout -subject -nameopt RFC2253
642
643 Display the certificate subject name in oneline form on a terminal
644 supporting UTF8:
645
646  openssl x509 -in cert.pem -noout -subject -nameopt oneline,-esc_msb
647
648 Display the certificate SHA1 fingerprint:
649
650  openssl x509 -sha1 -in cert.pem -noout -fingerprint
651
652 Convert a certificate from PEM to DER format:
653
654  openssl x509 -in cert.pem -inform PEM -out cert.der -outform DER
655
656 Convert a certificate to a certificate request:
657
658  openssl x509 -x509toreq -in cert.pem -out req.pem -signkey key.pem
659
660 Convert a certificate request into a self signed certificate using
661 extensions for a CA:
662
663  openssl x509 -req -in careq.pem -extfile openssl.cnf -extensions v3_ca \
664         -signkey key.pem -out cacert.pem
665
666 Sign a certificate request using the CA certificate above and add user
667 certificate extensions:
668
669  openssl x509 -req -in req.pem -extfile openssl.cnf -extensions v3_usr \
670         -CA cacert.pem -CAkey key.pem -CAcreateserial
671
672
673 Set a certificate to be trusted for SSL client use and change set its alias to
674 "Steve's Class 1 CA"
675
676  openssl x509 -in cert.pem -addtrust clientAuth \
677         -setalias "Steve's Class 1 CA" -out trust.pem
678
679 =head1 NOTES
680
681 The conversion to UTF8 format used with the name options assumes that
682 T61Strings use the ISO8859-1 character set. This is wrong but Netscape
683 and MSIE do this as do many certificates. So although this is incorrect
684 it is more likely to display the majority of certificates correctly.
685
686 The B<-email> option searches the subject name and the subject alternative
687 name extension. Only unique email addresses will be printed out: it will
688 not print the same address more than once.
689
690 =head1 CERTIFICATE EXTENSIONS
691
692 The B<-purpose> option checks the certificate extensions and determines
693 what the certificate can be used for. The actual checks done are rather
694 complex and include various hacks and workarounds to handle broken
695 certificates and software.
696
697 The same code is used when verifying untrusted certificates in chains
698 so this section is useful if a chain is rejected by the verify code.
699
700 The basicConstraints extension CA flag is used to determine whether the
701 certificate can be used as a CA. If the CA flag is true then it is a CA,
702 if the CA flag is false then it is not a CA. B<All> CAs should have the
703 CA flag set to true.
704
705 If the basicConstraints extension is absent then the certificate is
706 considered to be a "possible CA" other extensions are checked according
707 to the intended use of the certificate. A warning is given in this case
708 because the certificate should really not be regarded as a CA: however
709 it is allowed to be a CA to work around some broken software.
710
711 If the certificate is a V1 certificate (and thus has no extensions) and
712 it is self signed it is also assumed to be a CA but a warning is again
713 given: this is to work around the problem of Verisign roots which are V1
714 self signed certificates.
715
716 If the keyUsage extension is present then additional restraints are
717 made on the uses of the certificate. A CA certificate B<must> have the
718 keyCertSign bit set if the keyUsage extension is present.
719
720 The extended key usage extension places additional restrictions on the
721 certificate uses. If this extension is present (whether critical or not)
722 the key can only be used for the purposes specified.
723
724 A complete description of each test is given below. The comments about
725 basicConstraints and keyUsage and V1 certificates above apply to B<all>
726 CA certificates.
727
728
729 =over 4
730
731 =item B<SSL Client>
732
733 The extended key usage extension must be absent or include the "web client
734 authentication" OID.  keyUsage must be absent or it must have the
735 digitalSignature bit set. Netscape certificate type must be absent or it must
736 have the SSL client bit set.
737
738 =item B<SSL Client CA>
739
740 The extended key usage extension must be absent or include the "web client
741 authentication" OID. Netscape certificate type must be absent or it must have
742 the SSL CA bit set: this is used as a work around if the basicConstraints
743 extension is absent.
744
745 =item B<SSL Server>
746
747 The extended key usage extension must be absent or include the "web server
748 authentication" and/or one of the SGC OIDs.  keyUsage must be absent or it
749 must have the digitalSignature, the keyEncipherment set or both bits set.
750 Netscape certificate type must be absent or have the SSL server bit set.
751
752 =item B<SSL Server CA>
753
754 The extended key usage extension must be absent or include the "web server
755 authentication" and/or one of the SGC OIDs.  Netscape certificate type must
756 be absent or the SSL CA bit must be set: this is used as a work around if the
757 basicConstraints extension is absent.
758
759 =item B<Netscape SSL Server>
760
761 For Netscape SSL clients to connect to an SSL server it must have the
762 keyEncipherment bit set if the keyUsage extension is present. This isn't
763 always valid because some cipher suites use the key for digital signing.
764 Otherwise it is the same as a normal SSL server.
765
766 =item B<Common S/MIME Client Tests>
767
768 The extended key usage extension must be absent or include the "email
769 protection" OID. Netscape certificate type must be absent or should have the
770 S/MIME bit set. If the S/MIME bit is not set in Netscape certificate type
771 then the SSL client bit is tolerated as an alternative but a warning is shown:
772 this is because some Verisign certificates don't set the S/MIME bit.
773
774 =item B<S/MIME Signing>
775
776 In addition to the common S/MIME client tests the digitalSignature bit or
777 the nonRepudiation bit must be set if the keyUsage extension is present.
778
779 =item B<S/MIME Encryption>
780
781 In addition to the common S/MIME tests the keyEncipherment bit must be set
782 if the keyUsage extension is present.
783
784 =item B<S/MIME CA>
785
786 The extended key usage extension must be absent or include the "email
787 protection" OID. Netscape certificate type must be absent or must have the
788 S/MIME CA bit set: this is used as a work around if the basicConstraints
789 extension is absent.
790
791 =item B<CRL Signing>
792
793 The keyUsage extension must be absent or it must have the CRL signing bit
794 set.
795
796 =item B<CRL Signing CA>
797
798 The normal CA tests apply. Except in this case the basicConstraints extension
799 must be present.
800
801 =back
802
803 =head1 BUGS
804
805 Extensions in certificates are not transferred to certificate requests and
806 vice versa.
807
808 It is possible to produce invalid certificates or requests by specifying the
809 wrong private key or using inconsistent options in some cases: these should
810 be checked.
811
812 There should be options to explicitly set such things as start and end
813 dates rather than an offset from the current time.
814
815 =head1 SEE ALSO
816
817 L<openssl(1)>,
818 L<openssl-req(1)>,
819 L<openssl-ca(1)>,
820 L<openssl-genrsa(1)>,
821 L<openssl-gendsa(1)>,
822 L<openssl-verify(1)>,
823 L<x509v3_config(5)>
824
825 =head1 HISTORY
826
827 The hash algorithm used in the B<-subject_hash> and B<-issuer_hash> options
828 before OpenSSL 1.0.0 was based on the deprecated MD5 algorithm and the encoding
829 of the distinguished name. In OpenSSL 1.0.0 and later it is based on a canonical
830 version of the DN using SHA1. This means that any directories using the old
831 form must have their links rebuilt using L<openssl-rehash(1)> or similar.
832
833 All B<-keyform> and B<-CAkeyform> values except B<ENGINE>
834 have become obsolete in OpenSSL 3.0.0 and have no effect.
835
836 The B<-CAform> option has become obsolete in OpenSSL 3.0.0 and has no effect.
837
838 =head1 COPYRIGHT
839
840 Copyright 2000-2020 The OpenSSL Project Authors. All Rights Reserved.
841
842 Licensed under the Apache License 2.0 (the "License").  You may not use
843 this file except in compliance with the License.  You can obtain a copy
844 in the file LICENSE in the source distribution or at
845 L<https://www.openssl.org/source/license.html>.
846
847 =cut