https://github.com/aetherinox/certmgr
Utility allows you to install PFX keypairs for Strong Name signing inside a container. It is useful for MSBuild / Visual Studio and works as a replacement for sn.exe (Strong Name manager) and the common issue of registering keypairs with your MSBuild container.
https://github.com/aetherinox/certmgr
certificates keypairs sn-exe strong-names strongnames visual-studio vs2022 x509
Last synced: 6 months ago
JSON representation
Utility allows you to install PFX keypairs for Strong Name signing inside a container. It is useful for MSBuild / Visual Studio and works as a replacement for sn.exe (Strong Name manager) and the common issue of registering keypairs with your MSBuild container.
- Host: GitHub
- URL: https://github.com/aetherinox/certmgr
- Owner: Aetherinox
- Created: 2024-01-12T06:29:38.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-04T19:46:37.000Z (almost 2 years ago)
- Last Synced: 2025-03-09T13:03:00.547Z (over 1 year ago)
- Topics: certificates, keypairs, sn-exe, strong-names, strongnames, visual-studio, vs2022, x509
- Language: C#
- Homepage:
- Size: 655 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

Certificate Manager
   
---
# About
`certmgr` is a utility which aims to replace `sn.exe` (the Strong Name Utility).
The primary use behind it is an error that people will often find themselves running across when attempting to sign their Visual Studio projects:
> [!WARNING]
> Cannot import the following key file: your_keyfile.pfx. The key file may be password protected.
>
> To correct this, try to import the certificate again or manually install the certificate to the Strong Name CSP with the following key container name:
`VS_KEY_ABCDEF1234567000`
The above error can occur either when you're attaching a new keypair to your project, or wanting to replace / update an existing keypair.
Typically to correct this, you would utilize `sn.exe` and execute the command:
```shell
sn -i
```
However, many users (and myself) have ran across the issue that this command does not rectify the issue.
`certmgr.exe` makes registering your certificate easier by executing
```shell
./certmgr.exe --install your_keyfile.pfx "CERT_PFX_PASSWORD" VS_KEY_XXXXXXXXXXXXXXXX
```
You should then be able to successfully build your project and sign it with your new key.
Full [commands](#commands) listed below with [examples](#syntax)
---
# Dependencies
This console application has a few dependencies depending on your needs.
| Dependency | Description |
| --- | --- |
| `certutil` |
[Certutil](https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/certutil) is required for CertMgr **Delete** and **List** functionality.
Certutil should come with windows and is part of the Windows Certificate service.
You should already have it with your operating system.
|
| `signtool` |
The [Sign Tool](https://learn.microsoft.com/en-us/windows/win32/seccrypto/signtool) is required if using the CertMgr **Sign** functionality.
Can be installed from the [Windows 10 SDK / Windows 11 SDK / Windows Kit](https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/), or [Visual Studio](https://visualstudio.microsoft.com/downloads/).
|
---
# Commands
The following information displays the command syntax for certmgr.exe
### Flags
| Flag | Description |
| --- | --- |
| `-n, --info` | Show information about a specified PFX keyfile |
| `-l, --list` | List all certificates and containers |
| `-i, --install` | Install PFX keyfile and register with container |
| `-s, --sign` | Sign binary / dll with key using signtool |
| `-d, --delete` | Delete keyfile for specified container id |
| `-x, --deleteall` | Delete all keys for all containers |
### Syntax
| Command | Description |
| --- | --- |
| `certmgr -n ` | Show information about a specified PFX keyfile |
| `certmgr -i ` | Install PFX keyfile |
| `certmgr -i ` | Install PFX keyfile for Visual Studio project container |
| `certmgr -l` | List all certificates |
| `certmgr -d ` | Delete key for specified container id |
| `certmgr -x` | Delete all keys for all containers |
| `certmgr -s ` | Sign binary / dll with key using signtool |
---
# Previews
