Skip to content

Commit

Permalink
Format UUID strings correctly
Browse files Browse the repository at this point in the history
Prior to this patch although GlobalPlatform specifies that TAs and such
are identified with UUIDs, we don't format them quite right when turning
them into strings. Per https://www.ietf.org/rfc/rfc4122.txt, there
should be another hyphen after the first two bytes of clockSeqAndNode.

Unfortunately, fixing this breaks compatibility between how TAs are
built, and when the OS loads them.

With this patch UUID string are formated with the additional hyphen as
for instance: f81d4fae-7dec-11d0-a765-00a0c91e6bf6

Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Fixes: OP-TEE/optee_os#857
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
  • Loading branch information
jenswi-linaro committed Dec 9, 2016
1 parent 731f8a7 commit ce5fefe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tee-supplicant/src/teec_ta_load.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ static int try_load_secure_module(const char* prefix,
}

n = snprintf(fname, PATH_MAX,
"%s/%s/%08x-%04x-%04x-%02x%02x%02x%02x%02x%02x%02x%02x.ta",
"%s/%s/%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x.ta",
prefix, dev_path,
destination->timeLow,
destination->timeMid,
Expand Down

0 comments on commit ce5fefe

Please sign in to comment.