77 Commits

Author SHA1 Message Date
olszomal bf209e0fc8 Refactor SpcIndirectDataContent parsing helpers 2026-05-26 17:27:46 +02:00
olszomal 68a6826cd1 Use ASN1_STRING and ASN1_INTEGER APIs instead of direct struct access 2026-05-26 17:27:46 +02:00
Antoni Klajn 09d3312fd9 Fixed integer overflow, integer underflow and Out-of-Bounds Read 2026-02-06 11:39:49 +01:00
Michał Trojnara cbee1e723c Fixed buffer overflow while extracting msg digest
Reported and fixed by Antoni Klajn, Opera
2026-02-02 17:37:45 +01:00
Michał Trojnara d65a2b5286 Fix various typos 2025-06-19 14:18:26 +02:00
olszomal 10ca3a06ea Suppress compiler warnings 2025-05-06 10:42:53 +02:00
olszomal 776e2ec7b6 Fix memory management for ministream and difat in MSI output, CID 1639166 2025-03-31 13:19:35 +02:00
olszomal 2b3228d549 Changed error output to stderr instead of stdout 2024-06-05 16:54:21 +02:00
olszomal 3c8c74a8c3 Handled memory reallocation error 2024-06-03 14:16:39 +02:00
olszomal 771014a41e Fixed uint32_t overflow when attaching a new MSI sector 2024-06-03 14:16:39 +02:00
olszomal d0ae214cb4 Verified number of MSI sectors 2024-05-31 16:47:31 +02:00
olszomal 41b662a8fe Checked cFolders value 2024-05-31 16:47:31 +02:00
olszomal 996cf20fa9 Fixed msi dirent memory leak 2024-05-29 14:22:26 +02:00
olszomal 192e7a732b Fixed memory leaks 2024-03-01 17:50:20 +01:00
olszomal 3998bcabb2 Simplify BIO chain free up and FILE_FORMAT_CTX cleanup 2024-02-28 15:55:25 +01:00
olszomal fa40c57f80 Simplify checking whether a signature exists 2024-02-28 11:55:21 +01:00
Michał Trojnara 4576895718 Initial script (text) format support
See #37 for details.
2024-02-12 10:54:18 +01:00
olszomal f3ac2c0c6f Fix resource leak, CID 1576007 2024-01-24 09:23:55 +01:00
olszomal f22c83514c Simplify obtaining an existing signature and creating a new one 2024-01-23 19:00:22 +01:00
olszomal 44ca1f38e6 PKCS9_SEQUENCE_NUMBER authenticated attribute support 2024-01-23 19:00:22 +01:00
olszomal 64e1bba96b Add a new command extract-data to extract a PKCS#7 data content to be signed 2023-12-19 13:07:19 +01:00
olszomal 46bcaa9d88 Skip a null stream warning 2023-12-18 10:14:51 +01:00
olszomal 8a9b275494 Fixed unmap_file() segmentation fault 2023-11-21 10:54:44 +01:00
olszomal b9ca24d423 Check MsiDigitalSignatureEx 2023-11-14 10:33:04 +01:00
olszomal 6d6270094e Simplify unlinking outfile 2023-11-13 13:50:41 +01:00
olszomal 900ffed596 Enable verification that a catalog file was signed by a valid certificate.
Simplify setting and signing a content blob.
Clean up a support library.
2023-11-07 14:56:48 +01:00
Michał Trojnara 1700455533 APPX support (#303)
Co-authored-by: Maciej Panek <Maciej.panek@punxworks.com>
Co-authored-by: olszomal <Malgorzata.Olszowka@stunnel.org>
2023-09-19 21:23:32 +02:00
olszomal 5626482e82 fixed a function declaration with a void parameter 2023-09-08 11:51:20 +02:00
olszomal 2d21a2121c squash gcc debugger warnings
remove nsections>UINT16_MAX check
2023-09-08 11:51:20 +02:00
Michał Trojnara 5d2bf2c80f Fix insufficient MSI_ENTRY comparison 2023-09-04 16:10:25 +02:00
olszomal 29eedf9059 Fixed DIFAT sectors writing 2023-06-30 11:30:02 +02:00
yjh-styx 56e7a72e8a Fix timestamping nested signatures (#266) 2023-05-14 22:32:56 +02:00
Max Bagryantsev b61bcaac2e Added DIFAT sectors support (#265) 2023-05-14 20:33:57 +02:00
olszomal cb80c7d188 Initialize indata variable 2023-05-09 21:14:19 +02:00
olszomal 4199310cdf Fix indata resource leak, CID 1536896 2023-03-28 20:59:57 +02:00
Michał Trojnara 0204d04a25 Stop using tabs for indentation 2023-03-25 23:39:52 +01:00
Małgorzata Olszówka 0f51a06b8f Separate common and format-dependent functions (#241) 2023-03-25 20:32:58 +01:00
olszomal 8e74a05b40 msi_calc_digest() with FILE_HEADER parameter 2023-02-26 21:12:07 +01:00
olszomal 11eb76d4f3 Use bio_hash_data() to compute a message digest value of a CAB file 2023-02-26 21:12:07 +01:00
olszomal b0391244a6 New function bio_hash_data() 2023-02-26 21:12:07 +01:00
olszomal ff8034af2e Use BIO_f_md instead of EVP_MD_CTX to compute a message digest value of the MSI file 2023-02-26 21:12:07 +01:00
olszomal c29e14e697 Reset calculated message digest, CID 1519395 2023-01-20 10:53:49 +01:00
olszomal 4ec23dbaa5 Fix resource leak, CID 1519397 2023-01-19 17:51:35 +01:00
olszomal 695892b8bf Check sector location, CID 1519384 2023-01-19 17:50:27 +01:00
olszomal fade782e58 Fix memory leak in stream_handle(), CID 1519397, 1519388, 1519402, 1519403 2023-01-18 21:16:34 +01:00
olszomal 95a8a9d9c1 Check stream data length, CID 1519393 2023-01-18 21:03:16 +01:00
olszomal efbe570f27 Fix out-of-bounds read, CID 1519383 2023-01-15 22:35:48 +01:00
olszomal acfece2c26 Fix dereference before null check, CID 1519396 2023-01-13 12:42:24 +01:00
olszomal 7aca21b481 Use big/little-endian conversion.
Improve checksum calculation.
2022-11-28 09:26:00 +01:00
Michał Trojnara 77e63fa0cb more type conversion fixes 2022-08-12 21:56:39 +02:00