FiloSottile / FiloSottile/mkcert

CA installation in windows throwing ERROR "ERROR: add cert: Failed adding cert: The request is not supported"

Open
#176 3 comments 0 reactions 0 assignees View on GitHub
help wanted Windows
Dominant language
Go
Stars
59.6k
Forks
3.1k
PR merge metrics
No merged PRs in 30d

Description

Hi,

Thanks to mkcert for providing us a great tool for multiple environments.
Anyone, could you please give me a hint why I am getting the below error. The background is, I have a node js application which is taking help of mkcert to create a CA for Windows. While starting the nodejs app, it ended with the error

> (node:2192) UnhandledPromiseRejectionWarning: Error: Command failed: SET CAROOT=C:\Program Files (x86)\Test\cert && "C:\Program Files (x86)\Test\cert\mkcert-v1.3.0-windows-amd64.exe" -install -cert-file "C:\Program Files (x86)\Test\cert\localhost.crt" -key-file "C:\Program Files (x86)\Test\cert\localhost.key" localhost
> Created a new local CA at "C:\Program Files (x86)\Test\cert" 💥
> ERROR: add cert: Failed adding cert: The request is not supported.

Notes:

- I have customized the CARROT.
- while looking at the mkcert code, the error is thrown by truststore_windows.go at addCert, which is internally calling crypt32.dll. I am not sure what is going wrong with crypt32.dll .
@FiloSottile , could you please have a look at this.
Thanks,

Contributor guide

Open the contributing guide

Research direction

Start with truststore_windows.go at addCert and inspect its call into crypt32.dll. Reproduce the reported Windows command with the customized CAROOT and mkcert-v1.3.0 executable, then determine why certificate installation returns “The request is not supported”; done means the cause and a verified resolution are documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, node.js
Domain
operating-systems, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.