summaryrefslogtreecommitdiffstats
path: root/func/certs.py
diff options
context:
space:
mode:
authorSeth Vidal <skvidal@fedoraproject.org>2008-01-16 10:56:20 -0500
committerSeth Vidal <skvidal@fedoraproject.org>2008-01-16 10:56:20 -0500
commit821760d6dc59cfb89dfb90095ebb85fd00307164 (patch)
tree54bb70974195f9cd81ddb803dc9c2dcbf8ecc4a2 /func/certs.py
parent0556acbe5ed39c36d38b99dd3ae455691964a1e1 (diff)
downloadthird_party-func-821760d6dc59cfb89dfb90095ebb85fd00307164.tar.gz
third_party-func-821760d6dc59cfb89dfb90095ebb85fd00307164.tar.xz
third_party-func-821760d6dc59cfb89dfb90095ebb85fd00307164.zip
apply patch from Jan Pazdziora to fix rather stupid permissions problem
Diffstat (limited to 'func/certs.py')
-rw-r--r--func/certs.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/func/certs.py b/func/certs.py
index e454cc4..bb44b0d 100644
--- a/func/certs.py
+++ b/func/certs.py
@@ -54,9 +54,9 @@ def make_csr(pkey, dest=None, cn=None):
req.set_pubkey(pkey)
req.sign(pkey, 'md5')
if dest:
- destfo = open(dest, 'w')
- destfo.write(crypto.dump_certificate_request(crypto.FILETYPE_PEM, req))
- destfo.close()
+ destfd = os.open(dest, os.O_RDWR|os.O_CREAT, 0644)
+ os.write(destfd, crypto.dump_certificate_request(crypto.FILETYPE_PEM, req))
+ os.close(destfd)
return req