# 使用 Homebrew, apk, dnf, MacPorts, Nix, pacman, zypper 安装 softhsm

查看 softhsm 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:softhsm
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install softhsm
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install softhsm
```

  证据: MacPorts ports tree: security/softhsm/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add softhsm
```

  证据: Alpine Linux edge package indexes: softhsm from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz

- dnf (92%):

```sh
sudo dnf install softhsm
```

  证据: Fedora Rawhide package metadata: softhsm from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#softhsm
```

  证据: nixpkgs package indexes: pkgs/by-name/so/softhsm/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S softhsm
```

  证据: Arch Linux sync databases: softhsm from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install softhsm
```

  证据: openSUSE Tumbleweed package metadata: softhsm from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

## 软件包事实

- **软件包键:** brew:softhsm
- **软件包管理器:** Homebrew
- **版本:** 2.7.0
- **来源摘要:** Cryptographic store accessible through a PKCS#11 interface
- **主页:** <https://www.softhsm.org/>
- **仓库:** <https://github.com/softhsm/SoftHSMv2>
- **最后更新:** 2026-07-05T00:14:30+09:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- softhsm2-dump-file (别名)
- softhsm2-keyconv (别名)
- softhsm2-util (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 2.7.0
## 项目历史与用法

SoftHSM is a software implementation of a cryptographic token store exposed through PKCS#11, originally created for OpenDNSSEC and later maintained as a standalone security project.

### 项目历史

The official SoftHSM site and README both state that SoftHSM began as part of the OpenDNSSEC project. OpenDNSSEC needed to store and handle cryptographic keys through PKCS#11, but requiring a physical hardware security module would have limited who could test or deploy the system.

SoftHSM answered that problem with a software implementation of a generic cryptographic device. Version 2 became the current line, adding stronger handling of sensitive material, unswappable memory support, and a more general crypto backend that can use Botan or OpenSSL.

The SoftHSMv2 GitHub repository was created in 2013 and remains active under the softhsm organization, while the project website points users to GitHub for source code and bug reporting.

### 采用历史

SoftHSM spread beyond OpenDNSSEC because PKCS#11 is a shared interface used by many cryptographic applications. The README explicitly notes that SoftHSM can work with other cryptographic products through that interface.

The package is carried by Homebrew, Alpine, Fedora, MacPorts, Nix, Arch, and openSUSE according to the input package facts, which fits its role as a test and development HSM substitute on Unix-like systems.

### 使用方式

Users install the library and command-line utilities, configure the token storage path in softhsm2.conf, initialize tokens with softhsm2-util --init-token, and then point PKCS#11-aware software at the SoftHSM module.

The default configuration file is /etc/softhsm2.conf, and the README documents SOFTHSM2_CONF as an override. Token backup is ordinary file backup of the configured token storage location.

### 为什么软件包爱好者会关心

SoftHSM is important to package maintainers because it makes PKCS#11 integration testable without special hardware. That matters for DNSSEC software, TLS tooling, signing infrastructure, CI systems, and applications that support smart cards or hardware security modules.

It is also a classic dependency-package artifact: most users care that the shared module, config file, utility commands, crypto backend, and p11-kit integration land in expected filesystem locations.

### 时间线

- 2000s: SoftHSM is developed as part of OpenDNSSEC to provide a software PKCS#11 device.
- 2013: SoftHSMv2 GitHub repository is created.
- 2010s: SoftHSM version 2 becomes the main documented line with Botan/OpenSSL backend support.
- 2020s: SoftHSM continues as a standalone project with packages across Unix-like package managers.

### Related projects

- OpenDNSSEC: the project SoftHSM was originally built to support.
- PKCS#11: the cryptographic token interface SoftHSM implements.
- Botan and OpenSSL: supported cryptographic backends.
- p11-kit: system integration layer relevant to installing PKCS#11 modules.

### 来源

- current_curation.config-file-location
- <https://api.github.com/repos/softhsm/SoftHSMv2>
- <https://opendnssec.readthedocs.io/en/latest/softhsm2/>
- <https://raw.githubusercontent.com/softhsm/SoftHSMv2/develop/README.md>
- <https://www.softhsm.org/>
- <https://www.softhsm.org/background.html>
- source_facts.package-manager


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: /etc/softhsm2.conf
## 其他软件包管理器记录

- Nix - softhsm: normalized package name match | nixpkgs package indexes: pkgs/by-name/so/softhsm/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - softhsm - 2.7.0-r0: normalized package name match | Alpine Linux edge package indexes: softhsm from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | cryptographic store accessible through a PKCS #11 | https://github.com/softhsm/SoftHSMv2
- apk - softhsm-doc - 2.7.0-r0: normalized package name match | Alpine Linux edge package indexes: softhsm-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | cryptographic store accessible through a PKCS #11 (documentation) | https://github.com/softhsm/SoftHSMv2
- apk - softhsm-static - 2.7.0-r0: normalized package name match | Alpine Linux edge package indexes: softhsm-static from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | cryptographic store accessible through a PKCS #11 (static library) | https://github.com/softhsm/SoftHSMv2
- dnf - softhsm - 2.7.0-2.fc45: normalized package name match | Fedora Rawhide package metadata: softhsm from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Software version of a PKCS#11 Hardware Security Module | http://www.softhsm.org/
- dnf - softhsm-devel - 2.7.0-2.fc45: normalized package name match | Fedora Rawhide package metadata: softhsm-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Development package of softhsm that includes the header files | http://www.softhsm.org/
- pacman - softhsm - 2.7.0-1: normalized package name match | Arch Linux sync databases: softhsm from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Software PKCS#11 store | https://opendnssec.readthedocs.io/en/latest/softhsm2/
- zypper - softhsm - 2.6.1+git.1732869438.f7883c2-2.6: normalized package name match | openSUSE Tumbleweed package metadata: softhsm from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Software version of a PKCS#11 Hardware Security Module | https://www.opendnssec.org/
- zypper - softhsm-devel - 2.6.1+git.1732869438.f7883c2-2.6: normalized package name match | openSUSE Tumbleweed package metadata: softhsm-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Development package of softhsm | https://www.opendnssec.org/
- MacPorts - softhsm: normalized package name match | MacPorts ports tree: security/softhsm/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/softhsm.yml](https://github.com/mxcl/pkgdb/blob/main/combined/softhsm.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
