Skip to content

Commit 3cf71d1

Browse files
wjablon1kv2019i
authored andcommitted
lib_manager: align auth result checks with newer API
With newer authentication API of ROM_EXT, the authentication result is provided only after the last phase. This change aligns SOF FW to this behavior. The change is backward compatible with older API versions. Signed-off-by: Wojciech Jablonski <wojciech.jablonski@intel.com>
1 parent bd296e4 commit 3cf71d1

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/library_manager/lib_manager.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,16 +110,17 @@ static int lib_manager_auth_proc(const void *buffer_data, size_t buffer_size,
110110
while (auth_api_busy(auth_ctx))
111111
;
112112

113+
if (phase != AUTH_PHASE_LAST)
114+
return 0;
115+
113116
ret = auth_api_result(auth_ctx);
117+
auth_api_cleanup(auth_ctx);
114118

115119
if (ret != AUTH_IMAGE_TRUSTED) {
116120
tr_err(&lib_manager_tr, "Untrusted library!");
117121
return -EACCES;
118122
}
119123

120-
if (phase == AUTH_PHASE_LAST)
121-
auth_api_cleanup(auth_ctx);
122-
123124
return 0;
124125
}
125126
#endif /* CONFIG_LIBRARY_AUTH_SUPPORT */

0 commit comments

Comments
 (0)