Commit fd399b24 authored by Natanael Copa's avatar Natanael Copa
Browse files

update-ca: insert newline between certs

There may be certificates that lack a trailing newline, which is allowed
in the certificate format. We work around that by inject a newline after
each cert.

parent 66740633
......@@ -191,6 +191,7 @@ static void proc_localglobaldir(const char *fullpath, struct hash *h, int tmpfil
fprintf(stderr, "Warning! Cannot hash: %s\n", fullpath);
if (!copyfile(fullpath, tmpfile_fd))
fprintf(stderr, "Warning! Cannot copy to bundle: %s\n", fullpath);
write(tmpfile_fd, "\n", 1);
......@@ -260,7 +261,7 @@ static bool dir_readfiles(struct hash* d, const char* path,
DIR *dp = opendir(path);
if (!dp)
return false;
struct dirent *dirp;
while ((dirp = readdir(dp)) != NULL) {
if (str_begins(dirp->d_name, "."))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment