Questions tagged [makecert]

makecert.exe is a command line X.509 digital certificate creation tool included with Microsoft Visual Studio. The certificates created are for testing purposes only. It is already deprecated, so don't use it.

The options for makecert can be found at

https://learn.microsoft.com/en-us/windows/desktop/seccrypto/makecert.

Microsoft now recommends users to switch to PowerShell

https://learn.microsoft.com/en-us/powershell/module/pkiclient/new-selfsignedcertificate?view=win10-ps

123 questions
5
votes
4 answers

Creating Self-Signed CA Certificate with makecert.exe

I am trying to create Self-Signed CA Certificate on 32bit Windows 7 (virtual). The makecert is v7.1 located in C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin>. Whenever i try to execute this command (elevated) ... makecert.exe -r -n “CN=MyCert CA”…
no9
  • 6,424
  • 25
  • 76
  • 115
4
votes
1 answer

How to translate a MakeCert command to New-SelfSignedCertificate command?

I'm following this tutorial to implement a licensing solution to my software. At some point the tutorial ask to run a makecert command: makecert -pe -ss My -sr CurrentUser -$ commercial -n "CN=" -sky Signature But at this time…
Bastien Vandamme
  • 17,659
  • 30
  • 118
  • 200
4
votes
1 answer

How to install makecert in windows server 2012 R2 running win 10

i need makecert.exe in our windows server 2012 R2 production machine (win 10). i read a lot of post and guides that directs me to install the windows SDK. Makecert missing from Windows 10 and Visual Studio 2015 install? Missing…
Dardar
  • 624
  • 3
  • 13
  • 30
4
votes
1 answer

How do I force makecert to output the private key to a file (not the Crypto store)?

I want to generate a key pair for use within my applications, but exporting them manually from the mmc is a pain. How can I use commandline parameters, or otherwise end up with a private certificate that resides on the hard drive, suitable for later…
makerofthings7
  • 60,103
  • 53
  • 215
  • 448
4
votes
1 answer

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

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(),…
Mark Yuan
  • 850
  • 1
  • 8
  • 17
4
votes
1 answer

Difference between MakeCert and OpenSSL wrt C# SslStream

I am attempting to create a TCP connection on TLS encryption in C#, using an OpenSSL generated cert. The SslStream sample code given here seems to work using a cert created with windows makecert.exe, which comes out as a .cer file. It does not work…
user1169420
  • 680
  • 7
  • 18
4
votes
1 answer

Where is the certificate created using makecert.exe?

I need to have a "http*s*" enabled self hosted WCF service. Given that there need to be a certificate to have the service "s" enabled, I created the certificate using the following two commands in the same order: makecert.exe -sv SignRoot.pvk -cy…
DiligentKarma
  • 5,198
  • 1
  • 30
  • 33
4
votes
1 answer

WCF – SSL – Client authentication - Can’t implement it on Windows 7, while I can on Windows XP

I’m trying to make a wcf client and server (self hosted) with ssl (transport security) both ways - server certificate and client certificate. In windows XP everything works, but in Windows 7 it failed with client certificate. If the server is on…
programozo
  • 41
  • 1
  • 2
4
votes
1 answer

Is it possible to generate a certificate with custom key usage with makecert?

Is it possible to use makecert to create self-signed certificates with a specific key usage property? I need to generate a self-signed certificate for testing. It must have the "Digital Signature" and "Non-repudiation" values on the "Key Usage"…
Fernando Correia
  • 21,803
  • 13
  • 83
  • 116
3
votes
2 answers

How to self generate certificate SHA-256?

I use Bouncy Castle libraries in C# to sign with SHA-256, and I'd like to use them in a test of a self generated certificate instead of a smartcard reader. Using the self certificate used before, I have a cryptographic exception: specified…
Andreanta
  • 175
  • 1
  • 8
3
votes
3 answers

makecert gives "Fail to acquire a security provider from the issuer's certificate" - why?

Dear ladies and sirs. Observe this simple batch file: makecert -n "CN=MyCA" -sr localmachine -ss root -a sha1 -cy authority -r -sv MyCA.pvk MyCA.cer del MyCA.pvk del MyCA.cer makecert -n "CN=il-mark-lt" -sr localmachine -ss my -cy end -pe -sky…
mark
  • 59,016
  • 79
  • 296
  • 580
3
votes
1 answer

Creating certificate using makecert without pvk file

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…
L.John
  • 41
  • 4
3
votes
1 answer

IIS Express trust self-signed SSL certificate with CLI

We're developing Web API web servers in Visual Studio. We have enabled SSL. This requires a local SSL certificate. We have set this up on our development machines, but we need to be able to set it up on our CI build machines via command line in…
Scotty H
  • 6,432
  • 6
  • 41
  • 94
3
votes
4 answers

How do you specify a complex publisher name in Powershell?

I'm trying to use the Microsoft Desktop App Converter (AKA Desktop Bridge) and our publisher name has a comma, space and period in it. eg. CN="Acme, Inc." This does not work: DesktopAppConverter.exe -Installer .\Installer.msi -Destination AppxFolder…
3
votes
1 answer

Makecert problem under Windows 7

I'm creating a certificate to use with an SslStream, and I've been doing it this way under XP: makecert -r -pe -n "CN=aName" -ss my -sr localmachine -sky exchange -sp "Microsoft RSA SChannel Cryptographic Provider" -sy 12 server.cer If I…
TimK
  • 7,438
  • 10
  • 40
  • 47
1 2
3
8 9