diff --git a/doc/apps/pkey.pod b/doc/apps/pkey.pod index e8e7d661..fc3dd80c 100644 --- a/doc/apps/pkey.pod +++ b/doc/apps/pkey.pod @@ -30,6 +30,9 @@ B B The B command processes public or private keys. They can be converted between various forms and their components printed out. +pkey指令处理公钥或者私钥。 +它们可以在各种形式之间进行转换,并将其组件打印出来。 + =head1 OPTIONS =over 4 @@ -38,26 +41,37 @@ between various forms and their components printed out. Print out a usage message. +打印使用信息。 + =item B<-inform DER|PEM> This specifies the input format DER or PEM. +该选项指出了输入格式是DER还是PEM。 + =item B<-outform DER|PEM> 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 key from or standard input if this option is not specified. If the key is encrypted a pass phrase will be prompted for. +如果该选项没有被指定,则指定从密钥中读取输入文件名或者标准输入。 +如果密钥被加密,将提示输入密码。 + =item B<-passin arg> the input file password source. For more information about the format of B see the B section in L. +输入文件的密码来源。有关arg格式的更多信息,请参阅gmssl(1)中的PASS PHRASE ARGUMENTS部分。 + =item B<-out filename> This specifies the output filename to write a key to or standard output if this @@ -65,46 +79,67 @@ option is not specified. If any encryption options are set then a pass phrase will be prompted for. The output filename should B be the same as the input filename. +如果未指定此选项,则指定将密钥写入或输出的输出文件名。 如果设置了任何加密选项, +则会提示输入密码。 输出文件名不能与输入文件名相同。 + =item B<-passout password> the output file password source. For more information about the format of B see the B section in L. +输出文件的密码来源。有关arg格式的更多信息请参阅gmssl(1)中的PASS PHARSE ARGUMENTS部分。 + =item B<-traditional> normally a private key is written using standard format: this is PKCS#8 form with the appropriate encryption algorithm (if any). If the B<-traditional> option is specified then the older "traditional" format is used instead. +通常使用标准格式写入私钥:这是具有适当加密算法(如果有的话)的PKCS#8表单。 + 如果指定了-traditional选项,则使用较旧的“traditional”格式。 + =item B<-cipher> These options encrypt the private key with the supplied cipher. Any algorithm name accepted by EVP_get_cipherbyname() is acceptable such as B. +这些选项使用提供的密码加密私钥。 EVP_get_cipherbyname()接受的任何算法名称都可以接受,如des3。 + =item B<-text> prints out the various public or private key components in plain text in addition to the encoded version. +除了编码版本之外,以纯文本形式打印各种公共或私人密钥组件。 + =item B<-text_pub> print out only public key components even if a private key is being processed. +即使正在处理私钥,也打印公钥组件。 + =item B<-noout> do not output the encoded version of the key. +不打印出密钥的编码版本信息。 + =item B<-pubin> by default a private key is read from the input file: with this option a public key is read instead. +默认从输入文件读取一个私钥:使用该选项后则变为读取一个公钥。 + =item B<-pubout> by default a private key is output: with this option a public key will be output instead. This option is automatically set if the input is a public key. + +默认是输出一个私钥:使用该选项后则变为输出一个公钥。如果输入是公钥则该选项会自动设置。 + =item B<-engine id> specifying an engine (by its unique B string) will cause B @@ -112,6 +147,9 @@ 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字符串)将导致pkey尝试获取对指定引擎的功能引用 +,从而如果需要的话初始化它。 然后,引擎将被设置为所有可用算法的默认值。 + =back =head1 EXAMPLES diff --git a/doc/apps/rand.pod b/doc/apps/rand.pod index f1c18643..1fcc6c73 100644 --- a/doc/apps/rand.pod +++ b/doc/apps/rand.pod @@ -25,6 +25,10 @@ in addition to the files given in the B<-rand> option. A new I<$HOME>/B<.rnd> or B<.rnd> file will be written back if enough seeding was obtained from these sources. +rand命令在播放随机数生成器一次后输出num伪随机字节。 与其他gmssl命令行工具一样, +除了-rand选项中提供的文件外,PRNG种子使用文件$ HOME / .rnd或.rnd。 + 如果从这些来源获得足够的播种,将会写入新的$ HOME / .rnd或.rnd文件。 + =head1 OPTIONS =over 4 @@ -33,10 +37,14 @@ seeding was obtained from these sources. Print out a usage message. +输出使用信息 + =item B<-out> I Write to I instead of standard output. +写入file而不是标准输出。 + =item B<-rand> I Use specified file or files or EGD socket (see L) @@ -45,14 +53,22 @@ Multiple files can be specified separated by an OS-dependent character. The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for all others. +使用指定的文件或EGD套接字(请参阅RAND_egd(3))播放随机数生成器。 + 多个文件可以由与操作系统相关的字符分隔。 分离器是 对于MS-Windows,对于OpenVMS +,以及:对于所有其他。 + =item B<-base64> Perform base64 encoding on the output. +在输出上执行base64编码。 + =item B<-hex> Show the output as a hex string. +将输出显示为十六进制字符串。 + =back =head1 SEE ALSO diff --git a/doc/apps/s_client.pod b/doc/apps/s_client.pod index bb94f938..baa815db 100644 --- a/doc/apps/s_client.pod +++ b/doc/apps/s_client.pod @@ -113,6 +113,8 @@ The B command implements a generic SSL/TLS client which connects to a remote host using SSL/TLS. It is a I useful diagnostic tool for SSL servers. +s_client命令实现使用SSL / TLS连接到远程主机的通用SSL / TLS客户端。 它是SSL服务器非常有用的诊断工具。 + =head1 OPTIONS In addition to the options below the B utility also supports the @@ -120,62 +122,88 @@ common and client only options documented in the in the "Supported Command Line Commands" section of the L manual page. +除了以下选项之外,s_client实用程序还支持SSL_CONF_cmd(3)手册页的“支持的命令行命令”部分中记录的通用和客户端选项。 + =over 4 =item B<-help> Print out a usage message. +输出使用信息。 + =item B<-connect host:port> This specifies the host and optional port to connect to. If not specified then an attempt is made to connect to the local host on port 4433. +这指定要连接的主机和可选端口。 如果未指定,则尝试连接到端口4433上的本地主机。 + =item B<-proxy host:port> When used with the B<-connect> flag, the program uses the host and port specified with this flag and issues an HTTP CONNECT command to connect to the desired server. +当与-connect标志一起使用时,程序使用由该标志指定的主机和端口,并发出HTTP CONNECT命令连接到所需的服务器。 + =item B<-unix path> Connect over the specified Unix-domain socket. +连接指定的Unix域套接字。 + =item B<-4> Use IPv4 only. +仅使用IPv4。 + =item B<-6> Use IPv6 only. +仅使用IPv6. + =item B<-servername name> Set the TLS SNI (Server Name Indication) extension in the ClientHello message. +在ClientHello消息中设置TLS SNI(服务器名称指示)扩展。 + =item B<-cert certname> The certificate to use, if one is requested by the server. The default is not to use a certificate. +要使用的证书,如果是服务器请求的。 默认情况下不使用证书。 + =item B<-certform format> The certificate format to use: DER or PEM. PEM is the default. +使用的证书格式:DER或PEM。 PEM是默认值。 + =item B<-key keyfile> The private key to use. If not specified then the certificate file will be used. +使用私钥。 如果未指定,则将使用证书文件。 + =item B<-keyform format> The private format to use: DER or PEM. PEM is the default. +要使用的私有格式:DER或PEM。 PEM是默认值。 + =item B<-pass arg> the private key password source. For more information about the format of B see the B section in L. +私钥密码源。 有关arg格式的更多信息,请参阅gmssl(1)中的PASS PHRASE ARGUMENTS部分。 + =item B<-verify depth> The verify depth to use. This specifies the maximum length of the @@ -184,30 +212,44 @@ Currently the verify operation continues after errors so all the problems with a certificate chain can be seen. As a side effect the connection will never fail due to a server certificate verify failure. +验证使用深度。 这指定服务器证书链的最大长度,并打开服务器证书验证。 +目前,验证操作在错误之后继续,所以可以看到证书链中的所有问题。 +作为副作用,由于服务器证书验证失败,连接永远不会失败。 + =item B<-verify_return_error> Return verification errors instead of continuing. This will typically abort the handshake with a fatal error. +返回验证错误,而不是继续。 这通常会以致命错误中止握手。 + =item B<-CApath directory> The directory to use for server certificate verification. This directory must be in "hash format", see B for more information. These are also used when building the client certificate chain. +用于服务器证书验证的目录。 此目录必须为“哈希格式”,请参阅验证更多信息。 这些也在构建客户端证书链时使用。 + =item B<-CAfile file> A file containing trusted certificates to use during server authentication and to use when attempting to build the client certificate chain. +包含在服务器认证期间使用并在尝试构建客户端证书链时使用的可信证书的文件。 + =item B<-no-CAfile> Do not load the trusted CA certificates from the default file location +不要从默认文件位置加载受信任的CA证书 + =item B<-no-CApath> Do not load the trusted CA certificates from the default directory location +不要从默认目录位置加载受信任的CA证书 + =item B<-dane_tlsa_domain domain> Enable RFC6698/RFC7671 DANE TLSA authentication and specify the @@ -224,6 +266,13 @@ certificate of the chain, the result is reported as "TA public key verified". Otherwise, either the TLSA record "matched TA certificate" at a positive depth or else "matched EE certificate" at depth 0. +启用RFC6698 / RFC7671 DANE TLSA身份验证,并指定成为默认SNI提示的TLSA基本域和主机名检查的主参考标识符。 +这必须与以下-dane_tlsa_rrdata选项的至少一个实例结合使用。 + +当DANE认证成功时,诊断输出将包括TLSA记录认证链式证书的最低(最接近0)深度。 +当该TLSA记录是一个“2 1 0”信任锚公钥,该信任锚公钥是签名(而不是匹配)链中最顶层的证书, +结果被报告为“TA公钥验证”。 否则,TLSA记录“匹配的TA证书”在深度为深度,否则“匹配的EE证书”在深度0。 + =item B<-dane_tlsa_rrdata rrdata> Use one or more times to specify the RRDATA fields of the DANE TLSA @@ -233,6 +282,10 @@ fields that specify the usage, selector, matching type and associated data, with the last of these encoded in hexadecimal. Optional whitespace is ignored in the associated data field. For example: +使用一次或多次来指定与目标服务相关联的DANE TLSA RRset的RRDATA字段。 +rrdata值以“表示形式”指定,即指定使用,选择器,匹配类型和关联数据的 +四个空白分隔字段,其中最后一个以十六进制编码。 可选的空格在关联的数据字段中被忽略。 例如: + $ gmssl s_client -brief -starttls smtp \ -connect smtp.example.com:25 \ -dane_tlsa_domain smtp.example.com \ @@ -264,6 +317,14 @@ records already make it possible for a remote domain to redirect client connections to any server of its choice, and in any case SMTP and XMPP clients do not execute scripts downloaded from remote servers. +当通过DANE-EE(3)TLSA记录进行身份验证时,这将禁用服务器名称检查。 +对于某些应用程序(主要是Web浏览器),由于“未知密钥共享”攻击,禁用名称检查是 +不安全的,恶意服务器可以说服客户端与受害者服务器的连接而不是与恶意服务器的安全 +连接。 恶意服务器可能能够违反跨原始脚本限制。 因此,尽管RFC7671的文本,默认情 +况下,对DANE-EE(3)TLSA记录启用名称检查,并且可以在安全的应用程序中禁用名称检查。 + 特别是,SMTP和XMPP客户端应该将此选项设置为SRV和MX记录,使远程域可以将客户端连接 +重定向到所选的任何服务器,无论如何,SMTP和XMPP客户端不会执行从远程服务器下载的脚本服务器。 + =item B<-attime>, B<-check_ss_sig>, B<-crl_check>, B<-crl_check_all>, B<-explicit_policy>, B<-extended_crl>, B<-ignore_critical>, B<-inhibit_any>, B<-inhibit_map>, B<-no_alt_chains>, B<-no_check_time>, B<-partial_chain>, B<-policy>, @@ -280,11 +341,15 @@ L manual page for details. reconnects to the same server 5 times using the same session ID, this can be used as a test that session caching is working. +使用相同的会话ID重新连接到相同的服务器5次,这可以用作会话缓存正在工作的测试。 + =item B<-showcerts> display the whole server certificate chain: normally only the server certificate itself is displayed. +显示整个服务器证书链:通常只显示服务器证书本身。 + =item B<-prexit> print session information when the program exits. This will always attempt @@ -296,65 +361,96 @@ attempt is made to access a certain URL. Note: the output produced by this option is not always accurate because a connection might never have been established. +当程序退出时打印会话信息。 即使连接失败,它也将始终尝试打印出信息。 通常, +如果连接成功,信息将仅打印一次。 此选项非常有用,因为正在使用的密码可能被 +重新协商,或连接可能会失败,因为客户端证书是必需的,或仅在尝试访问某个URL +后才被请求。 注意:此选项生成的输出并不总是准确的,因为连接可能永远不会建立。 + =item B<-state> prints out the SSL session states. +打印出SSL会话状态。 + =item B<-debug> print extensive debugging information including a hex dump of all traffic. +打印广泛的调试信息,包括所有流量的十六进制转储。 + =item B<-msg> show all protocol messages with hex dump. +显示所有具有十六进制转储的协议消息。 + =item B<-trace> show verbose trace output of protocol messages. GmSSL needs to be compiled with B for this option to work. +显示协议消息的详细跟踪输出。 需要使用enable-ssl-trace编译GmSSL才能使此选项生效。 + =item B<-msgfile> file to send output of B<-msg> or B<-trace> to, default standard output. +文件将-msg或-trace的输出发送到,默认标准输出。 + =item B<-nbio_test> tests non-blocking I/O +测试非阻塞I / O + =item B<-nbio> turns on non-blocking I/O +打开非阻塞I / O + =item B<-crlf> this option translated a line feed from the terminal into CR+LF as required by some servers. +该选项根据某些服务器的要求将终端转换为CR + LF。 + =item B<-ign_eof> inhibit shutting down the connection when end of file is reached in the input. +禁止在输入端到达文件结束时关闭连接。 + =item B<-quiet> inhibit printing of session and certificate information. This implicitly turns on B<-ign_eof> as well. +禁止打印会话和证书信息。 这也隐含地打开-ign_eof。 + =item B<-no_ign_eof> shut down the connection when end of file is reached in the input. Can be used to override the implicit B<-ign_eof> after B<-quiet>. +在输入端到达文件结束时关闭连接。 可以用于在-quiet之后覆盖隐式的-ign_eof。 + =item B<-psk_identity identity> Use the PSK identity B when using a PSK cipher suite. +使用PSK密码套件时使用PSK身份标识。 + =item B<-psk key> Use the PSK key B when using a PSK cipher suite. The key is given as a hexadecimal number without leading 0x, for example -psk 1a2b3c4d. +使用PSK密码套件时,请使用PSK密钥。 密钥以十六进制数字的形式给出,不带前缀0x,例如-psk 1a2b3c4d。 + =item B<-ssl3>, B<-tls1>, B<-tls1_1>, B<-tls1_2>, B<-tls1_3>, B<-no_ssl3>, B<-no_tls1>, B<-no_tls1_1>, B<-no_tls1_2>, B<-no_tls1_3> These options require or disable the use of the specified SSL or TLS protocols. @@ -363,6 +459,9 @@ version. When a specific TLS version is required, only that version will be offered to and accepted from the server. +这些选项需要或禁止使用指定的SSL或TLS协议。 默认情况下,s_client将协商最高相互 +支持的协议版本。 当需要特定的TLS版本时,只有该版本将被提供给服务器并从服务器接受。 + =item B<-dtls>, B<-dtls1>, B<-dtls1_2> These options make B use DTLS protocols instead of TLS. @@ -370,10 +469,15 @@ With B<-dtls>, B will negotiate any supported DTLS protocol version, whilst B<-dtls1> and B<-dtls1_2> will only support DTLS1.0 and DTLS1.2 respectively. +这些选项使s_client使用DTLS协议而不是TLS。 使用-dtls,s_client将协商任何支持的 +DTLS协议版本,而-dtls1和-dtls1_2将分别仅支持DTLS1.0和DTLS1.2。 + =item B<-fallback_scsv> Send TLS_FALLBACK_SCSV in the ClientHello. +在ClientHello中发送TLS_FALLBACK_SCSV。 + =item B<-async> switch on asynchronous mode. Cryptographic operations will be performed @@ -381,6 +485,9 @@ asynchronously. This will only have an effect if an asynchronous capable engine is also used via the B<-engine> option. For test purposes the dummy async engine (dasync) can be used (if available). +开启异步模式。 加密操作将被异步执行。 只有通过-engine选项也可以使用异步的引擎, +这只会产生影响。 为了测试目的,可以使用虚拟异步引擎(dasync)(如果可用)。 + =item B<-split_send_frag int> The size used to split data for encrypt pipelines. If more data is written in @@ -390,6 +497,11 @@ a suitable ciphersuite has been negotiated, an engine that supports pipelining has been loaded, and max_pipelines is greater than 1. See L for further information. +用于分割加密管道数据的大小。 如果一次写入的数据多于此值,那么它将被分割成多个管道, +直到max_pipelines定义的最大管道数。 如果已经协商了合适的密码套件,则支持流水线的 +引擎已被加载,并且max_pipelines大于1.请参阅SSL_CTX_set_split_send_fragment(3) +以获取更多信息。 + =item B<-max_pipelines int> The maximum number of encrypt/decrypt pipelines to be used. This will only have @@ -397,6 +509,10 @@ an effect if an engine has been loaded that supports pipelining (e.g. the dasync engine) and a suitable ciphersuite has been negotiated. The default value is 1. See L for further information. +要使用的加密/解密管道的最大数量。 如果已经加载支持流水线的引擎(例如,dasync引擎) +并且已经协商了合适的密码套件,则这将仅起作用。 默认值为1.有关更多信息,请参阅 +SSL_CTX_set_max_pipelines(3)。 + =item B<-read_buf int> The default read buffer size to be used for connections. This will only have an @@ -404,11 +520,16 @@ effect if the buffer size is larger than the size that would otherwise be used and pipelining is in use (see L for further information). +用于连接的默认读缓冲区大小。 如果缓冲区大小大于使用的流水线大小(如果需要进一步的信息, +请参阅SSL_CTX_set_default_read_buffer_len(3)),这只会产生影响。 + =item B<-bugs> there are several known bug in SSL and TLS implementations. Adding this option enables various workarounds. +SSL和TLS实现中有几个已知的错误。 添加此选项可以启用各种解决方法。 + =item B<-comp> Enables support for SSL/TLS compression. @@ -416,17 +537,24 @@ This option was introduced in GmSSL 1.1.0. TLS compression is not recommended and is off by default as of GmSSL 1.1.0. +支持SSL / TLS压缩。 此选项在GmSSL 1.1.0中引入。 不推荐使用TLS压缩, +默认情况下,GmSSL 1.1.0关闭。 + =item B<-no_comp> Disables support for SSL/TLS compression. TLS compression is not recommended and is off by default as of GmSSL 1.1.0. +禁用对SSL / TLS压缩的支持。 不推荐使用TLS压缩,默认情况下,GmSSL 1.1.0关闭。 + =item B<-brief> only provide a brief summary of connection parameters instead of the normal verbose output. +只提供连接参数的简要摘要,而不是正常的详细输出。 + =item B<-cipher cipherlist> this allows the cipher list sent by the client to be modified. Although @@ -434,6 +562,9 @@ the server determines which cipher suite is used it should take the first supported cipher in the list sent by the client. See the B command for more information. +这允许客户端发送的密码列表被修改。 虽然服务器确定使用哪个密码套件, +但它应该在客户端发送的列表中使用第一个支持的密码。 有关详细信息,请参阅ciphers命令。 + =item B<-starttls protocol> send the protocol-specific message(s) to switch to TLS for communication. @@ -441,6 +572,9 @@ B is a keyword for the intended protocol. Currently, the only supported keywords are "smtp", "pop3", "imap", "ftp", "xmpp", "xmpp-server", and "irc." +发送特定于协议的消息切换到TLS进行通信。 协议是目标协议的关键字。 目前, +唯一支持的关键字是“smtp”,“pop3”,“imap”,“ftp”,“xmpp”,“xmpp-server”和“irc”。 + =item B<-xmpphost hostname> This option, when used with "-starttls xmpp" or "-starttls xmpp-server", @@ -448,23 +582,34 @@ specifies the host for the "to" attribute of the stream element. If this option is not specified, then the host specified with "-connect" will be used. +此选项与“-starttls xmpp”或“-starttls xmpp-server”一起使用时,指定流元素 +“to”属性的主机。 如果未指定此选项,则将使用“-connect”指定的主机。 + =item B<-tlsextdebug> print out a hex dump of any TLS extensions received from the server. +打印从服务器接收的任何TLS扩展的十六进制转储。 + =item B<-no_ticket> disable RFC4507bis session ticket support. +禁用RFC4507bis会话票证支持。 + =item B<-sess_out filename> output SSL session to B +输出SSL会话到filename + =item B<-sess_in sess.pem> load SSL session from B. The client will attempt to resume a connection from this session. +从filename加载SSL会话。 客户端将尝试从此会话恢复连接。 + =item B<-engine id> specifying an engine (by its unique B string) will cause B @@ -472,6 +617,8 @@ 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字符串)将导致s_client尝试获取对指定引擎的功能引用,从而在需要时对其进行初始化。 然后,引擎将被设置为所有可用算法的默认值。 + =item B<-rand file(s)> a file or files containing random data used to seed the random number @@ -480,6 +627,8 @@ Multiple files can be specified separated by an OS-dependent character. The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for all others. +包含用于种子随机数生成器或EGD套接字的随机数据的文件或文件(参见RAND_egd(3))。 多个文件可以由与操作系统相关的字符分隔。 分离器是 对于MS-Windows,对于OpenVMS,以及:对于所有其他。 + =item B<-serverinfo types> a list of comma-separated TLS Extension Types (numbers between 0 and @@ -487,11 +636,15 @@ a list of comma-separated TLS Extension Types (numbers between 0 and The server's response (if any) will be encoded and displayed as a PEM file. +逗号分隔的TLS扩展类型列表(0到65535之间的数字)。 每个类型将作为一个空的ClientHello TLS扩展发送。 服务器的响应(如果有)将被编码并显示为PEM文件。 + =item B<-status> sends a certificate status request to the server (OCSP stapling). The server response (if any) is printed out. +向服务器发送证书状态请求(OCSP装订)。 打印出服务器响应(如果有)。 + =item B<-alpn protocols>, B<-nextprotoneg protocols> these flags enable the @@ -507,6 +660,8 @@ Empty list of protocols is treated specially and will cause the client to advertise support for the TLS extension but disconnect just after receiving ServerHello with a list of server supported protocols. +这些标志分别启用启用应用层协议协商协议或下一协议协议扩展。 ALPN是IETF标准,替代NPN。 协议列表是客户端应该广告支持的逗号分隔的协议名称。 该列表应该包含最需要的协议。 协议名称是可打印的ASCII字符串,例如“http / 1.1”或“spdy / 3”。 协议的空列表被特别处理,并且将导致客户端向TLS扩展发布支持,但是在使用服务器支持的协议列表接收ServerHello之后断开连接。 + =item B<-ct|noct> Use one of these two options to control whether Certificate Transparency (CT) @@ -517,11 +672,17 @@ the server and reported at handshake completion. Enabling CT also enables OCSP stapling, as this is one possible delivery method for SCTs. +使用这两个选项之一来控制是否启用证书透明度(CT)或禁用(-noct)。 如果启用CT,将从服务器请求签名的证书时间戳(SCT),并在握手完成时报告。 + +启用CT还可以实现OCSP装订,因为这是SCT的一种可能的传送方式。 + =item B<-ctlogfile> A file containing a list of known Certificate Transparency logs. See L for the expected file format. +包含已知证书透明度日志列表的文件。 有关预期的文件格式,请参阅SSL_CTX_set_ctlog_list_file(3)。 + =back =head1 CONNECTED COMMANDS diff --git a/doc/apps/s_server.pod b/doc/apps/s_server.pod index b440c09e..46aedd07 100644 --- a/doc/apps/s_server.pod +++ b/doc/apps/s_server.pod @@ -119,6 +119,8 @@ B B The B command implements a generic SSL/TLS server which listens for connections on a given port using SSL/TLS. +s_server命令实现一个通用SSL / TLS服务器,它使用SSL / TLS监听给定端口上的连接。 + =head1 OPTIONS In addition to the options below the B utility also supports the @@ -126,45 +128,66 @@ common and server only options documented in the in the "Supported Command Line Commands" section of the L manual page. +除了以下选项之外,s_server实用程序还支持SSL_CONF_cmd(3)手册页的“支持的 +命令行命令”部分中记录的通用和仅服务器选项。 + =over 4 =item B<-help> Print out a usage message. +打印使用信息。 + =item B<-port port> The TCP port to listen on for connections. If not specified 4433 is used. +TCP端口监听连接。 如果未指定4433。 + =item B<-accept val> The optional TCP host and port to listen on for connections. If not specified, *:4433 is used. +可选的TCP主机和端口监听连接。 如果未指定,则使用*:4433。 + =item B<-naccept count> The server will exit after receiving B connections, default unlimited. +收到number后,服务器将退出,默认为无限制。 + =item B<-unix val> Unix domain socket to accept on. +Unix域套接字接受。 + =item B<-unlink> For -unix, unlink existing socket first. +对于-unix,首先取消链接现有套接字。 + =item B<-4> Use IPv4 only. +只用IPv4 + =item B<-6> Use IPv6 only. +只用IPv6 + =item B<-context id> Sets the SSL context id. It can be given any string value. If this option is not present a default value will be used. +设置SSL上下文id。 可以给出任何字符串值。 如果此选项不存在,将使用默认值。 + =item B<-cert certname> The certificate to use, most servers cipher suites require the use of a @@ -172,24 +195,34 @@ certificate and some require a certificate with a certain public key type: for example the DSS cipher suites require a certificate containing a DSS (DSA) key. If not specified then the filename "server.pem" will be used. +要使用的证书,大多数服务器密码套件需要使用证书,有些需要具有某种公钥类型的证书:例如,DSS密码套件需要包含DSS(DSA)密钥的证书。 如果未指定,则将使用文件名“server.pem”。 + =item B<-certform format> The certificate format to use: DER or PEM. PEM is the default. +使用的证书格式:DER或PEM。 PEM是默认值。 + =item B<-key keyfile> The private key to use. If not specified then the certificate file will be used. +使用私钥。 如果未指定,则将使用证书文件。 + =item B<-keyform format> The private format to use: DER or PEM. PEM is the default. +要使用的私有格式:DER或PEM。 PEM是默认值。 + =item B<-pass arg> The private key password source. For more information about the format of B see the B section in L. +私钥密码源。 有关arg格式的更多信息,请参阅gmssl(1)中的PASS PHRASE ARGUMENTS部分。 + =item B<-dcert filename>, B<-dkey keyname> Specify an additional certificate and private key, these behave in the @@ -201,16 +234,22 @@ and some a DSS (DSA) key. By using RSA and DSS certificates and keys a server can support clients which only support RSA or DSS cipher suites by using an appropriate certificate. +指定一个额外的证书和私钥,它们的行为方式与-cert和-key选项相同,除非没有指定默认值(不使用其他证书和密钥)。 如上所述,一些密码套件需要包含特定类型的密钥的证书。 一些密码套件需要携带RSA密钥的证书和一些DSS密钥。 通过使用RSA和DSS证书和密钥,服务器可以通过使用适当的证书来支持只支持RSA或DSS密码套件的客户端。 + =item B<-dcertform format>, B<-dkeyform format>, B<-dpass arg> Additional certificate and private key format and passphrase respectively. +分别附加证书和私钥格式和密码。 + =item B<-nocert> If this option is set then no certificate is used. This restricts the cipher suites available to the anonymous ones (currently just anonymous DH). +如果设置了此选项,则不会使用任何证书。 这限制了匿名的密码套件(目前只是匿名的DH)。 + =item B<-dhparam filename> The DH parameter file to use. The ephemeral DH cipher suites generate keys @@ -219,23 +258,31 @@ load the parameters from the server certificate file. If this fails then a static set of parameters hard coded into the B program will be used. +要使用的DH参数文件。 短时DH密码套件使用一组DH参数生成密钥。 如果未指定,则尝试从服务器证书文件加载参数。 如果失败,则将使用硬编码到s_server程序中的一组静态参数。 + =item B<-no_dhe> If this option is set then no DH parameters will be loaded effectively disabling the ephemeral DH cipher suites. +如果设置了此选项,则不会有效地加载DH参数,禁用临时DH密码套件。 + =item B<-crl_check>, B<-crl_check_all> Check the peer certificate has not been revoked by its CA. The CRL(s) are appended to the certificate file. With the B<-crl_check_all> option all CRLs of all CAs in the chain are checked. +检查对等证书尚未被其CA撤销。 证书文件附加CRL。 使用-crl_check_all选项,将检查链中所有CA的所有CRL。 + =item B<-CApath directory> The directory to use for client certificate verification. This directory must be in "hash format", see B for more information. These are also used when building the server certificate chain. +用于客户端证书验证的目录。 此目录必须为“哈希格式”,请参阅验证更多信息。 这些也在构建服务器证书链时使用 + =item B<-CAfile file> A file containing trusted certificates to use during client authentication @@ -243,14 +290,20 @@ and to use when attempting to build the server certificate chain. The list is also used in the list of acceptable client CAs passed to the client when a certificate is requested. +包含在客户端身份验证期间使用并在尝试构建服务器证书链时使用的可信证书的文件。 该列表也用于在请求证书时传递给客户端的可接受的客户端CA列表。 + =item B<-no-CAfile> Do not load the trusted CA certificates from the default file location +不要从默认文件位置加载受信任的CA证书 + =item B<-no-CApath> Do not load the trusted CA certificates from the default directory location +不要从默认目录位置加载受信任的CA证书 + =item B<-verify depth>, B<-Verify depth> The verify depth to use. This specifies the maximum length of the @@ -262,6 +315,10 @@ must supply a certificate or an error occurs. If the ciphersuite cannot request a client certificate (for example an anonymous ciphersuite or PSK) this option has no effect. +验证使用深度。 这指定客户端证书链的最大长度,并使服务器从客户端请求证书。 使用-verify选项,请求证书,但客户端不必发送一个,使用-Verify选项,客户端必须提供证书或发生错误。 + +如果密码不能请求客户端证书(例如匿名密码套件或PSK),则此选项不起作用。 + =item B<-attime>, B<-check_ss_sig>, B<-crl_check>, B<-crl_check_all>, B<-explicit_policy>, B<-extended_crl>, B<-ignore_critical>, B<-inhibit_any>, B<-inhibit_map>, B<-no_alt_chains>, B<-no_check_time>, B<-partial_chain>, B<-policy>, @@ -273,59 +330,85 @@ B<-verify_ip>, B<-verify_name>, B<-x509_strict> Set different peer certificate verification options. See the L manual page for details. +设置不同的对等证书验证选项。 有关详细信息,请参阅verify(1)手册页。 + =item B<-verify_return_error> Verification errors normally just print a message but allow the connection to continue, for debugging purposes. If this option is used, then verification errors close the connection. +验证错误通常只是打印一条消息,但允许连接继续进行调试。 如果使用此选项,则验证错误会关闭连接。 + =item B<-state> Prints the SSL session states. +打印SSL会话状态。 + =item B<-debug> Print extensive debugging information including a hex dump of all traffic. +打印广泛的调试信息,包括所有流量的十六进制转储。 + =item B<-msg> Show all protocol messages with hex dump. +使用十六进制转储显示所有协议消息。 + =item B<-trace> Show verbose trace output of protocol messages. GmSSL needs to be compiled with B for this option to work. +显示协议消息的详细跟踪输出。 需要使用enable-ssl-trace编译GmSSL才能使此选项生效。 + =item B<-msgfile> File to send output of B<-msg> or B<-trace> to, default standard output. +文件将-msg或-trace的输出发送到,默认标准输出。 + =item B<-nbio_test> Tests non blocking I/O +测试非阻塞I / O + =item B<-nbio> Turns on non blocking I/O +打开非阻塞I / O + =item B<-crlf> This option translated a line feed from the terminal into CR+LF. +此选项将换行符从终端转换为CR + LF。 + =item B<-quiet> Inhibit printing of session and certificate information. +禁止打印会话和证书信息。 + =item B<-psk_hint hint> Use the PSK identity hint B when using a PSK cipher suite. +使用PSK密码套件时,请使用PSK身份提示提示。 + =item B<-psk key> Use the PSK key B when using a PSK cipher suite. The key is given as a hexadecimal number without leading 0x, for example -psk 1a2b3c4d. +使用PSK密码套件时,请使用PSK密钥。 密钥以十六进制数字的形式给出,不带前缀0x,例如-psk 1a2b3c4d。 + =item B<-ssl2>, B<-ssl3>, B<-tls1>, B<-tls1_1>, B<-tls1_2>, B<-tls1_3>, B<-no_ssl2>, B<-no_ssl3>, B<-no_tls1>, B<-no_tls1_1>, B<-no_tls1_2>, B<-no_tls1_3> These options require or disable the use of the specified SSL or TLS protocols. @@ -334,6 +417,8 @@ version. When a specific TLS version is required, only that version will be accepted from the client. +这些选项需要或禁止使用指定的SSL或TLS协议。 默认情况下,s_server将协商最高相互支持的协议版本。 当需要特定的TLS版本时,只有客户端才接受该版本。 + =item B<-dtls>, B<-dtls1>, B<-dtls1_2> These options make B use DTLS protocols instead of TLS. @@ -341,6 +426,8 @@ With B<-dtls>, B will negotiate any supported DTLS protocol version, whilst B<-dtls1> and B<-dtls1_2> will only support DTLSv1.0 and DTLSv1.2 respectively. +这些选项使s_server使用DTLS协议而不是TLS。 使用-dtls,s_server将协商任何支持的DTLS协议版本,而-dtls1和-dtls1_2将分别仅支持DTLSv1.0和DTLSv1.2。 + =item B<-listen> This option can only be used in conjunction with one of the DTLS options above. @@ -351,6 +438,8 @@ Any without a cookie will be responded to with a HelloVerifyRequest. If a ClientHello with a cookie is received then B will connect to that peer and complete the handshake. +此选项只能与上述DTLS选项结合使用。 使用此选项,s_server将在UDP端口上侦听传入连接。 任何到达的ClientHellos将被检查,看看他们是否有cookie。 任何没有cookie的人都会通过一个HelloVerifyRequest进行回复。 如果接收到具有cookie的ClientHello,则s_server将连接到该对等体并完成握手。 + =item B<-async> Switch on asynchronous mode. Cryptographic operations will be performed @@ -358,6 +447,8 @@ asynchronously. This will only have an effect if an asynchronous capable engine is also used via the B<-engine> option. For test purposes the dummy async engine (dasync) can be used (if available). +打开异步模式。 加密操作将被异步执行。 只有通过-engine选项也可以使用异步的引擎,这只会产生影响。 为了测试目的,可以使用虚拟异步引擎(dasync)(如果可用)。 + =item B<-split_send_frag int> The size used to split data for encrypt pipelines. If more data is written in @@ -367,6 +458,8 @@ a suitable ciphersuite has been negotiated, an engine that supports pipelining has been loaded, and max_pipelines is greater than 1. See L for further information. +用于分割加密管道数据的大小。 如果一次写入的数据多于此值,那么它将被分割成多个管道,直到max_pipelines定义的最大管道数。 如果已经协商了合适的密码套件,则支持流水线的引擎已被加载,并且max_pipelines大于1.请参阅SSL_CTX_set_split_send_fragment(3)以获取更多信息。 + =item B<-max_pipelines int> The maximum number of encrypt/decrypt pipelines to be used. This will only have @@ -374,6 +467,8 @@ an effect if an engine has been loaded that supports pipelining (e.g. the dasync engine) and a suitable ciphersuite has been negotiated. The default value is 1. See L for further information. +要使用的加密/解密管道的最大数量。 如果已经加载支持流水线的引擎(例如,dasync引擎)并且已经协商了合适的密码套件,则这将仅起作用。 默认值为1.有关更多信息,请参阅SSL_CTX_set_max_pipelines(3)。 + =item B<-read_buf int> The default read buffer size to be used for connections. This will only have an @@ -381,11 +476,15 @@ effect if the buffer size is larger than the size that would otherwise be used and pipelining is in use (see L for further information). +用于连接的默认读缓冲区大小。 如果缓冲区大小大于使用的流水线大小(如果需要进一步的信息,请参阅SSL_CTX_set_default_read_buffer_len(3)),这只会产生影响。 + =item B<-bugs> There are several known bug in SSL and TLS implementations. Adding this option enables various workarounds. +SSL和TLS实现中有几个已知的错误。 添加此选项可以启用各种解决方法。 + =item B<-comp> Enable negotiation of TLS compression. @@ -393,17 +492,23 @@ This option was introduced in GmSSL 1.1.0. TLS compression is not recommended and is off by default as of GmSSL 1.1.0. +启用TLS压缩协商。 此选项在GmSSL 1.1.0中引入。 不推荐使用TLS压缩,默认情况下,GmSSL 1.1.0关闭。 + =item B<-no_comp> Disable negotiation of TLS compression. TLS compression is not recommended and is off by default as of GmSSL 1.1.0. +禁用TLS压缩协商。 不推荐使用TLS压缩,默认情况下,GmSSL 1.1.0关闭。 + =item B<-brief> Provide a brief summary of connection parameters instead of the normal verbose output. +提供连接参数的简要摘要,而不是正常的详细输出。 + =item B<-cipher cipherlist> This allows the cipher list used by the server to be modified. When @@ -412,18 +517,26 @@ also included in the server list is used. Because the client specifies the preference order, the order of the server cipherlist irrelevant. See the B command for more information. +这样可以修改服务器使用的密码列表。 当客户端发送支持的密码列表时,也使用包含在服务器列表中的第一个客户端密码。 因为客户端指定了优先级顺序,所以服务器密码列表的顺序不相关。 有关详细信息,请参阅ciphers命令。 + =item B<-serverpref> Use the server's cipher preferences, rather than the client's preferences. +使用服务器的密码首选项,而不是客户端的首选项。 + =item B<-tlsextdebug> Print a hex dump of any TLS extensions received from the server. +打印从服务器接收的任何TLS扩展的十六进制转储。 + =item B<-no_ticket> Disable RFC4507bis session ticket support. +禁用RFC4507bis会话票证支持。 + =item B<-www> Sends a status message back to the client when it connects. This includes @@ -431,12 +544,16 @@ information about the ciphers used and various session parameters. The output is in HTML format so this option will normally be used with a web browser. +当连接时,向客户端发送状态消息。 这包括有关使用的密码和各种会话参数的信息。 输出是HTML格式,因此这个选项通常与网络浏览器一起使用。 + =item B<-WWW> Emulates a simple web server. Pages will be resolved relative to the current directory, for example if the URL https://myhost/page.html is requested the file ./page.html will be loaded. +模拟一个简单的Web服务器。 页面将相对于当前目录进行解析,例如,如果URL https://myhost/page.html被请求,将加载./page.html文件。 + =item B<-HTTP> Emulates a simple web server. Pages will be resolved relative to the @@ -445,11 +562,15 @@ requested the file ./page.html will be loaded. The files loaded are assumed to contain a complete and correct HTTP response (lines that are part of the HTTP response line and headers must end with CRLF). +模拟一个简单的Web服务器。 页面将相对于当前目录进行解析,例如,如果URL https://myhost/page.html被请求,将加载./page.html文件。 假设加载的文件包含完整且正确的HTTP响应(作为HTTP响应行的一部分的行,头必须以CRLF结尾)。 + =item B<-rev> Simple test server which just reverses the text received from the client and sends it back to the server. Also sets B<-brief>. +简单的测试服务器,只是反转从客户端收到的文本并将其发送回服务器。 还设置-brief。 + =item B<-engine id> Specifying an engine (by its unique B string) will cause B @@ -457,6 +578,8 @@ 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字符串)将导致s_server尝试获取对指定引擎的功能引用,从而在需要时对其进行初始化。 然后,引擎将被设置为所有可用算法的默认值。 + =item B<-id_prefix arg> Generate SSL/TLS session IDs prefixed by B. This is mostly useful @@ -464,6 +587,8 @@ for testing any SSL/TLS code (eg. proxies) that wish to deal with multiple servers, when each of which might be generating a unique range of session IDs (eg. with a certain prefix). +生成以arg为前缀的SSL / TLS会话ID。 这主要用于测试希望处理多个服务器的任何SSL / TLS代码(例如代理),当每个服务器可能会生成唯一的会话ID范围(例如,具有特定前缀)时。 + =item B<-rand file(s)> A file or files containing random data used to seed the random number @@ -472,6 +597,8 @@ Multiple files can be specified separated by an OS-dependent character. The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for all others. +包含用于种子随机数生成器或EGD套接字的随机数据的文件或文件(参见RAND_egd(3))。 多个文件可以由与操作系统相关的字符分隔。 分离器是 对于MS-Windows,对于OpenVMS,以及:对于所有其他。 + =item B<-serverinfo file> A file containing one or more blocks of PEM data. Each PEM block @@ -480,29 +607,41 @@ followed by "length" bytes of extension data). If the client sends an empty TLS ClientHello extension matching the type, the corresponding ServerHello extension will be returned. +包含一个或多个PEM数据块的文件。 每个PEM块必须编码TLS ServerHello扩展(2字节类型,2字节长度,后跟扩展数据的“长度”字节)。 如果客户端发送与该类型相匹配的空TLS ClientHello扩展名,则将返回相应的ServerHello扩展名。 + =item B<-no_resumption_on_reneg> Set the B option. +设置SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION选项。 + =item B<-status> Enables certificate status request support (aka OCSP stapling). +启用证书状态请求支持(也称为OCSP装订)。 + =item B<-status_verbose> Enables certificate status request support (aka OCSP stapling) and gives a verbose printout of the OCSP response. +启用证书状态请求支持(也称为OCSP装订),并给出OCSP响应的详细打印输出。 + =item B<-status_timeout nsec> Sets the timeout for OCSP response to B seconds. +将OCSP响应的超时设置为nsec秒。 + =item B<-status_url url> Sets a fallback responder URL to use if no responder URL is present in the server certificate. Without this option an error is returned if the server certificate does not contain a responder address. +如果服务器证书中没有响应者URL,则设置要使用的回退应答器URL。 没有此选项,如果服务器证书不包含响应者地址,则会返回错误。 + =item B<-alpn protocols>, B<-nextprotoneg protocols> these flags enable the @@ -515,6 +654,8 @@ The list should contain most wanted protocols first. Protocol names are printable ASCII strings, for example "http/1.1" or "spdy/3". +这些标志分别启用启用应用层协议协商协议或下一协议协议扩展。 ALPN是IETF标准,替代NPN。 协议列表是支持的协议名称的逗号分隔列表。 该列表应该包含最需要的协议。 协议名称是可打印的ASCII字符串,例如“http / 1.1”或“spdy / 3”。 + =back =head1 CONNECTED COMMANDS diff --git a/doc/apps/speed.pod b/doc/apps/speed.pod index c32c95ee..93327aeb 100644 --- a/doc/apps/speed.pod +++ b/doc/apps/speed.pod @@ -22,6 +22,8 @@ This command is used to test the performance of cryptographic algorithms. To see the list of supported algorithms, use the I or I command. +此命令用于测试加密算法的性能。 要查看支持的算法列表,请使用list --digest-commands或list --cipher-commands命令。 + =head1 OPTIONS =over 4 @@ -30,6 +32,8 @@ or I command. Print out a usage message. +打印使用信息 + =item B<-engine id> specifying an engine (by its unique B string) will cause B @@ -37,24 +41,34 @@ 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字符串)将导致speed尝试获得对指定引擎的功能引用,从而在需要时初始化它。 然后,引擎将被设置为所有可用算法的默认值。 + =item B<-elapsed> Measure time in real time instead of CPU time. It can be useful when testing speed of hardware engines. +实时测量时间,而不是CPU时间。 在测试硬件引擎的速度时可能会很有用。 + =item B<-evp algo> Use the specified cipher or message digest algorithm via the EVP interface. +通过EVP接口使用指定的密码或消息摘要算法。 + =item B<-decrypt> Time the decryption instead of encryption. Affects only the EVP testing. +时间解密而不是加密。 仅影响EVP测试。 + =item B<[zero or more test algorithms]> If any options are given, B tests those algorithms, otherwise all of the above are tested. +如果有任何选项,speed测试这些算法,否则所有上述都被测试。 + =back =head1 COPYRIGHT diff --git a/doc/apps/verify.pod b/doc/apps/verify.pod index 336f63d0..1fdf7588 100644 --- a/doc/apps/verify.pod +++ b/doc/apps/verify.pod @@ -57,6 +57,8 @@ B B The B command verifies certificate chains. +verify命令验证证书链。 + =head1 OPTIONS =over 4 @@ -65,11 +67,15 @@ The B command verifies certificate chains. Print out a usage message. +打印使用信息。 + =item B<-CAfile file> A B of trusted certificates. The file should contain one or more certificates in PEM format. +可信证书文件。该文件应包含在一个或多个PEM格式的证书里。 + =item B<-CApath directory> A directory of trusted certificates. The certificates should have names @@ -78,49 +84,71 @@ form ("hash" is the hashed certificate subject name: see the B<-hash> option of the B utility). Under Unix the B script will automatically create symbolic links to a directory of certificates. +可信证书目录。 证书应具有以下格式的名称:hash.0或具有此表单的符号链接 +(“哈希”是散列的证书主题名称:请参阅x509实用程序的-hash选项)。 在Unix下, +c_rehash脚本将自动创建到证书目录的符号链接。 + =item B<-no-CAfile> Do not load the trusted CA certificates from the default file location +不要从默认文件位置加载受信任的CA证书。 + =item B<-no-CApath> Do not load the trusted CA certificates from the default directory location +不要从默认目录位置加载受信任的CA证书。 + =item B<-allow_proxy_certs> Allow the verification of proxy certificates +允许验证代理证书。 + =item B<-attime timestamp> Perform validation checks using time specified by B and not current system time. B is the number of seconds since 01.01.1970 (UNIX time). +使用由时间戳指定的时间而不是当前系统时间执行验证检查。 时间戳是自01.01.1970(UNIX时间)以来的秒数。 + =item B<-check_ss_sig> Verify the signature on the self-signed root CA. This is disabled by default because it doesn't add any security. +验证自签名根CA上的签名。 这是默认禁用的,因为它不添加任何安全性。 + =item B<-CRLfile file> The B should contain one or more CRLs in PEM format. This option can be specified more than once to include CRLs from multiple B. +文件应包含一个或多个PEM格式的CRL。 可以多次指定此选项以包含来自多个文件的CRL。 + =item B<-crl_download> Attempt to download CRL information for this certificate. +尝试下载此证书的CRL信息。 + =item B<-crl_check> Checks end entity certificate validity by attempting to look up a valid CRL. If a valid CRL cannot be found an error occurs. +通过尝试查找有效的CRL来检查终端实体证书的有效性。 如果找不到有效的CRL,则会发生错误。 + =item B<-crl_check_all> Checks the validity of B certificates in the chain by attempting to look up valid CRLs. +通过尝试查找有效的CRL来检查链中所有证书的有效性。 + =item B<-engine id> Specifying an engine B will cause L to attempt to load the @@ -130,55 +158,83 @@ If you want to load certificates or CRLs that require engine support via any of the B<-trusted>, B<-untrusted> or B<-CRLfile> options, the B<-engine> option must be specified before those options. +指定引擎ID将导致verify(1)尝试加载指定的引擎。 引擎将被设置为所有支持的算法的默认值。 + 如果要通过任何-trusted,-untrusted或-CRLfile选项加载需要引擎支持的证书或CRL, +则必须在这些选项之前指定-engine选项。 + =item B<-explicit_policy> Set policy variable require-explicit-policy (see RFC5280). +设置策略变量require-explicit-policy(参见RFC5280)。 + =item B<-extended_crl> Enable extended CRL features such as indirect CRLs and alternate CRL signing keys. +启用扩展CRL功能,如间接CRL和备用CRL签名密钥 + =item B<-ignore_critical> Normally if an unhandled critical extension is present which is not supported by GmSSL the certificate is rejected (as required by RFC5280). If this option is set critical extensions are ignored. +通常如果GmSSL不支持未处理的关键扩展,那么证书将被拒绝(根据RFC5280的要求)。 + 如果设置了此选项,则将忽略关键扩展。 + =item B<-inhibit_any> Set policy variable inhibit-any-policy (see RFC5280). +设置策略变量suppress-any-policy(参见RFC5280)。 + =item B<-inhibit_map> Set policy variable inhibit-policy-mapping (see RFC5280). +设置策略变量inhibit-policy-mapping(参见RFC5280)。 + =item B<-no_check_time> This option suppresses checking the validity period of certificates and CRLs against the current time. If option B<-attime timestamp> is used to specify a verification time, the check is not suppressed. +此选项禁止根据当前时间检查证书和CRL的有效期。 + 如果选项-attime时间戳用于指定验证时间,则不会抑制该检查。 + =item B<-partial_chain> Allow verification to succeed even if a I chain cannot be built to a self-signed trust-anchor, provided it is possible to construct a chain to a trusted certificate that might not be self-signed. +即使完整的链不能构建一个自签署的信任锚点也可以允许验证成功, +这可以构建一个链链接到一个不是自签署的受信任证书。 + =item B<-policy arg> Enable policy processing and add B to the user-initial-policy-set (see RFC5280). The policy B can be an object name an OID in numeric form. This argument can appear more than once. +启用策略处理,并将arg添加到用户初始策略集(请参阅RFC5280)。 +策略参数可以是一个数字形式的OID的对象名称。 这个参数可能会出现不止一次。 + =item B<-policy_check> Enables certificate policy processing. +启用证书策略处理。 + =item B<-policy_print> Print out diagnostics related to policy processing. +打印与策略处理有关的诊断。 + =item B<-purpose purpose> The intended use for the certificate. If this option is not specified, @@ -187,6 +243,10 @@ Currently accepted uses are B, B, B, B, B. See the B section for more information. +证书的预期用途。 如果未指定此选项,验证将不会在链验证期间考虑证书目的。 +目前接受的用途是sslclient,sslserver,nssslserver,smimesign,smimeencrypt。 +有关详细信息,请参阅“验证操作”部分。 + =item B<-suiteB_128_only>, B<-suiteB_128>, B<-suiteB_192> enable the Suite B mode operation at 128 bit Level of Security, 128 bit or @@ -195,6 +255,10 @@ See RFC6460 for details. In particular the supported signature algorithms are reduced to support only ECDSA and SHA256 or SHA384 and only the elliptic curves P-256 and P-384. +启用Suite B模式操作,分别为128位安全级别,128位或192位或仅192位安全级别。 +有关详细信息,请参阅RFC6460。 特别地,支持的签名算法被减少以仅支持ECDSA +和SHA256或SHA384,并且仅支持椭圆曲线P-256和P-384。 + =item B<-trusted_first> When constructing the certificate chain, use the trusted certificates specified @@ -203,6 +267,9 @@ B<-untrusted>. This can be useful in environments with Bridge or Cross-Certified CAs. As of GmSSL 1.1.0 this option is on by default and cannot be disabled. +在构建证书链时,请使用通过-CAfile指定的受信任证书,-CApath或-trusted,然后通过-rustrusted指定任何证书。 +这可以在具有桥接或交叉认证CA的环境中使用。 从GmSSL 1.1.0开始,默认情况下,该选项处于打开状态,无法禁用。 + =item B<-no_alt_chains> By default, unless B<-trusted_first> is specified, when building a certificate @@ -212,6 +279,10 @@ trust store to see if an alternative chain can be found that is trusted. As of GmSSL 1.1.0, with B<-trusted_first> always on, this option has no effect. +默认情况下,除非指定了-trusted_first,否则在构建证书链时,如果发现第一个证书链不受信任, +则GmSSL将尝试用信任存储中的证书替换不受信任的颁发者证书,以查看是否可以找到可信任的替代链。 +从GmSSL 1.1.0开始,使用-trusted_first始终处于打开状态,此选项不起作用。 + =item B<-untrusted file> A B of additional untrusted certificates (intermediate issuer CAs) used @@ -220,6 +291,9 @@ The B should contain one or more certificates in PEM format. This option can be specified more than once to include untrusted certificates from multiple B. +用于构建从主题证书到信任锚的证书链的其他不可信证书(中间颁发者CA)的文件。 + 该文件应包含一个或多个PEM格式的证书。 可以多次指定此选项以包含来自多个文件的不受信任的证书。 + =item B<-trusted file> A B of trusted certificates, which must be self-signed, unless the @@ -234,14 +308,23 @@ This option implies the B<-no-CAfile> and B<-no-CApath> options. This option cannot be used in combination with either of the B<-CAfile> or B<-CApath> options. +可信证书的文件,必须是自签名的,除非指定了-partial_chain选项。 该文件包含一个或多个PEM格式的证书。 + 使用此选项,不会查询附加(例如,默认)证书列表。 也就是说,唯一的信任锚是列出的文件。 + 可以多次指定此选项以包含来自多个文件的可信证书。 此选项意味着-no-CAfile和-no-CApath选项。 + 此选项不能与-CAfile或-CApath选项中的任何一个组合使用。 + =item B<-use_deltas> Enable support for delta CRLs. +启用对delta CRL的支持。 + =item B<-verbose> Print extra information about the operations being performed. +打印有关正在执行的操作的额外信息。 + =item B<-auth_level level> Set the certificate chain authentication security level to B. @@ -260,6 +343,12 @@ Security level 1 requires at least 80-bit-equivalent security and is broadly interoperable, though it will, for example, reject MD5 signatures or RSA keys shorter than 1024 bits. +将证书链认证安全级别设置为级别。 认证安全级别在验证证书链时确定可接受的签名和公开密钥强度。 + 要验证证书链,所有证书的公钥必须满足指定的安全级别。 对链中的所有证书执行签名算法安全级别, +除了该链的信任锚,其通过除签名之外的方式直接受信任或验证。 有关可用级别的定义,请参阅SSL_CTX_set_security_level(3)。 + 默认安全级别为-1或“未设置”。 在0或更低的安全级别,所有算法都可以接受。 安全级别1需要至少80位等效的安全性, +并且可以广泛地互操作,尽管它将例如拒绝MD5签名或短于1024位的RSA密钥。 + =item B<-verify_depth num> Limit the certificate chain to B intermediate CA certificates. @@ -267,21 +356,29 @@ A maximal depth chain can have up to B certificates, since neither the end-entity certificate nor the trust-anchor certificate count against the B<-verify_depth> limit. +将证书链限制为中间CA证书。 最大深度链可以具有最多num + 2个证书,因为终端实体证书和信任锚证书都不符合-verify_depth限制。 + =item B<-verify_email email> Verify if the B matches the email address in Subject Alternative Name or the email in the subject Distinguished Name. +验证电子邮件是否匹配主题备用名称中的电子邮件地址或主题可分辨名称中的电子邮件。 + =item B<-verify_hostname hostname> Verify if the B matches DNS name in Subject Alternative Name or Common Name in the subject certificate. +验证主题名称是否匹配主题证书中主题备用名称或公用名称中的DNS名称。 + =item B<-verify_ip ip> Verify if the B matches the IP address in Subject Alternative Name of the subject certificate. +验证IP匹配主题证书的主题备用名称中的IP地址。 + =item B<-verify_name name> Use default verification policies like trust model and required certificate @@ -298,29 +395,42 @@ As of GmSSL 1.1.0, the trust model is inferred from the purpose when not specified, so the B<-verify_name> options are functionally equivalent to the corresponding B<-purpose> settings. +使用默认验证策略,如信任模型和由名称标识的所需证书策略。 信任模型确定哪些辅助信任或拒绝OID适用于验证给定的证书链。 + 请参阅x509(1)命令行实用程序的-addtrust和-addreject选项。 支持的策略名称包括:default,pkcs7,smime_sign,ssl_client,ssl_server。 + 这些模拟了SSL,CMS和S / MIME中使用的目的和信任设置的组合。 从GmSSL 1.1.0开始,从未指定的目的推断信任模型 +,因此-verify_name选项在功能上等同于相应的设置。 + =item B<-x509_strict> For strict X.509 compliance, disable non-compliant workarounds for broken certificates. +对于严格的X.509合规性,请禁用破坏的证书的不符合标准的解决方法。 + =item B<-show_chain> Display information about the certificate chain that has been built (if successful). Certificates in the chain that came from the untrusted list will be flagged as "untrusted". +显示有关已建立的证书链的信息(如果成功)。 来自不受信任名单的链中的证书将被标记为“不受信任”。 + =item B<-> Indicates the last option. All arguments following this are assumed to be certificate files. This is useful if the first certificate filename begins with a B<->. +表示最后一个选项。 以下所有参数都被认为是证书文件。 如果第一个证书文件名以 - 开头,这将非常有用。 + =item B One or more certificates to verify. If no certificates are given, B will attempt to read a certificate from standard input. Certificates must be in PEM format. +一个或多个验证证书。 如果没有给出证书,验证将尝试从标准输入读取证书。 证书必须采用PEM格式。 + =back =head1 VERIFY OPERATION diff --git a/doc/apps/x509.pod b/doc/apps/x509.pod index 105bffc3..72b75b77 100644 --- a/doc/apps/x509.pod +++ b/doc/apps/x509.pod @@ -73,6 +73,10 @@ 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 @@ -83,6 +87,8 @@ various sections. Print out a usage message. +打印使用信息。 + =item B<-inform DER|PEM|NET> This specifies the input format normally the command will expect an X509 @@ -92,21 +98,29 @@ 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. @@ -116,6 +130,8 @@ 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 @@ -123,6 +139,8 @@ 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 @@ -130,6 +148,8 @@ for all available algorithms. 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> @@ -138,6 +158,8 @@ 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