An open API service indexing awesome lists of open source software.

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.

Awesome Lists containing this project

README

          


Certificate Manager

![Version](https://img.shields.io/github/v/tag/Aetherinox/certmgr?logo=GitHub&label=version&color=ba5225) ![Downloads](https://img.shields.io/github/downloads/Aetherinox/certmgr/total) ![Repo Size](https://img.shields.io/github/repo-size/Aetherinox/certmgr?label=size&color=59702a) ![Last Commit)](https://img.shields.io/github/last-commit/Aetherinox/certmgr?color=b43bcc)

---


# 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