|
@@ -1,6 +1,7 @@
|
|
|
// SPDX-License-Identifier: GPL-2.0-only
|
|
|
/*
|
|
|
* Copyright (c) 2021, The Linux Foundation. All rights reserved.
|
|
|
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
|
|
*/
|
|
|
#if !IS_ENABLED(CONFIG_QSEECOM)
|
|
|
#include <linux/file.h>
|
|
@@ -277,23 +278,12 @@ static int get_root_obj(struct Object *rootObj)
|
|
|
}
|
|
|
|
|
|
/*
|
|
|
- * Get a client environment using CBOR encoded credentials
|
|
|
- * with UID of SYSTEM_UID (1000)
|
|
|
+ * Get a client environment using a NULL credentials Object
|
|
|
*/
|
|
|
int32_t get_client_env_object(struct Object *clientEnvObj)
|
|
|
{
|
|
|
int32_t ret = OBJECT_ERROR;
|
|
|
struct Object rootObj = Object_NULL;
|
|
|
- /* Hardcode self cred buffer in CBOR encoded format.
|
|
|
- * CBOR encoded credentials is created using following parameters,
|
|
|
- * #define ATTR_UID 1
|
|
|
- * #define ATTR_PKG_NAME 3
|
|
|
- * #define SYSTEM_UID 1000
|
|
|
- * static const uint8_t bufString[] = {"UefiSmcInvoke"};
|
|
|
- */
|
|
|
- uint8_t encodedBuf[] = {0xA2, 0x01, 0x19, 0x03, 0xE8, 0x03, 0x6E, 0x55,
|
|
|
- 0x65, 0x66, 0x69, 0x53, 0x6D, 0x63, 0x49, 0x6E,
|
|
|
- 0x76, 0x6F, 0x6B, 0x65, 0x0};
|
|
|
|
|
|
/* get rootObj */
|
|
|
ret = get_root_obj(&rootObj);
|
|
@@ -303,8 +293,8 @@ int32_t get_client_env_object(struct Object *clientEnvObj)
|
|
|
}
|
|
|
|
|
|
/* get client env */
|
|
|
- ret = IClientEnv_registerLegacy(rootObj, encodedBuf,
|
|
|
- sizeof(encodedBuf), clientEnvObj);
|
|
|
+ ret = IClientEnv_registerWithCredentials(rootObj,
|
|
|
+ Object_NULL, clientEnvObj);
|
|
|
if (ret)
|
|
|
pr_err("Failed to get ClientEnvObject, ret = %d\n", ret);
|
|
|
Object_release(rootObj);
|