gpt4 book ai didi

openssl - `-new` 的 `-newkey` 和 `openssl req` 有什么区别?

转载 作者:行者123 更新时间:2023-12-05 03:54:07 27 4
gpt4 key购买 nike

我尝试使用 openssl 创建自签名证书。创建证书请求时,我阅读了手册页并对选项 -new-newkey 感到困惑。

-new Generate a new certificate request.The user is prompted for the relevant field values. The actual fields prompted for and their maximum and minimum sizes are specified in the configuration file and any requested extensions.

If the -key option is not used, it will generate a new RSA private key using information specified in the configuration file.

.

-newkey arg Create a new certificate request and a new private key. The argument takes one of several forms.

...(some argument)

一个是Generate a new certificate request,一个是Create a new certificate request,我知道Generate的区别创建,但是看不懂句子:(

我试过 openssl req -newkey rsa:4096 ... 没有 -new 好像没有问题。但是很多文档通常是 openssl req -new -newkey rsa:4096 ...

最佳答案

区别在于 -newkey 也会创建一个新的私钥,而不仅仅是证书请求。

-new Generate a new certificate request.
-newkey arg Create a new certificate request **and a new private key.**

如果你单独使用 -new 而没有 -newkey 但你省略了 -key (意味着你没有指定你使用的是什么 key )那么我相信它将被视为与 -newkey 相同并且它将创建一个新的私有(private) key 也与证书请求一起。

关于openssl - `-new` 的 `-newkey` 和 `openssl req` 有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61283511/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com