INNER CODE UNIT · Python
ImportCommand
tpm2-software/tpm2-pkcs11 · tools/tpm2_pkcs11/commandlets_keys.py:222
class ImportCommand(NewKeyCommandBase):
'''
Imports a rsa key to a token within a tpm2-pkcs11 store.
'''
# adhere to an interface
# pylint: disable=no-self-use
def generate_options(self, group_parser):
super(ImportCommand, self).generate_options(group_parser)
group_parser.add_argument(
'--privkey',
help='Full path of the private key to be imported.\n',
required=True)
group_parser.add_argument(
'--algorithm',
help='The type of the key.\n',
choices=['rsa', 'ecc',
'hmac', # Generic hmac, actually imported as keyedhash scheme null with proper attrs.