makecert

add or create 'Subject Alternative Name' field to self-signed certificate using makecert

倖福魔咒の 提交于 2019-12-17 18:43:06
问题 How can I create a certificate using makecert with a 'Subject Alternative Name' field ? You can add some fields eg, 'Enhanced Key Usage' with the -eku option and I've tried the -san option but makecert doesn't like it. This is a self-signed certificate so any method that uses IIS to create something to send off to a CA won't be appropriate. 回答1: Makecert doesn't appear to support SANs so I created a certificate with SANs for use with IIS using OpenSSL. Check out my post about it. http:/

How can I install a certificate into the local machine store programmatically using c#?

故事扮演 提交于 2019-12-17 04:14:21
问题 I have a certificate generated via MakeCert. I want to use this certificate for WCF message security using PeerTrust. How can I programmatically install the certificate into the "trusted people" local machine certificate store using c# or .NET? I have a CER file, but can also create a PFX. 回答1: I believe that this is correct: using (X509Store store = new X509Store(StoreName.TrustedPeople, StoreLocation.LocalMachine)) { store.Open(OpenFlags.ReadWrite); store.Add(cert); //where cert is an

Powershell executing makecert with variables giving Too many parameters error

梦想与她 提交于 2019-12-12 03:17:36
问题 The following command worked in powershell: $currentDirectory = Split-Path $Script:MyInvocation.MyCommand.Path & "$currentDirectory\Makecert\makecert.exe" –sv actualCnName.pvk -n "cn=actualCnName" actualCnName.cer -r -eku 1.3.6.1.5.5.7.3.1 But I want to parameterize these and use the variable names $pvkName, $cnName and $cerName. The error when executing: $cnName = "actualCnName" $pvkName = $cnName + ".pvk" $cerName = $cnName + ".cer" $pfxName = $cnName + ".pfx" & "$currentDirectory\Makecert

How to run command in the process which is executed with admin rights?

て烟熏妆下的殇ゞ 提交于 2019-12-11 15:20:46
问题 I want to create a self signed certificate and install it using through c# program. I use makecert to make certificate i run it as administrator and i pass command in the ProcessStartInfo.argument but the command doesn't executes what is the problem in the code? Here is my code: public void Createasnewadmin() { ProcessStartInfo info = new ProcessStartInfo(); Process p = new Process(); info.FileName = Application.StartupPath+@"\makecert.exe"; info.UseShellExecute = true; info.Verb = "runas"; /

Duplicate Fiddler.cer being inserted into certificate store

最后都变了- 提交于 2019-12-11 09:57:19
问题 I have put together a bare-bones test case which literally does nothing but FiddlerApplication.Startup(8877, true, true); and even with this after clearing the personal store of FiddlerRoot.cer, i'm getting a bunch of random FiddlerRoot.cer sometimes as many as 10 instantly being inserted into the current users personal store. Here is a screenshot of what happens when running the test case and refreshing a web page. Ultimately it causes Fiddler to spam the error below to my log output: (20/06

Creating certificate using makecert without pvk file

回眸只為那壹抹淺笑 提交于 2019-12-11 00:46:14
问题 I am trying to create a certificate signed by the root key with makecert . I have no PVK file, only KEY and PEM file. I think, KEY an PEM files are also private keys. Is it right? But if i try this: .\makecert.exe -n "CN=Test Use" -iv ca.key -ic ca.cer -pe -a sha256 -len 4096 -b 01/01/2018 -e 01/01/2019 test.cer I get an error: Error: Can't access the key of the issuer ('ca.key') Failed. The same error with PEM file. I get no question for password. Is there a way to create a certificate

X509Certificate2 the server mode SSL must use a certificate with the associated private key

不羁的心 提交于 2019-12-07 17:23:23
问题 I use SslStream to build a web server. However, the code below throws an exception when AuthenticateAsServer. static X509Certificate cert; protected virtual Stream GetStream(TcpClient client) { var ss = new SslStream(client.GetStream(), false); if (cert == null) { cert = X509Certificate2.CreateFromCertFile("test.cer"); } ss.AuthenticateAsServer(cert, false, System.Security.Authentication.SslProtocols.Tls, true); return ss; } I've already used X509Certificate2 to load the cert file why it

fiddler2 unable to generate certificate

不打扰是莪最后的温柔 提交于 2019-12-04 07:48:41
问题 I'm using Fiddler2 (or trying) to capture SSL traffic for a windows desktop gadget hitting an https web service. It used to work, and then it stopped a couple days ago, always with this error: --------------------------- 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

How do I identify my server name for server authentication by client in c#

末鹿安然 提交于 2019-12-03 00:15:11
I have recently been trying to make a SSL encrypted Server/Client in C#. I have followed this tutorial on MSDN, however, it required a certificate to be created for the server and client usage using makecert.exe so I found an example and it created the certificate fine: makecert -sr LocalMachine -ss My -n "CN=Test" -sky exchange -sk 123456 c:/Test.cer but now the problem is the server starts and waits for clients, when the client connects it uses the machine name which as far as I can gather is my IP in this case: 127.0.0.1 , and then it requires the servers name which must match the servers

fiddler2 unable to generate certificate

点点圈 提交于 2019-12-02 17:17:29
I'm using Fiddler2 (or trying) to capture SSL traffic for a windows desktop gadget hitting an https web service. It used to work, and then it stopped a couple days ago, always with this error: --------------------------- 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 (