首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >windows 10中缺少的makecert.exe,如何获取和使用它

windows 10中缺少的makecert.exe,如何获取和使用它
EN

Stack Overflow用户
提问于 2018-07-19 08:56:02
回答 6查看 37.2K关注 0票数 16

我使用的是Windows10。我没有makecert.exe,当我尝试运行命令生成makecert.exe之类的证书时,我就知道了

我得到了错误:

“‘makecert”不被认为是内部或外部命令、可操作的程序或批处理文件。

我已经为windows 10安装了windows。

EN

回答 6

Stack Overflow用户

回答已采纳

发布于 2018-07-19 09:05:05

它可能被安装了,但可能不在路径上。

例如,我可以在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目录,但如果需要,可以搜索整个硬盘驱动器:

代码语言:javascript
运行
复制
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
票数 18
EN

Stack Overflow用户

发布于 2020-12-06 13:06:14

目前,powershell 'New-SelfSignedCertificate‘(作为)的新方法makecert已经折旧,例如:

代码语言:javascript
运行
复制
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  Personal/Certificates folder to Trusted Root Certification Authorities/Certificates.

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

票数 10
EN

Stack Overflow用户

发布于 2019-01-07 08:11:19

我就是这样安装makecert.exe文件的

(注意:我首先安装了Windows10SDK,但是这个版本没有在"bin“目录下安装makecert.exe。没有问题!)

  1. https://www.microsoft.com/en-us/download/details.aspx?id=8279下载WindowsSDK7.1ISO版
  2. 下载的ISO i的名称是GRMSDK_EN_DVD.iso。
  3. 导航到下载目录并安装此ISO (有软件使安装在windows 7/10中很容易)
  4. 挂载后,导航到ISO中名为"Setup\WinSDKTools“的目录,您将在这个目录中看到两个文件。一个是"WinSDKTools_x86.msi“,另一个是”出租车“
  5. 将这两个文件复制到硬盘上的一个空目录中。
  6. 从硬盘驱动器转到复制这些文件的目录,右键单击"WinSDKTools_x86.msi“,然后选择安装
  7. 查看硬盘上新创建的目录"C:\Program (x86)\Microsoft \Windows\v7.1\Bin“
  8. Makecert.exe现在应该与其他应用程序和文件夹一起位于这个新目录中。
  9. 利润?
票数 7
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51418366

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档