=pod =encoding utf8 =head1 NAME x509 - Certificate display and signing utility =head1 SYNOPSIS B B [B<-help>] [B<-inform DER|PEM|NET>] [B<-outform DER|PEM|NET>] [B<-keyform DER|PEM>] [B<-CAform DER|PEM>] [B<-CAkeyform DER|PEM>] [B<-in filename>] [B<-out filename>] [B<-serial>] [B<-hash>] [B<-subject_hash>] [B<-issuer_hash>] [B<-ocspid>] [B<-subject>] [B<-issuer>] [B<-nameopt option>] [B<-email>] [B<-ocsp_uri>] [B<-startdate>] [B<-enddate>] [B<-purpose>] [B<-dates>] [B<-checkend num>] [B<-modulus>] [B<-pubkey>] [B<-fingerprint>] [B<-alias>] [B<-noout>] [B<-trustout>] [B<-clrtrust>] [B<-clrreject>] [B<-addtrust arg>] [B<-addreject arg>] [B<-setalias arg>] [B<-days arg>] [B<-set_serial n>] [B<-signkey filename>] [B<-passin arg>] [B<-x509toreq>] [B<-req>] [B<-CA filename>] [B<-CAkey filename>] [B<-CAcreateserial>] [B<-CAserial filename>] [B<-force_pubkey key>] [B<-text>] [B<-certopt option>] [B<-C>] [B<-[digest]>] [B<-clrext>] [B<-extfile filename>] [B<-extensions section>] [B<-engine id>] =head1 DESCRIPTION The B command is a multi purpose certificate utility. It can be used to display certificate information, convert certificates to various forms, sign certificate requests like a "mini CA" or edit certificate trust settings. Since there are a large number of options they will split up into various sections. x509命令是一个多用途证书实用程序。 它可用于显示证书信息,将证书转换为各种表单,签署诸如“迷你CA”或编辑证书信任设置的证书请求。 由于有大量的选择,它们将分成不同的部分。 =head1 OPTIONS =head2 Input, Output, and General Purpose Options =over 4 =item B<-help> Print out a usage message. 打印使用信息。 =item B<-inform DER|PEM|NET> This specifies the input format normally the command will expect an X509 certificate but this can change if other options such as B<-req> are present. The DER format is the DER encoding of the certificate and PEM is the base64 encoding of the DER encoding with header and footer lines added. The NET option is an obscure Netscape server format that is now obsolete. 这通常指定命令将期望X509证书的输入格式,但如果存在其他选项(如-req),则可以更改该输入格式。 DER格式是证书的DER编码,PEM是添加了页眉和页脚行的DER编码的base64编码。 NET选项是一个晦涩的Netscape服务器格式,现在已经过时了。 =item B<-outform DER|PEM|NET> This specifies the output format, the options have the same meaning as the B<-inform> option. 这指定输出格式,这些选项与-inform选项具有相同的含义。 =item B<-in filename> This specifies the input filename to read a certificate from or standard input if this option is not specified. 如果未指定此选项,则指定从或从标准输入读取证书的输入文件名。 =item B<-out filename> This specifies the output filename to write to or standard output by default. 默认情况下,它指定要写入的输出文件名或标准输出。 =item B<-[digest]> the digest to use. This affects any signing or display option that uses a message digest, such as the B<-fingerprint>, B<-signkey> and B<-CA> options. Any digest supported by the GmSSL B command can be used. If not specified then SHA1 is used with B<-fingerprint> or the default digest for the signing algorithm is used, typically SHA256. 消化使用。 这会影响使用消息摘要的任何签名或显示选项,例如-fingerprint,-signkey和-CA选项。 可以使用GmSSL dgst命令支持的任何摘要。 如果没有指定,则SHA1与-fingerprint一起使用,或者使用签名算法的默认摘要,通常为SHA256。 =item B<-engine id> specifying an engine (by its unique B string) will cause B to attempt to obtain a functional reference to the specified engine, thus initialising it if needed. The engine will then be set as the default for all available algorithms. 指定引擎(通过其唯一的id字符串)将导致x509尝试获取对指定引擎的功能引用,从而在需要时进行初始化。 然后,引擎将被设置为所有可用算法的默认值。 =back =head2 Display Options Note: the B<-alias> and B<-purpose> options are also display options but are described in the B section. 注意:-alias和-purpose选项也是显示选项,但在“信任设置”部分中有介绍。 =over 4 =item B<-text> prints out the certificate in text form. Full details are output including the public key, signature algorithms, issuer and subject names, serial number any extensions present and any trust settings. 以文本形式打印证书。 输出全部细节,包括公钥,签名算法,发行人和主题名称,任何扩展名的序列号和任何信任设置。 =item B<-certopt option> customise the output format used with B<-text>. The B