这是我的情况:
我正在尝试创建一个SSL证书,该证书将安装在所有开发人员的计算机上,以及两个内部服务器(一切都是非生产的).
如何创建可以安装在所有这些位置的证书,我需要做什么?
现在我使用Microsoft Visual Studio 8\SDK\v2.0\Bin中的makecert应用程序了解这些内容:
makecert -r -pe -n "CN=MySite.com Dev" -b 01/01/2000 -e 01/01/2033 -eku 1.3.6.1.5.5.7.3.1 -ss Root -sr localMachine -sky exchange -sp "Microsoft RSA SChannel Cryptographic Provider" -sy 12 mycert.cer
Run Code Online (Sandbox Code Playgroud)
但是,我不确定如何将此.cer文件放在其他计算机上,当我在本地计算机上安装IIS时,每次通过https:访问页面时,都会得到安全提示(即使在我之后)已经安装了证书.有没有人这样做过?
我有通过MakeCert生成的证书.我想使用PeerTrust将此证书用于WCF消息安全性.如何使用c#或.NET以编程方式将证书安装到"受信任的人"本地计算机证书存储中?
我有一个CER文件,但也可以创建一个PFX.
我做了一个干净的Windows 10和Visual Studio 2015安装,并没有找到任何地方的makecert.exe.是否需要安装其他软件才能恢复此程序?
我查看了"C:\ Program Files(x86)\ Microsoft SDKs\Windows \\"下的所有文件夹,但没有看到任何文件夹.
我还打开了"VS2015的开发人员命令提示符"并尝试运行"makecert",但未找到.
尝试使用makecert UI工具,以便更容易生成自签名代码证书我试图找到makecert.exe的DIR位置
我按照前面的答案,所有命令行开关都正常工作. - 但是在尝试使用UI工具时,我收到了错误:
所以我假设我需要将该工具放在与makecert.exe和pvk2pfx.exe相同的目录中
这是我看过的地方:
我正在使用Fiddler2(或尝试)来获取点击https网络服务的Windows桌面小工具的SSL流量.它曾经工作,然后它几天前停止,总是出现这个错误:
---------------------------
Unable to Generate Certificate
---------------------------
Creation of the interception certificate failed.
makecert.exe returned -1.
Results from C:\Program Files\Fiddler2\MakeCert.exe -ss my -n
"CN=DO_NOT_TRUST_FiddlerRoot, O=DO_NOT_TRUST, OU=Created by
http://www.fiddler2.com" -eku 1.3.6.1.5.5.7.3.1 -r -cy authority -a
sha1
Error: Can't create the key of the subject ('JoeSoft')
Failed
-------------------------------------------
Run Code Online (Sandbox Code Playgroud)
(我为了小提琴手从谷歌小组中删除了错误,虽然我刚发布了自己的错误,但很快就会看到它).
还有其他人有这个问题并解决了吗?小提琴手刚破了吗?
我想cmd
从c#
代码中运行一些命令.我跟着一些博客和教程得到了答案,但我有点困惑,即我应该如何传递多个参数?
我使用以下代码:
System.Diagnostics.Process process = new System.Diagnostics.Process();
System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal;
startInfo.FileName = "cmd.exe";
startInfo.Arguments =
...
Run Code Online (Sandbox Code Playgroud)
startInfo.Arguments
以下命令行代码的值是多少?
makecert -sk server -sky exchange -pe -n CN=localhost -ir LocalMachine -is Root -ic MyCA.cer -sr LocalMachine -ss My MyAdHocTestCert.cer
netsh http add sslcert ipport=127.0.0.1:8085 certhash=0000000000003ed9cd0c315bbb6dc1c08da5e6 appid={00112233-4455-6677-8899-AABBCCDDEEFF} clientcertnegotiation=enable
如何使用makecert
"使用者替代名称"字段创建证书?
您可以使用-eku选项添加一些字段,例如"增强型密钥用法",我尝试了-san选项,但makecert不喜欢它.
这是一个自签名证书,因此任何使用IIS创建要发送给CA的内容的方法都不合适.
我使用的是Windows 7.我没有makecert.exe,当我尝试运行命令来生成证书时,我才知道
makecert -sk XYZ -n "CN=XYZ Company" testXYZ.cer
Run Code Online (Sandbox Code Playgroud)
我收到错误:
'makecert' is not recognised as an internal or external command, operable program or batch file.
Run Code Online (Sandbox Code Playgroud)
请提示如何解决此问题.我是否需要再次安装Windows SDK.
此致,普拉文.
是否可以使用makecert或我可用于生成自己的测试证书的任何其他工具来设置密钥用法属性?
我感兴趣的原因是用于BizTalk Server AS2传输的证书需要使用数字签名的密钥用于签名和数据加密或密钥加密用于加密/解密,我想要使用此功能.
我看到如何使用makecert 设置增强的密钥使用属性,但不是密钥用法.
我最近一直在尝试用C#创建一个SSL加密的服务器/客户端.
我在MSDN上遵循了本教程,但是,它需要使用makecert.exe为服务器和客户端使用创建证书,所以我找到了一个示例,它创建了证书:
makecert -sr LocalMachine -ss My -n"CN = Test"-sky exchange -sk 123456 c:/Test.cer
但现在问题是服务器启动并等待客户端,当客户端连接它时使用机器名称,在这种情况下,我可以收集的是我的IP:
127.0.0.1
,然后它需要服务器名称,该名称必须与证书(Test.cer)上的服务器名称匹配.我尝试了多种组合(例如"Test""LocalMachine","127.0.0.1"但似乎无法让客户端给出服务器名称以匹配,从而允许连接.我得到的错误是:
证书错误:RemoteCertificateNameMismatch,RemoteCertificateChainErrors例外:根据验证程序,远程证书无效
这里是我使用它的代码与MSDN示例的不同之处仅在于我在应用程序中为服务器分配证书路径以及客户端的机器名和服务器名称:
SslTcpServer.cs
using System;
using System.Collections;
using System.Net;
using System.Net.Sockets;
using System.Net.Security;
using System.Security.Authentication;
using System.Text;
using System.Security.Cryptography.X509Certificates;
using System.IO;
namespace Examples.System.Net
{
public sealed class SslTcpServer
{
static X509Certificate serverCertificate = null;
// The certificate parameter specifies the name of the file
// containing the …
Run Code Online (Sandbox Code Playgroud)