acmecert: Set a secure umask when writing account file.
authorFredrik Tolf <fredrik@dolda2000.com>
Tue, 9 Nov 2021 19:37:23 +0000 (20:37 +0100)
committerFredrik Tolf <fredrik@dolda2000.com>
Tue, 9 Nov 2021 19:37:23 +0000 (20:37 +0100)
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