Skip to content

tpm2_ptool.py obsolete? Or uses obsolete python modules? #898

@capiman

Description

@capiman

There is

https://github.com/tpm2-software/tpm2-pkcs11/tree/master/tools

which contains tpm2_ptool.py

According to setup.py it needs:

install_requires=[
    'bcrypt',
    'cryptography>=3.0',
    'pyyaml',
    'pyasn1',
    'pyasn1_modules',
    'tpm2_pytss'

But e.g. pyyaml is show as deprecated:

https://github.com/yaml/pyyaml/wiki/PyYAML-yaml.load(input)-Deprecation

https://stackoverflow.com/questions/55677397/why-does-pyyaml-5-1-raise-yamlloadwarning-when-the-default-loader-has-been-made

Was pyyaml updated to be not more deprecated? There was a suggestion to use ruamel-yaml.

Or is there meanwhile a different way which replaces tpm2_ptool.py?

Mainly I need it for thing like this:

Once:
tpm2_ptool init --primary-auth=""

tpm2_ptool addtoken --pid=1 --label=TPMToken --userpin=1234 --so-pin=1234

tpm2_ptool addkey --label=MyTLSKey --userpin=1234 --algorithm=rsa2048 --token-label=TPMToken

Does someone have up-to-date info, before I try to get all the modules and bring it to run on a new embedded Linux platform?

And of course I want to avoid software, which is perhaps not up-to-date and brings problems with security...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions