-
Notifications
You must be signed in to change notification settings - Fork 1
feat: add configuration file to provider #115
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
Closed
Closed
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
48917d3
feat: add configuration file to provider
walterchris ad4f742
fix: Add OPENSSL_strdup Null check and improve documentation
walterchris a844b5b
feat(plugins/ossl_prov): add API revision configuration with version …
walterchris aa3b327
feat(plugins/ossl_prov): support credentials paths via environment va…
walterchris d5cdeb9
fix: xtask fmt issues
walterchris File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,9 +9,47 @@ extern "C" | |
| #endif | ||
|
|
||
| #include <azihsm.h> | ||
| #include <stdint.h> | ||
|
|
||
| #include "azihsm_ossl_base.h" | ||
| /* Environment variable names for credentials paths. | ||
| * These are checked first, before falling back to hardcoded defaults. */ | ||
| #define AZIHSM_ENV_CREDENTIALS_ID_PATH "AZIHSM_CREDENTIALS_ID_PATH" | ||
| #define AZIHSM_ENV_CREDENTIALS_PIN_PATH "AZIHSM_CREDENTIALS_PIN_PATH" | ||
|
|
||
| /* Default file paths for partition keys */ | ||
| #define AZIHSM_DEFAULT_BMK_PATH "/var/lib/azihsm/bmk.bin" | ||
| #define AZIHSM_DEFAULT_MUK_PATH "/var/lib/azihsm/muk.bin" | ||
| #define AZIHSM_DEFAULT_MOBK_PATH "/var/lib/azihsm/mobk.bin" | ||
walterchris marked this conversation as resolved.
Show resolved
Hide resolved
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Need to add following to the config:
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes I think we need to overhaul the PR once #164 is merged. |
||
| #define AZIHSM_DEFAULT_CREDENTIALS_ID_PATH "/var/lib/azihsm/credentials_id.bin" | ||
walterchris marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| #define AZIHSM_DEFAULT_CREDENTIALS_PIN_PATH "/var/lib/azihsm/credentials_pin.bin" | ||
|
|
||
| /* Configuration parameter names for openssl.cnf */ | ||
| #define AZIHSM_CFG_BMK_PATH "azihsm-bmk-path" | ||
| #define AZIHSM_CFG_MUK_PATH "azihsm-muk-path" | ||
| #define AZIHSM_CFG_MOBK_PATH "azihsm-mobk-path" | ||
| #define AZIHSM_CFG_API_REVISION "azihsm-api-revision" | ||
|
|
||
| /* Supported API revision range */ | ||
| #define AZIHSM_API_REVISION_MIN_MAJOR 1 | ||
| #define AZIHSM_API_REVISION_MIN_MINOR 0 | ||
| #define AZIHSM_API_REVISION_MAX_MAJOR 1 | ||
| #define AZIHSM_API_REVISION_MAX_MINOR 0 | ||
| #define AZIHSM_API_REVISION_DEFAULT_MAJOR 1 | ||
| #define AZIHSM_API_REVISION_DEFAULT_MINOR 0 | ||
|
|
||
| /* Provider configuration structure */ | ||
| typedef struct | ||
| { | ||
| char *credentials_id_path; /* Path to credentials ID file */ | ||
| char *credentials_pin_path; /* Path to credentials PIN file */ | ||
| char *bmk_path; /* Path to BMK file */ | ||
| char *muk_path; /* Path to MUK file */ | ||
| char *mobk_path; /* Path to MOBK file */ | ||
| uint16_t api_revision_major; /* API revision major version */ | ||
| uint16_t api_revision_minor; /* API revision minor version */ | ||
| } AZIHSM_CONFIG; | ||
|
|
||
| void azihsm_config_free(AZIHSM_CONFIG *config); | ||
| void azihsm_close_device_and_session(azihsm_handle device, azihsm_handle session); | ||
| azihsm_status azihsm_open_device_and_session( | ||
| const AZIHSM_CONFIG *config, | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.