Added chmod for config file

This commit is contained in:
aewens 2019-01-03 10:09:55 -06:00
parent 2dea9a1cea
commit 6353678653
1 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
from os import system, popen, makedirs
from os import system, popen, makedirs, chmod
from os.path import exists, dirname, isfile, realpath
from sys import exit
from errno import EEXIST
@ -53,6 +53,7 @@ class SSLCA:
self.config.set("defaults", "days", days)
with open(config_file, "w+b") as cfgfile:
self.config.write(cfgfile)
chmod(config_file, 0700)
print("\nConfig file generated at: %s" % config_file)
self.config.read(config_file)