forked from mirrors/kore
no need to open cert/key files for read
This commit is contained in:
parent
9418139c76
commit
9f823f345e
@ -840,7 +840,7 @@ cli_generate_certs(void)
|
||||
cli_fatal("X509_sign(): %s", ssl_errno_s);
|
||||
|
||||
(void)cli_vasprintf(&fpath, "%s/cert/server.key", rootdir);
|
||||
if ((fp = fopen(fpath, "w+")) == NULL)
|
||||
if ((fp = fopen(fpath, "w")) == NULL)
|
||||
cli_fatal("fopen(%s): %s", fpath, errno_s);
|
||||
free(fpath);
|
||||
|
||||
@ -849,7 +849,7 @@ cli_generate_certs(void)
|
||||
fclose(fp);
|
||||
|
||||
(void)cli_vasprintf(&fpath, "%s/cert/server.crt", rootdir);
|
||||
if ((fp = fopen(fpath, "w+")) == NULL)
|
||||
if ((fp = fopen(fpath, "w")) == NULL)
|
||||
cli_fatal("fopen(%s): %s", fpath, errno_s);
|
||||
free(fpath);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user