Skip to content

[PM-13984] Added Futurex to list of supported PKCS #11 providers #187

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ Use a physical HSM device with the PKCS11 provider.

```
keyConnectorSettings__rsaKey__provider=pkcs11
# Available providers: yubihsm, opensc
# Available providers: yubihsm, opensc, futurex
keyConnectorSettings__rsaKey__pkcs11Provider={Provider}
keyConnectorSettings__rsaKey__pkcs11SlotTokenSerialNumber={TokenSerialNumber}
# Available user types: user, so, context_specific
Expand Down
1 change: 1 addition & 0 deletions src/KeyConnector/KeyConnectorSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public class RsaKeySettings
// Providers:
// yubihsm
// opensc
// futurex
public string Pkcs11Provider { get; set; }
public string Pkcs11LibraryPath { get; set; }
public string Pkcs11SlotTokenSerialNumber { get; set; }
Expand Down
1 change: 1 addition & 0 deletions src/KeyConnector/Services/Pkcs11/Pkcs11RsaKeyService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ private IPkcs11Library LoadLibrary()
{
"yubihsm" => "/usr/lib/x86_64-linux-gnu/pkcs11/yubihsm_pkcs11.so",
"opensc" => "/usr/lib/x86_64-linux-gnu/opensc-pkcs11.so",
"futurex" => "/usr/lib/x86_64-linux-gnu/fxpkcs11/libfxpkcs11.so",
_ => throw new Exception("Please provide a library path or known provider.")
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ public async Task DecryptAsync_LogsOutOfSession_GivenValidData()
[Theory]
[InlineData("yubihsm", "/usr/lib/x86_64-linux-gnu/pkcs11/yubihsm_pkcs11.so")]
[InlineData("opensc", "/usr/lib/x86_64-linux-gnu/opensc-pkcs11.so")]
[InlineData("futurex", "/usr/lib/x86_64-linux-gnu/fxpkcs11/libfxpkcs11.so")]
public async Task DecryptAsync_UsesCorrectProviderPath_WhenLoadingLibrary(string provider, string path)
{
// Create mocks
Expand Down Expand Up @@ -398,6 +399,7 @@ public async Task SignAsync_LogsOutOfSession_GivenValidData()
[Theory]
[InlineData("yubihsm", "/usr/lib/x86_64-linux-gnu/pkcs11/yubihsm_pkcs11.so")]
[InlineData("opensc", "/usr/lib/x86_64-linux-gnu/opensc-pkcs11.so")]
[InlineData("futurex", "/usr/lib/x86_64-linux-gnu/fxpkcs11/libfxpkcs11.so")]
public async Task SignAsync_UsesCorrectProviderPath_WhenLoadingLibrary(string provider, string path)
{
// Create mocks
Expand Down
Loading