Skip to content

feat: add configuration file to provider#115

Closed
walterchris wants to merge 5 commits intodevfrom
feat/addConfigurationFile
Closed

feat: add configuration file to provider#115
walterchris wants to merge 5 commits intodevfrom
feat/addConfigurationFile

Conversation

@walterchris
Copy link
Collaborator

No description provided.

Base automatically changed from feat/addStorageProvider to dev February 2, 2026 16:10
@walterchris walterchris force-pushed the feat/addConfigurationFile branch from 5b407a5 to 6eacdd7 Compare February 2, 2026 19:19
@mhatrevi mhatrevi requested a review from Copilot February 4, 2026 16:37
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds configuration file support to the Azure IoT HSM OpenSSL provider, allowing users to configure credential and key file paths via OpenSSL configuration files instead of using only hardcoded defaults.

Changes:

  • Adds support for loading HSM credentials (ID and PIN) from configurable file paths instead of hardcoded values
  • Implements configuration parsing from OpenSSL config files with default fallbacks
  • Refactors the AZIHSM_CONFIG structure to use dynamically allocated paths instead of fixed-size buffers

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
plugins/ossl_prov/src/azihsm_ossl_hsm.c Adds load_credentials_from_file function and azihsm_config_free function; updates azihsm_open_device_and_session to load credentials from files
plugins/ossl_prov/src/azihsm_ossl_base.c Implements parse_provider_config and strip_file_prefix functions; updates OSSL_provider_init to parse configuration before device initialization
plugins/ossl_prov/inc/azihsm_ossl_hsm.h Adds AZIHSM_CONFIG structure definition, default path macros, and configuration parameter names
plugins/ossl_prov/inc/azihsm_ossl_base.h.in Removes AZIHSM_CONFIG and related macros (moved to azihsm_ossl_hsm.h); updates CMake version variable name
plugins/ossl_prov/inc/azihsm_ossl_base.h Removes AZIHSM_CONFIG and related macros; updates hardcoded version string to "1.0.0"

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 9 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@walterchris walterchris force-pushed the feat/addConfigurationFile branch 2 times, most recently from f0d428e to 8ecacca Compare February 6, 2026 19:09
Signed-off-by: Christian Walter <christian.walter@9elements.com>
Signed-off-by: Christian Walter <christian.walter@9elements.com>
…validation

Add support for configuring the API revision via openssl.cnf using the
'azihsm-api-revision' parameter.

Signed-off-by: Christian Walter <christian.walter@9elements.com>
…riables

Add support for configuring credentials file paths via environment
variables. Credentials are intentionally not configurable via
openssl.cnf for security reasons.

Signed-off-by: Christian Walter <christian.walter@9elements.com>
@walterchris walterchris force-pushed the feat/addConfigurationFile branch from 8ecacca to aa3b327 Compare February 9, 2026 13:26
Signed-off-by: Christian Walter <christian.walter@9elements.com>
/* 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"
Copy link
Contributor

@mhatrevi mhatrevi Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to add following to the config:

  1. Caller OBK
  2. Caller POTA endorsement (pub key; signature)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The 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.

@walterchris
Copy link
Collaborator Author

walterchris commented Feb 13, 2026

Also add Session Seed. (need confirmation)

@jenstopp
Copy link
Collaborator

Will continue this in #220 as this was lying around for some while, and many things on dev and main have changed.
I picked the respective commits of the branch and applied it to a fresh one with the necessary adaptations.
That was more straightforward than rebasing this one.

@mhatrevi mhatrevi marked this pull request as draft February 27, 2026 16:33
@jenstopp
Copy link
Collaborator

jenstopp commented Mar 4, 2026

Work continued in #220

@jenstopp jenstopp closed this Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants