ActiveLogin / ActiveLogin.Authentication

Support Swedish BankID (svenskt BankID) authentication in .NET. Unofficial package, not created by BankID.
https://activelogin.net
MIT License
216 stars 75 forks source link

AzureKeyVaultCertificateClient fails on Macos #407

Closed erikbarke closed 1 year ago

erikbarke commented 1 year ago

Describe the bug When developing on Macos, IBankIdBuilder.UseClientCertificateFromAzureKeyVault fails with MAC verification failed during PKCS12 import (wrong password?) because Macos doesn't accept an empty string as a password. However, passing null instead of string.empty in https://github.com/ActiveLogin/ActiveLogin.Authentication/blob/main/src/ActiveLogin.Authentication.BankId.AzureKeyVault/AzureKeyVaultCertificateClient.cs#L72 resolves the problem.

What area is it related to API

To Reproduce Use the API on Macos and try to start a signing with BankId using a certificate from Azure Key Vault.

Expected behavior The signing process should start.

NuGet package version 5.0.0

Runtime version Dotnet Core 6.0.408

Desktop (please complete the following information):

Smartphone (please complete the following information): N/A

Additional context The fix has been tested on Macos and Windows.

PeterOrneholm commented 1 year ago

Thank you! I can confirm that null seems to be what should have been passed. Are you up for a PR to fix this?

erikbarke commented 1 year ago

Yeah, I'll get back with a PR 🙂