Introduce read_file() helper, improve error reporting
authorMatthias Schiffer <mschiffer@universe-factory.net>
Sat, 16 May 2020 11:19:36 +0000 (13:19 +0200)
committerMatthias Schiffer <mschiffer@universe-factory.net>
Sat, 16 May 2020 12:47:24 +0000 (14:47 +0200)
commit854d93e2326a0c027686b0058116629002fd011f
treee1971a251ccc48442b0b235d6fac5da830f53c54
parentafc86f352bf7915f81e9d38949e91306542aadee
Introduce read_file() helper, improve error reporting

This helper simplifies handling, ensures that there are no resource
leaks, and checks for EOF more robustly.

Also introduce error reporting at all call sites to give the user some
feedback when something went wrong.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
ucert.c