aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatarLibravatar daurnimator <quae@daurnimator.com> 2016-11-07 23:09:08 +1100
committerLibravatarLibravatar daurnimator <quae@daurnimator.com> 2016-11-07 23:09:08 +1100
commit79ce69e01bf377ae26a3d40ea37454339def94bd (patch)
tree527087485d2049702d664b52314750ae2f32d3bb /src
parent938ffdf8c30cb88e4ece27031a2c18cedf9da722 (diff)
downloadluaossl-79ce69e01bf377ae26a3d40ea37454339def94bd.tar.gz
luaossl-79ce69e01bf377ae26a3d40ea37454339def94bd.tar.bz2
luaossl-79ce69e01bf377ae26a3d40ea37454339def94bd.zip
openssl.x509.store: Expose cert dir and cert file constants
Diffstat (limited to 'src')
-rw-r--r--src/openssl.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/openssl.c b/src/openssl.c
index 7c3f32f..5ee969a 100644
--- a/src/openssl.c
+++ b/src/openssl.c
@@ -6905,6 +6905,15 @@ int luaopen__openssl_x509_store(lua_State *L) {
auxL_newlib(L, xs_globals, 0);
+ lua_pushstring(L, X509_get_default_cert_dir());
+ lua_setfield(L, -2, "CERT_DIR");
+ lua_pushstring(L, X509_get_default_cert_file());
+ lua_setfield(L, -2, "CERT_FILE");
+ lua_pushstring(L, X509_get_default_cert_dir_env());
+ lua_setfield(L, -2, "CERT_DIR_EVP");
+ lua_pushstring(L, X509_get_default_cert_file_env());
+ lua_setfield(L, -2, "CERT_FILE_EVP");
+
return 1;
} /* luaopen__openssl_x509_store() */