WESTCOS-TOOL(1)
π WESTCOS-TOOL π
okay bestie, welcome to westcos-tool from the OpenSC Tools fam β she's the little utility that lets you poke at data structures on westcos smart cards π
β¨ NAME β¨
westcos-tool β a utility for manipulating data structures on westcos smart cards π
πΈ SYNOPSIS πΈ
westcos-tool [OPTIONS]
π¦ DESCRIPTION π¦
so basically, the westcos-tool utility is here to manipulate the westcos data structures on 2 Ko smart cards / tokens β¨. You can create PINs, keys and certificates and store them right on the card / token. And for the operations that need it, user PIN authentication gets performed β no shortcuts, no sneaking π«Ά
π OPTIONS π
--change-pin,-nβ changes a PIN stored on the card. You will need user authentication for this one, periodt π--certificate file,-t fileβ writes the certificatefile(in PEM format, obviously π ) to the card. User authentication is required for this operation.--finalize,-fβ finalizes the card. Once it's finalized, the default key is invalidated, so the PIN and PUK cannot be changed anymore without user authentication. no take-backsies fr fr
β οΈ Warning bestie: un-finalized cards are insecure because the PIN can be changed without user authentication β knowing the default key is literally enough π please finalize your cards.
--generate-key,-gβ generates a private key on the card. The card must not have been finalized, and a PIN must be installed (i.e. the file for the PIN must have been created β see option-i). By default the key length is 2048 bits. User authentication is required for this operation π₯--help,-hβ prints the help message on screen. your little safety net π«Ά--install-pin,-iβ installs the PIN file on the card. You must provide a PIN value with-xβ no PIN, no install, sorry bestie π--key-length length,-l lengthβ changes the length of the private key. Use it with-g. match made in heaven π--overwrite-key,-oβ overwrites the key if there's already a key sitting on the card. out with the old β¨--pin-value pin,-x pin--puk-value puk,-y pukβ these options let you specify the PIN/PUK values right on the command line. If the value is set toenv:VARIABLE, then the value of the specified environment variable is used instead. By default, the code is prompted on the command line if it's needed.
π¬ note that on most operating systems, any user can display the command line of any process on the system using utilities such as ps(1). So on an unsecured system, please prefer passing the codes via an environment variable. protect your codes, protect your peace π
--read-file filename,-j filenameβ reads the filefilenamefrom the card. The file gets written on disk with namefilename. User authentication is required for this operation.--reader arg,-r argβ number of the reader to use. By default, the first reader with a present card is used. Ifargis an ATR, the reader with a matching card will be chosen π--unblock-pin,-uβ unblocks a PIN stored on the card. Knowledge of the PIN Unblock Key (PUK) is required for this operation π--verbose -vβ causeswestcos-toolto be more verbose. Specify this flag several times to enable debug output in the OpenSC library. the way that more-vequals more lore π--wait,-wβ waits for a card to be inserted. patiently, like a main character π§--write-file filename,-k filenameβ puts the file with namefilenamefrom disk to the card. On the card, the file is written infilename. User authentication is required for this operation π
π AUTHORS π
westcos-tool was written by Francois Leblanc <francois.leblanc@cev-sa.com>. iconic behavior, honestly π
okay that's the whole page, bestie π«Ά this is opensc, dated 04/19/2026 β go forth and manage your westcos cards responsibly, mwah πβ¨
π¦ where this page comes from
- fedora 43: opensc 0.27.1-2.fc43 Β· LGPL-2.1-or-later AND BSD-3-Clause
- fedora 44: opensc 0.27.1-2.fc44 Β· LGPL-2.1-or-later AND BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms