summaryrefslogtreecommitdiff
path: root/ext/openssl/ossl_x509cert.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-11-14 13:06:51 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-11-14 13:06:51 +0000
commitb848d4f9c8859ad2d37c9523759366d9b24f0464 (patch)
treeeb65ff07c510201f05c3fc9d3cbf40cc372b26aa /ext/openssl/ossl_x509cert.c
parent158a828c97ac00799533d942f90a31f712b9290a (diff)
* ext/openssl/ossl_pkey.c (ossl_pkey_new_from_file): set close-on-exec
flag. * ext/openssl/ossl_x509cert.c (rb_fd_fix_cloexec): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/ossl_x509cert.c')
-rw-r--r--ext/openssl/ossl_x509cert.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/openssl/ossl_x509cert.c b/ext/openssl/ossl_x509cert.c
index b71025e..3093d60 100644
--- a/ext/openssl/ossl_x509cert.c
+++ b/ext/openssl/ossl_x509cert.c
@@ -66,6 +66,7 @@ ossl_x509_new_from_file(VALUE filename)
if (!(fp = fopen(RSTRING_PTR(filename), "r"))) {
ossl_raise(eX509CertError, "%s", strerror(errno));
}
+ rb_fd_fix_cloexec(fileno(fp));
x509 = PEM_read_X509(fp, NULL, NULL, NULL);
/*
* prepare for DER...