iis makecert.exe在windows 10中丢失,如何获得它并使用它

thtygnil  于 2023-01-21  发布在  Windows
关注(0)|答案(6)|浏览(182)

我使用的是Windows 10。我没有makecert.exe,这是我在尝试运行makecert.exe等命令生成证书时发现的
我得到错误:
"makecert"未被识别为内部或外部命令、可操作程序或批处理文件。
而且我已经安装了Windows 10的Windows SDK。

hrysbysz

hrysbysz1#

它可能是 * 已安装 *,但它可能只是不在 * 路径 * 中。
例如,我可以在C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\x64下找到它,但我也可以在C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\x86下找到另一个。路径中的确切版本将根据您安装的SDK的确切版本而有所不同。
不过,这两个路径都不在我的PATH环境变量中(我不记得在安装SDK后明确删除了它),所以我不能在命令行中只说makecert,我必须给予我想要运行的那个程序的完整路径。
where命令是一个很方便的方法,可以尝试找到你的副本所在的位置。这里我将搜索范围限制在SDK目录,但是如果你愿意,你可以搜索整个硬盘:

C:\Users\Damien>where /R "C:\Program Files (x86)\Windows Kits" makecert.*
C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\arm64\makecert.exe
C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\x64\makecert.exe
C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\x86\makecert.exe
hgqdbh6s

hgqdbh6s2#

当前makecert已折旧,使用powershell的新方法“New-SelfSignedCertificate”(作为管理员),例如:

1.- We create a new root trusted cert:
$rootCert = New-SelfSignedCertificate -Subject 'CN=TestRootCA,O=TestRootCA,OU=TestRootCA' -KeyExportPolicy Exportable -KeyUsage CertSign,CRLSign,DigitalSignature -KeyLength 2048 -KeyUsageProperty All -KeyAlgorithm 'RSA' -HashAlgorithm 'SHA256'  -Provider 'Microsoft Enhanced RSA and AES Cryptographic Provider'

2.- We create the cert from the root trusted cert chain:
New-SelfSignedCertificate -DnsName "localhost" -FriendlyName "MyCert" -CertStoreLocation "cert:\LocalMachine\My" -Signer $rootCert -TextExtension @("2.5.29.37={text}1.3.6.1.5.5.7.3.1") -Provider "Microsoft Strong Cryptographic Provider" -HashAlgorithm "SHA256" -NotAfter (Get-Date).AddYears(10)

3.- We copy the thumbprint returned by the last command

4.- (If neccesary) We remove the last association ip/port/cert:
netsh http delete sslcert ipport=0.0.0.0:443

5.- We associate the new certificate with any ip and port 443 (the appid value does not matter, is any valid guid):
netsh http add sslcert ipport=0.0.0.0:443 appid='{214124cd-d05b-4309-9af9-9caa44b2b74a}' certhash=here_the_copied_thumbprint

6.- Now, you must open MMC (Certificates Local Computer) and drag and drop the 'TestRootCA' certificate from your 'Personal/Certificates' subfolder to 'Trusted Root Certification Authorities/Certificates' subfolder.

这些命令还解决了Google Chrome稍后返回的错误ERR_CERT_WEAK_SIGNATURE_ALGORITHM,因为证书是使用SHA1而不是SHA 256创建的

tnkciper

tnkciper3#

这就是我安装makecert.exe文件的方法
(Note:我先安装了Windows 10 SDK,但是,这个版本没有在"bin"目录下安装makecert.exe。没问题!)
1.已从https://www.microsoft.com/en-us/download/details.aspx?id=8279下载Windows SDK版本7.1 ISO
1.我下载的ISO的名称为GRMSDK_EN_DVD. iso
1.导航到下载目录并安装此ISO(有软件,使安装在Windows 7/10容易)
1.安装后,导航到ISO中名为"Setup\WinSDKTools"的目录,您将在此目录中看到两个文件。一个是"WinSDKTools_x86.msi",另一个是"www.example.com" cab1.cab "
1.将这两个文件复制到硬盘上的空目录中
1.从硬盘转到复制这些文件的目录,右键单击"WinSDKTools_x86.msi",然后选择"安装
1.在硬盘上查找新创建的目录"C:\Program Files(x86)\Microsoft SDK\Windows\v7.1\Bin"

  1. Makecert.exe现在应该与其他一些应用程序和文件夹一起位于此新目录中
    1.利润?
bmp9r5qi

bmp9r5qi4#

如果您安装了Fiddler,Fiddler还附带了makecert.exe。它位于

C:\Users\<yourwindowslogin>\AppData\Local\Programs\Fiddler\makecert.exe
ftf50wuq

ftf50wuq5#

我知道现在为时已晚,但我通过安装旧的Windows 10 SDK版本解决了这个问题:

*适用于Windows 10(10.0.10240)的SDK可在此处找到:https://developer.microsoft.com/pt-br/windows/downloads/sdk-archive

aor9mmx1

aor9mmx16#

我只是下载此文件并将其移动到c:/windows/system32
https://onedrive.live.com/?authkey=%21AKVU0sMEK182FF0&id=26E0E257BE82A39E%2127335&cid=26E0E257BE82A39E
然后在命令提示符下运行如下命令:
Makecert -r -pe -n CN=“我的计算机证书”-B 2020年1月1日-e 2030年12月22日-eku 1.3.6.1.5.5.7.3.1 -ss我的-sr本地计算机-天空交换-sp“Microsoft RSA SChannel加密提供程序”-sy 12

相关问题