Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xslt/3.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
Ssl certificate 在Windows中生成自签名证书_Ssl Certificate - Fatal编程技术网

Ssl certificate 在Windows中生成自签名证书

Ssl certificate 在Windows中生成自签名证书,ssl-certificate,Ssl Certificate,我想在Windows中生成自签名SSL证书,并将其用于我的IE和Edge网站 需要将两个文件.pvk和.cer插入到我的网站的代码中 我遵循,运行以下命令,生成了一个powershellcert.pfx $cert = New-SelfSignedCertificate -certstorelocation cert:\localmachine\my -dnsname company.co.nz $pwd = ConvertTo-SecureString -String ‘password12

我想在Windows中生成自签名SSL证书,并将其用于我的IE和Edge网站

需要将两个文件
.pvk
.cer
插入到我的网站的代码中

我遵循,运行以下命令,生成了一个
powershellcert.pfx

$cert = New-SelfSignedCertificate -certstorelocation cert:\localmachine\my -dnsname company.co.nz

$pwd = ConvertTo-SecureString -String ‘password1234’ -Force -AsPlainText

$path = ‘cert:\localMachine\my\’ + $cert.thumbprint

Export-PfxCertificate -cert $path -FilePath c:\junk\certificate\powershellcert.pfx -Password $pwd
有人知道如何生成
.pvk
.cer

编辑1:

我下载了PVKConverter,并运行
PVKConverter.exe-I powershellcert-o pvk-d“password1234”
,只生成了一个文件
pvk_1.cer


有人知道我如何生成
.pvk
吗?

要从您的
.pfx
文件的内容生成
.pvk
.cer
文件,请使用Microsoft的
PVKConverter
工具,可从下载一项提供免费SSL证书的知名服务。使用,您只需运行以下命令,即可在希望存储证书的文件夹中生成证书

openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout mykey.key -out mycert.pem 
(-x509表示x509协议;-1年365天;-newkey表示生成新密钥;rsa:2048表示使用2048位rsa算法;-keyout表示放置密钥的位置;-out表示放置证书的位置)

注意到这一点



要在Windows上安装openssl,请转到,然后向下滚动,您将找到适用于Windows的安装程序,包括64位和32位版本。根据您的系统选择版本,下载并安装。

谢谢您。。。请参见OP中的我的
编辑1
。您也知道如何生成
.pvk