no need to open cert/key files for read

This commit is contained in:
Thordur I. Bjornsson 2015-05-08 14:41:48 +00:00
parent 9418139c76
commit 9f823f345e
1 changed files with 2 additions and 2 deletions

View File

@ -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);