summaryrefslogtreecommitdiff
path: root/ext/openssl/ossl_x509cert.c
diff options
context:
space:
mode:
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 b71025e145..3093d60f1f 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...