INNER CODE UNIT · Python

do_raw

tpm2-software/tpm2-pkcs11 · tools/tpm2_pkcs11/commandlets_keys.py:434

    def do_raw(value):
        return value

    @classmethod
    def mod(cls, path, tid, key, value, inattrs, vtype):

        with Db(path) as db:
            obj = db.getobject(tid)
            if obj is None:
                sys.exit('Not found, object with id: {}'.format(tid))
        s = obj['attrs']
        obj_attrs = yaml.safe_load(s)

        # if we don't have any update data, just dump the attributes
        if not key and not inattrs:
            print(yaml.safe_dump(obj_attrs, default_flow_style=False))
            sys.exit()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…