Fix certrevoke bugs

This commit is contained in:
Zhi Guan
2023-02-14 23:19:18 +08:00
parent a8976d6a3e
commit 4466a56ae2
3 changed files with 14 additions and 7 deletions

View File

@@ -41,7 +41,7 @@ int file_read_all(const char *file, uint8_t **out, size_t *outlen)
size_t fsize;
uint8_t *buf = NULL;
if (!(fp = fopen(file, "r"))
if (!(fp = fopen(file, "rb"))
|| file_size(fp, &fsize) != 1
|| (buf = malloc(fsize)) == NULL) {
error_print();