How to self generate certificate SHA-256?

Andreanta picture Andreanta · Sep 9, 2011 · Viewed 7.8k times · Source

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 algoritm not valid

If I use a SHA-1 signature with the same self certificate, it goes well. With the smartcard the same code run successfully.

What is the makecert parameter?

Answer

PAMF picture PAMF · Jun 5, 2013

The 4.5 version of makecert supports other signing algorithms such as sha256, sha384, or sha512. See makecert 4.5 (-a)