Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test_pkcs11.c: set file offset to 0 after ftruncate
Currently key and cert file fd's are reused after ftruncate() without setting the offset to zero. This causes subsequent data to be written at some finite offset with the hole in the file automatically filled by zeros. Fix it by calling lseek() to set the offset to zero. The test works nevertheless because p11tool seem to generously ignore any junk before the "BEGIN" marker. Change-Id: Ib0fe15a4ba18d89216b0288e6cd6be66ed377bd4 Signed-off-by: Selva Nair <[email protected]> Acked-by: Gert Doering <[email protected]> Message-Id: <[email protected]> URL: https://www.mail-archive.com/[email protected]/msg29010.html Signed-off-by: Gert Doering <[email protected]>
- Loading branch information