mirror of
https://github.com/FiloSottile/mkcert.git
synced 2026-04-25 05:26:03 +03:00
[PR #453] Fix access is denied issue when install on Windows #468
Labels
No labels
TLS stack issue
Windows
bug
duplicate
duplicate
enhancement
help wanted
help wanted
pull-request
question
question
root store
waiting for info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/mkcert#468
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/FiloSottile/mkcert/pull/453
Author: @Tanimodori
Created: 6/20/2022
Status: 🔄 Open
Base:
master← Head:master📝 Commits (1)
be58ee8Fix access is denied issue when install on Windows📊 Changes
1 file changed (+11 additions, -2 deletions)
View changed files
📝
truststore_windows.go(+11 -2)📄 Description
This commit fixes
-installoptions resulting inERROR: add cert: failed adding cert: Access is deniedeven on a privileged Windows command prompt.How does it works
The fix calls
CertOpenStoreinstead ofCertOpenSystemStoreWWin32 API for adding certs. The constants are extracted from here. Thanks 池边树下 for providing the solution at StackOverflow.The story
I was using
vite-plugin-mkcertwhich is a wrapper ofmkcertfor providing self-assigned CA for SSL purpose in a frontend project. Theyarn servecommand resulting in the followingmkcerterror:I found that
-installoption will cause this issue even on a privileged Windows command prompt, and there are already issues reported on that (#231, #395). So after searching for hours I've ported the solution here. Now the-installoption will works on a privileged Windows command prompt.Note
The
mkcert.exewith the fix is flagged asTrojan:Win32/Wacatac.B!mlby Windows Defender.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.