acmecert: Set a secure umask when writing account file.
[utils.git] / acmecert
index 076bbda..6136eaa 100755 (executable)
--- a/acmecert
+++ b/acmecert
@@ -309,6 +309,7 @@ commands = {}
 def cmd_reg(args):
     "usage: acmecert reg [OUTPUT-FILE]"
     acct = register()
+    os.umask(0o077)
     with maybeopen(args[1] if len(args) > 1 else "-", "w") as fp:
         acct.write(fp)
 commands["reg"] = cmd_reg