OS Manuals

/usr/bin/softhsm2-util

cryptographic store accessible through a PKCS

From softhsm 2.7.0-r5 (os), captured 2026-11-05 by running softhsm2-util --help (exit 0). permalink

Support tool for PKCS#11
Usage: softhsm2-util [ACTION] [OPTIONS]
Action:
  --delete-token    Delete the token at a given slot.
                    Use with --token or --serial.
                    WARNING: Any content in token will be erased.
  -h                Shows this help screen.
  --help            Shows this help screen.
  --import <path>   Import an object from the given path.
                    Use with --import-type, --slot or --token or --serial,
                    --file-pin, --label, --id, --no-public-key, and --pin.
  --import-type <type>
                    Import object type, type may be one of:
                        keypair [default]
                            The file must be in PKCS#8 PEM format.
                        aes
                            The file must be in binary format.
                        cert
                            The file must be in X509 PEM format.
  --init-token      Initialize the token at a given slot.
                    Use with --slot or --token or --serial or --free,
                    --label, --so-pin, and --pin.
                    WARNING: Any content in token will be erased.
  --show-slots      Display all the available slots.
  --show-config <var>
                    Show configuration info, var may be one of:
                        default-pkcs11-lib
                            print the default PKCS#11 library.
  -v                Show version info.
  --version         Show version info.
Options:
  --aes             Used to tell import to use file as is and import it as AES.
                    Deprecated, use '--import-type aes'.
  --file-pin <PIN>  Supply a PIN if the file is encrypted.
  --force           Used to override a warning.
  --free            Use the first free/uninitialized token.
  --id <hex>        Defines the ID of the object. Hexadecimal characters.
                    Use with --force if multiple key pairs may share
                    the same ID.
  --label <text>    Defines the label of the object or the token.
  --module <path>   Use another PKCS#11 library than SoftHSM.
  --no-public-key   Do not import the public key.
  --pin <PIN>       The PIN for the normal user.
  --serial <number> Will use the token with a matching serial number.
  --slot <number>   The slot where the token is located.
  --so-pin <PIN>    The PIN for the Security Officer (SO).
  --token <label>   Will use the token with a matching token label.
Options (23)
OptionDescriptionSource
--delete-tokenDelete the token at a given slot.help
-hShows this help screen.help
--helpShows this help screen.help
--import pathImport an object from the given path.help
--import-type typeImport object type, type may be one of: keypair [default] The file must be in PKCS#8 PEM format.help + man
--init-tokenInitialize the token at a given slot.help
--show-slotsDisplay all the available slots.help
--show-config varShow configuration info, var may be one of: default-pkcs11-lib print the default PKCS#11 library.help
-vShow version info.help
--versionShow version info.help
--aesUsed to tell import to use file as is and import it as AES.help + man
--file-pin PINThe PIN will be used to decrypt the PKCS#8 file.help + man
--forceUse this option to override the warnings and force the given action.help + man
--freeUse the first free/uninitialized token.help + man
--id hexDefines the ID of the object.help + man
--label textDefines the label of the object or the token that will be set.help + man
--module pathUse another PKCS#11 library than SoftHSM.help + man
--no-public-keyDo not import the public key.help + man
--pin PINThe PIN for the normal user.help + man
--slot numberThe slot where the token is located.help + man
--so-pin PINThe PIN for the Security Officer (SO).help + man
--token labelWill use the token with a matching token label.help + man
--serial numberWill use the token with a matching serial number. (in the manual page but not in --help)man
Examples (2) from the manual page, untested

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.