aboutsummaryrefslogtreecommitdiffstats
path: root/main/lua-ossl/0004-pkey.getPrivateKey-use-password-callback.patch
diff options
context:
space:
mode:
authorKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2018-07-28 22:32:18 +0300
committerKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2018-07-28 22:32:18 +0300
commitde31a9e1f26c7085cfcfc3df52d84a92f3cede96 (patch)
treee6672208ad58006c7413e85c5d48fa8e68c1f4b6 /main/lua-ossl/0004-pkey.getPrivateKey-use-password-callback.patch
parent63f7805be085d80b54a09debdf06786dac559cc4 (diff)
downloadaports-de31a9e1f26c7085cfcfc3df52d84a92f3cede96.tar.bz2
aports-de31a9e1f26c7085cfcfc3df52d84a92f3cede96.tar.xz
main/lua-ossl: support encrypted keys
Diffstat (limited to 'main/lua-ossl/0004-pkey.getPrivateKey-use-password-callback.patch')
-rw-r--r--main/lua-ossl/0004-pkey.getPrivateKey-use-password-callback.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/main/lua-ossl/0004-pkey.getPrivateKey-use-password-callback.patch b/main/lua-ossl/0004-pkey.getPrivateKey-use-password-callback.patch
new file mode 100644
index 0000000000..b9317c59a3
--- /dev/null
+++ b/main/lua-ossl/0004-pkey.getPrivateKey-use-password-callback.patch
@@ -0,0 +1,25 @@
+From a1bbc97c659e72f110f68d37c2b09ef1cf32b46a Mon Sep 17 00:00:00 2001
+From: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
+Date: Thu, 3 May 2018 21:21:16 +0300
+Subject: [PATCH 4/5] pkey.getPrivateKey: use password callback
+
+---
+ src/openssl.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/openssl.c b/src/openssl.c
+index 2e6d802..be585fe 100644
+--- a/src/openssl.c
++++ b/src/openssl.c
+@@ -4130,7 +4130,7 @@ static int pk_getPrivateKey(lua_State *L) {
+ char *str;
+ long len;
+
+- if (!PEM_write_bio_PrivateKey(bio, key, cipher, pass, pass ? strlen(pass) : 0, 0, 0))
++ if (!PEM_write_bio_PrivateKey(bio, key, cipher, NULL, 0, pem_pw_cb, pass))
+ return auxL_error(L, auxL_EOPENSSL, "pkey:getPrivateKey");
+ len = BIO_get_mem_data(bio, &str);
+ lua_pushlstring(L, str, len);
+--
+2.18.0
+