Benign rust 2,699 installs Download

smartcardhsm_pkcs11_loader 5.22.1

“Smart card HSM PKCS#11 loader”

Basename is uppercase README.mdCaret or XOR expression text
SHA-25698908e62bcb48ce1edbede081d11d09ba32b8a82700fb155d4f9581ffe6bee70

Evidence

References a public code-forge URL README.md · lines 1–17
⋯4 lines
5## Installing SmartCard HSM
6
7Follow the instructions at <https://github.com/CardContact/sc-hsm-embedded>.
8
9## Running the KMS server
10
11Use the provided `kms.toml` file to run the KMS server with the SmartCard PKCS#11 library.
12
13From the KMS root directory, run the following command:
14
15```bash
16COSMIAN_KMS_CONF=crate/hsm/smartcardhsm/kms.toml cargo run --bin cosmian_kms --features non-fips
17```
imports cosmian_kms_base_hsm::hsm_capabilities::HsmCapabilities lib.rs · lines 1–40
1//! Copyright 2024 Cosmian Tech SAS
2
3use cosmian_kms_base_hsm::hsm_capabilities::{HsmCapabilities, HsmProvider};
4
5/// Path to the `SmartcardHSM` `PKCS#11` shared library
6pub const SMARTCARDHSM_PKCS11_LIB: &str = "/usr/local/lib/libsc-hsm-pkcs11.so";
7
8#[cfg(test)]
9#[allow(clippy::expect_used)]
10// Allow test-specific lint patterns for C library integration
11#[allow(unsafe_code)]
12#[allow(clippy::panic_in_result_fn)]
⋯28 lines
imports libloading::Library tests.rs · lines 4–21
4:120… s::test_hsm_smartcardhsm_all
5//! ```
6
7use std::{collections::HashMap, ptr};
8
9use cosmian_kms_base_hsm::{
10 HResult, RsaOaepDigest,
11 test_helpers::{get_hsm_password, get_hsm_slot_id},
12 tests_shared as shared,
13};
14use libloading::Library;
15use pkcs11_sys::{CK_C_INITIALIZE_ARGS, CK_RV, CK_VOID_PTR, CKF_OS_LOCKING_OK, CKR_OK};
16
17use crate::{SMARTCARDHSM_PKCS11_LIB, SmartcardHsmCapabilityProvider};
18
19const SLOT_ID: usize = 0x01; // SmartcardHSM default slot
20
21fn cfg() -> HResult<shared::HsmTestConfi …
Rust synchronous or async test attribute tests.rs · lines 28–36
⋯4 lines
32}
33
34#[test]
35#[ignore = "Requires Linux, SmartcardHSM PKCS#11 library, and HSM environment"]
36fn test_hsm_smartcardhsm_all() -> HResult<()> { …
assert_eq! macro tests.rs · lines 80–87
80:39… *const CK_C_INITIALIZE_ARGS as CK_VOID_PTR);
81 assert_eq!(rv, CKR_OK);
82
83 Ok(())
⋯4 lines

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.