# 使用 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/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-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
- **软件包管理器页面:** <https://formulae.brew.sh/formula/softhsm>
- **版本:** 2.7.0
- **来源摘要:** Cryptographic store accessible through a PKCS#11 interface
- **主页:** <https://www.softhsm.org/>
- **仓库:** <https://github.com/softhsm/SoftHSMv2>
- **上游文档:** <https://www.softhsm.org/>
- **许可证:** BSD-2-Clause
- **源码归档:** <https://github.com/softhsm/SoftHSMv2/archive/refs/tags/2.7.0.tar.gz>
- **最后更新:** 2026-07-05T00:14:30+09:00
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

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

## 依赖

- openssl@3

## 构建依赖

- autoconf
- automake
- libtool
- pkgconf

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 2.7.0
- 管理器更新时间: 2026-07-05
- 本地数据: OK
- 上游仓库: https://github.com/softhsm/SoftHSMv2
- 检测到的最新版本: 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
## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** softhsm
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## 其他软件包管理器记录

- 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/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-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/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-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


## 相关链接

- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Security and crypto packages](https://pkg.so/zh-hans/security-crypto-tools/) - Matched security, identity, cryptography, password, signing, or certificate metadata.
- [Homebrew utility packages](https://pkg.so/zh-hans/brew-utility-packages/) - Matched Homebrew package provider.
- [openssl@3](https://pkg.so/zh-hans/brew/openssl-3/) - Runtime dependency declared by Homebrew.
- [pkgconf](https://pkg.so/zh-hans/brew/pkgconf/) - Build dependency declared by Homebrew.
- [libtool](https://pkg.so/zh-hans/brew/libtool/) - Build dependency declared by Homebrew.
- [autoconf](https://pkg.so/zh-hans/brew/autoconf/) - Build dependency declared by Homebrew.
- [automake](https://pkg.so/zh-hans/brew/automake/) - Build dependency declared by Homebrew.
- [opensc](https://pkg.so/zh-hans/brew/opensc/) - Shares pkgdb curated category or tags: cli, cryptography, pkcs11, security.
- [gnutls](https://pkg.so/zh-hans/brew/gnutls/) - Shares pkgdb curated category or tags: cli, cryptography, security.
- [p11-kit](https://pkg.so/zh-hans/brew/p11-kit/) - Shares pkgdb curated category or tags: cli, cryptography, pkcs11, security.
- [nettle](https://pkg.so/zh-hans/brew/nettle/) - Shares pkgdb curated category or tags: cli, cryptography, security.
- [nss](https://pkg.so/zh-hans/brew/nss/) - Shares pkgdb curated category or tags: cli, cryptography, security.
- [sqlcipher](https://pkg.so/zh-hans/brew/sqlcipher/) - Shares pkgdb curated category or tags: cli, cryptography, security.
- [yubico-piv-tool](https://pkg.so/zh-hans/brew/yubico-piv-tool/) - Shares pkgdb curated category or tags: cli, pkcs11, security.
- [botan](https://pkg.so/zh-hans/brew/botan/) - Shares pkgdb curated category or tags: cli, cryptography, security.
- [pkcs11-tools](https://pkg.so/zh-hans/brew/pkcs11-tools/) - Security-sensitive metadata or terminology overlaps. Shared terms: cli, cryptographic, cryptography, hsm, management.
- [gnupg-pkcs11-scd](https://pkg.so/zh-hans/brew/gnupg-pkcs11-scd/) - Security-sensitive metadata or terminology overlaps. Shared terms: cli, cryptography, openssl, openssl-3, pkcs.

## 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
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
