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