aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--debian/changelog8
-rw-r--r--examples/pkey.info8
-rw-r--r--src/openssl.c4
3 files changed, 20 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index fb77655..7d35ab8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+liblua-openssl (20151218-0) unstable; urgency=low
+
+ * Add :tobin method to bignums. (daurnimator)
+ * Add :getParameters method to pkeys. (daurnimator)
+ * Fix build when SSLv3 support is not present.
+
+ -- William Ahern <william@25thandClement.com> Fri, 18 Dec 2015 03:09:29 -0800
+
liblua-openssl (20150727-0) unstable; urgency=low
* More extension work from Kaarle Ritvanen.
diff --git a/examples/pkey.info b/examples/pkey.info
new file mode 100644
index 0000000..7369d2d
--- /dev/null
+++ b/examples/pkey.info
@@ -0,0 +1,8 @@
+local pkey = require"openssl.pkey"
+
+local rsa = pkey.new{ type = "RSA", bits = 512 }
+
+for k, v in pairs(rsa:getParameters()) do
+ print(k, v)
+end
+
diff --git a/src/openssl.c b/src/openssl.c
index 93e069f..afd1f61 100644
--- a/src/openssl.c
+++ b/src/openssl.c
@@ -2567,7 +2567,9 @@ static void pk_pushparam(lua_State *L, void *_key, enum pk_param which) {
RSA *rsa;
DH *dh;
DSA *dsa;
+#ifndef OPENSSL_NO_EC
EC_KEY *ec;
+#endif
} key = { _key };
switch (which) {
@@ -2647,6 +2649,7 @@ static void pk_pushparam(lua_State *L, void *_key, enum pk_param which) {
bn_dup(L, key.dh->priv_key);
break;
+#ifndef OPENSSL_NO_EC
case PK_EC_PUB_KEY: {
const EC_GROUP *group;
const EC_POINT *public_key;
@@ -2661,6 +2664,7 @@ static void pk_pushparam(lua_State *L, void *_key, enum pk_param which) {
bn_dup(L, EC_KEY_get0_private_key(key.ec));
break;
+#endif
default:
luaL_error(L, "%d: invalid EVP_PKEY parameter", which);
}