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