INNER CODE UNIT · Python

commandlet

tpm2-software/tpm2-pkcs11 · tools/tpm2_pkcs11/command.py:6

class commandlet(object):
    '''Decorator class for commandlet. You can add commandlets to the tool with this decorator.'''

    @staticmethod
    def get_default_store_path():

        # always use the env variable no matter what
        if "TPM2_PKCS11_STORE" in os.environ:
            store = os.environ.get("TPM2_PKCS11_STORE")
            try:
                os.mkdir(store, 0o770)
            except FileExistsError:
                return store
            except Exception:
                # Keep trying
                pass
            # Exists, use it
            return store

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…