diff options
Diffstat (limited to 'meta-tpm/recipes-tpm/swtpm/files/fix_signed_issue.patch')
-rw-r--r-- | meta-tpm/recipes-tpm/swtpm/files/fix_signed_issue.patch | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/meta-tpm/recipes-tpm/swtpm/files/fix_signed_issue.patch b/meta-tpm/recipes-tpm/swtpm/files/fix_signed_issue.patch deleted file mode 100644 index 140585b..0000000 --- a/meta-tpm/recipes-tpm/swtpm/files/fix_signed_issue.patch +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | Upstream-Status: Pending | ||
2 | Signed-off-by Armin Kuster <akuster808@gmail> | ||
3 | |||
4 | Index: git/src/swtpm/ctrlchannel.c | ||
5 | =================================================================== | ||
6 | --- git.orig/src/swtpm/ctrlchannel.c | ||
7 | +++ git/src/swtpm/ctrlchannel.c | ||
8 | @@ -152,7 +152,8 @@ static int ctrlchannel_receive_state(ptm | ||
9 | uint32_t tpm_number = 0; | ||
10 | unsigned char *blob = NULL; | ||
11 | uint32_t blob_length = be32toh(pss->u.req.length); | ||
12 | - uint32_t remain = blob_length, offset = 0; | ||
13 | + ssize_t remain = (ssize_t) blob_length; | ||
14 | + uint32_t offset = 0; | ||
15 | TPM_RESULT res; | ||
16 | uint32_t flags = be32toh(pss->u.req.state_flags); | ||
17 | TPM_BOOL is_encrypted = (flags & PTM_STATE_FLAG_ENCRYPTED) != 0; | ||
18 | Index: git/src/swtpm_ioctl/tpm_ioctl.c | ||
19 | =================================================================== | ||
20 | --- git.orig/src/swtpm_ioctl/tpm_ioctl.c | ||
21 | +++ git/src/swtpm_ioctl/tpm_ioctl.c | ||
22 | @@ -303,7 +303,7 @@ static int do_save_state_blob(int fd, bo | ||
23 | numbytes = write(file_fd, pgs.u.resp.data, | ||
24 | devtoh32(is_chardev, pgs.u.resp.length)); | ||
25 | |||
26 | - if (numbytes != devtoh32(is_chardev, pgs.u.resp.length)) { | ||
27 | + if (numbytes != (ssize_t) devtoh32(is_chardev, pgs.u.resp.length)) { | ||
28 | fprintf(stderr, | ||
29 | "Could not write to file '%s': %s\n", | ||
30 | filename, strerror(errno)); | ||
31 | @@ -420,7 +420,7 @@ static int do_load_state_blob(int fd, bo | ||
32 | had_error = true; | ||
33 | break; | ||
34 | } | ||
35 | - pss.u.req.length = htodev32(is_chardev, numbytes); | ||
36 | + pss.u.req.length = htodev32(is_chardev, (uint32_t) numbytes); | ||
37 | |||
38 | /* the returnsize is zero on all intermediate packets */ | ||
39 | returnsize = ((size_t)numbytes < sizeof(pss.u.req.data)) | ||
40 | @@ -863,7 +863,7 @@ int main(int argc, char *argv[]) | ||
41 | return EXIT_FAILURE; | ||
42 | } | ||
43 | /* no tpm_result here */ | ||
44 | - printf("ptm capability is 0x%lx\n", (uint64_t)devtoh64(is_chardev, cap)); | ||
45 | + printf("ptm capability is 0x%llx\n", (long long unsigned)devtoh64(is_chardev, cap)); | ||
46 | |||
47 | } else if (!strcmp(command, "-i")) { | ||
48 | init.u.req.init_flags = htodev32(is_chardev, PTM_INIT_FLAG_DELETE_VOLATILE); | ||