def LocalMain(config): try: # enclave configuration is in the 'EnclaveConfig' table try: logger.debug('initialize the enclave') pdo_enclave.initialize_with_configuration( config.get('EnclaveModule')) except Error as e: logger.exception('failed to initialize enclave; %s', e) sys.exit(-1) try: data_config = config.get('ProvisioningData', {}) config["SecretsFilePath"] = GetSecretsFilePath(data_config) except Exception as e: logger.warning( 'Unable to locate or create provisioning secrets data file') sys.exit(-1) enclave_config = config.get('EnclaveData', {}) enclave = LoadEnclaveData(enclave_config) if enclave is None: enclave = CreateEnclaveData(enclave_config) enclave = CreateEnclaveData(enclave_config) assert enclave except Error as e: logger.exception('failed to initialize enclave; %s', e) sys.exit(-1) RunProvisioningService(config, enclave)
def initialize_enclave(enclave_config): """initialize_enclave -- call the initialization function on the enclave module """ pdo_enclave.initialize_with_configuration(enclave_config)