Azure Integrated HSM (AZIHSM) SDK is a modular, cross-platform software development kit (SDK) written in Rust. This repository is home to AZIHSM SDK, its simulator, and its OpenSSL Provider.
api/- Core AZIHSM SDK implementationcrates/- Shared support librariesddi/- Device Data Interface components for interacting with AZIHSM hardwareddi/sim/- AZIHSM functional simulatorplugins/ossl_prov/- OpenSSL Provider implementationxtask/- Custom build and automation tasks
Before running any commands in this document for the first time, restore required dependencies using these steps:
For Linux systems, first install the following 4 Linux packages with the package manager of the distribution:
clang-format-18
libbsd-dev
libssl-dev
pkg-config
For both Linux and Windows systems, run the following to install all other required dependencies:
cargo xtask precheck --setupBefore running any commands below, ensure you have finished the initial setup steps.
Build the project using Cargo xtask:
cargo xtask buildBuild specific packages using:
# Build specific packages you are modifying
cargo xtask build --package <package-name>Before running any commands below, ensure you have finished the initial setup steps.
Use cargo-nextest (recommended):
# Run tests in specific packages you are modifying against simulator
cargo xtask nextest --features mock --package <package-name>Before running any commands below, ensure you have finished the initial setup steps.
Always run formatting checks before committing:
cargo +nightly xtask fmt --fixIt auto fixes formatting issues. This ensures all source code follows rustfmt standards.
Always run copyright checks before committing:
cargo xtask copyright --fixIt auto fixes copyright issues. This ensures all source code has correct copyright headers.
Before running any commands below, ensure you have finished the initial setup steps.
You can run all checks (setup, build, formatting, copyright, linting, tests, code coverage etc.) against simulator with:
cargo xtask precheck --allIt will run all necessary checks to ensure code quality before committing. It will not auto fix linting, formatting or copyright issues.
See LICENSE for details.
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.