PKCSTOK_MIGRATE(1)
π PKCSTOK_MIGRATE(1) π
okay bestie, welcome to pkcstok_migrate, a lil utility from openCryptoki that migrates your ICA, CCA, Soft, or EP11 token repository over to the FIPS compliant format that showed up in openCryptoki 3.12. glow-up time fr fr β¨
πΈ SYNOPSIS πΈ
pkcstok_migrate [-h]
pkcstok_migrate --slotid slot-number --datastore datastore --confdir
confdir [--sopin sopin] [--userpin userpin] [--verbose level]
π¦ DESCRIPTION π¦
So like. This tool converts all the objects inside a token repository to the new format that landed with version 3.12. And the whole point? All the encrypted data in the new format is stored using FIPS compliant methods. periodt. π
The new format touches:
- the token's master key files (
MK_SOandMK_USER) - the
NVTOK.DAT - the token object files in the
TOK_OBJfolder
β οΈ While you're using this tool, no process using the token to be migrated may be running. Especially the pkcsslotd must be stopped before running this tool. like, actually stopped. not "stopped" with a vibe. π
Here's the cute part: the tool creates a backup of the token repository it's about to migrate, and it performs all migration actions on that backup. The original repository folder stays completely untouched. icon behavior honestly π«Ά
The backup folder lives in the same directory as the original repository, and it's suffixed with _PKCSTOK_MIGRATE_TMP.
After a successful migration:
- the original repository gets renamed with a suffix of
_BAK - the backup folder gets renamed to the original repository name
so the migrated repository can be used immediately. no waiting. The old folder can be deleted by you manually later β your call, bestie. π
After a successful migration, the tool also adds the parameter tokversion = 3.12 to the token's slot configuration in the opencryptoki.conf file. The original config file is still available as opencryptoki.conf_BAK and may be removed by the user manually.
After an unsuccessful migration, the original repository is still available unchanged. we love a safety net. π§
And yeah β the pkcstok_migrate utility must be run as root. π
β¨ OPTIONS SUMMARY β¨
--slotid,-s_SLOT-NUMBER_ β specifies the token slot number of the token repository to be migrated--datastore,-d_DATASTORE_ β specifies the directory of the token repository to be migrated--confdir,-c_CONFDIR_ β specifies the directory where theopencryptoki.conffile is located--sopin,-p_SOPIN_ β specifies the SO pin. If not specified, the SO pin is prompted. π--userpin,-u_USERPIN_ β specifies the user pin. If not specified, the user pin is prompted. π--verbose,-v_LEVEL_ β specifies the verbose level:none,error,warn,info,devel,debug--help,-hβ show usage information
π SEE ALSO π
okay that's the whole page bestie!! this was 3.27.0, dated June 2020, and it's the PKCSTOK_MIGRATE(1) page from openCryptoki. go migrate that token, you absolute legend πβ¨
π¦ where this page comes from
- centos-stream 10: opencryptoki 3.27.0-1.el10 Β· CPL-1.0
- centos-stream 9: opencryptoki 3.27.0-1.el9 Β· CPL-1.0
- fedora 44: opencryptoki 3.27.0-1.fc44 Β· CPL-1.0
- opensuse-leap 16.0: openCryptoki 3.27.0-160000.2.1 Β· CPL-1.0
- opensuse-leap 16.0: openCryptoki 3.27.0-160000.2.1 Β· CPL-1.0
- opensuse-leap 16.0: openCryptoki 3.27.0-160000.2.1 Β· CPL-1.0
- opensuse-leap 16.0: openCryptoki 3.27.0-160000.2.1 Β· CPL-1.0
- ubuntu stonking: opencryptoki 3.27.0+dfsg-0ubuntu2 Β· CPL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms