I created a self-signed certificate that I then loaded into the Trusted Root Certification Authorities folder. This certificate acts as a trusted root for websites on my workstation. I am using makecert.exe
to create certificates issued from that root certificate for each website and API that I host locally. Everything worked fine, until I imported my staging environment's self-signed trusted root certificate onto my workstation. I now have two certificates whose common names are, indeed, different. From the Issuer
property of each certificate in MMC
:
CN = MyComp Inc. Root Certificate Authority
CN = MyComp Inc. Root Certificate Authority - Staging
As soon as I imported my staging certificate, makecert.exe
started failing with this error:
There are more than one matching certificate in the issuer's Root cert store
Here is the exact makecert.exe
command line:
makecert.exe -pe -ss My -sr LocalMachine -n "CN=mysite.local, OU=Development" -is Root -ir LocalMachine -in "MyComp Inc. Root Certificate Authority" -sp "Microsoft RSA SChannel Cryptographic Provider" -sy 12 -a sha512 -e "01/01/2020" -sky exchange -eku 1.3.6.1.5.5.7.3.1
To my eyes, it seems that makecert.exe
is performing a "contains" when it searches for certificates matching the specified common name in the -is
parameter, rather than an exact match.
Is there a workaround to this issue? Am I doing something wrong?