dotnet / dotnet/deployment-tools

dotnet-mage gets caught in an infinite loop when NCryptEnumKeys is not implemented by the crypto provider.

Open
#309 0 comments 0 reactions 0 assignees View on GitHub
area-ClickOnce
Dominant language
C#
Stars
213
Forks
73
Avg merge
1d 21h
Merged PRs (30d)
4

Description

### Description
The crypto provider function `NCryptEnumKeysFn` is optional and may respond with `NTE_NOT_SUPPORTED`. Using dotnet-mage with such a crypto provider traps the application in the while loop of the `Certificate.GetContainersFromCngProvider` method.

### Configuration
I am using dotnet-mage 7.0.0 on Windows 10 with a custom KSP implementation like this:
`dotnet-mage -Sign TestClickOnce.exe.manifest -CertFile .\ACME.cer -CryptoProvider "MyKSP" -KeyContainer "MyKeyContainer"`

### Regression?
I don't think so.

### Other information
None

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.