Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/arduino/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jetty 为什么我的证书这么快就到期了?_Jetty_Ssl Certificate - Fatal编程技术网

Jetty 为什么我的证书这么快就到期了?

Jetty 为什么我的证书这么快就到期了?,jetty,ssl-certificate,Jetty,Ssl Certificate,我为Artifactory创建了一个密钥库,如下所示: openssl genrsa -des3 -out jetty.key openssl req -new -x509 -key jetty.key -out jetty.crt keytool -keystore keystore -import -alias jetty -file jetty.crt -trustcacerts openssl req -new -key jetty.key -out jetty.csr openssl

我为Artifactory创建了一个密钥库,如下所示:

openssl genrsa -des3 -out jetty.key
openssl req -new -x509 -key jetty.key -out jetty.crt
keytool -keystore keystore -import -alias jetty -file jetty.crt -trustcacerts
openssl req -new -key jetty.key -out jetty.csr
openssl pkcs12 -inkey jetty.key -in jetty.crt -export -out jetty.pkcs12
keytool -importkeystore -srckeystore jetty.pkcs12 -srcstoretype PKCS12 -destkeystore keystore
我本周刚刚创建了它,但是已经收到一个警告,证书即将过期

"WARNING - Certificate expires in 26 day(s) ".
为什么它这么快就到期了?我怎样才能延长到期日

感谢您的帮助


谢谢

尝试将
-days 360
添加到
openssl req
命令中。从:


你也可以。相应的参数名为
-validity

谢谢您的回答。它帮助了我。再过5个小时我才能给你赏金。那件事一发生我就去做。
-days n
  when the -x509 option is being used this specifies the number of
  days to certify the certificate for. The default is 30 days.