aboutsummaryrefslogtreecommitdiffstats
path: root/main/lua-ossl/0002-CRL-extensions.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/lua-ossl/0002-CRL-extensions.patch')
-rw-r--r--main/lua-ossl/0002-CRL-extensions.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/main/lua-ossl/0002-CRL-extensions.patch b/main/lua-ossl/0002-CRL-extensions.patch
new file mode 100644
index 0000000000..3a8182e2d8
--- /dev/null
+++ b/main/lua-ossl/0002-CRL-extensions.patch
@@ -0,0 +1,43 @@
+From 4994ce80890d6a1af30bb539085bd02ff8e7e68a Mon Sep 17 00:00:00 2001
+From: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
+Date: Thu, 14 May 2015 11:59:20 +0300
+Subject: [PATCH 2/5] CRL extensions
+
+---
+ src/openssl.c | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+diff --git a/src/openssl.c b/src/openssl.c
+index 4f89859..941da9b 100644
+--- a/src/openssl.c
++++ b/src/openssl.c
+@@ -4334,6 +4334,18 @@ error:
+ } /* xx_add() */
+
+
++static int xx_addExtension(lua_State *L) {
++ X509_CRL *crl = checksimple(L, 1, X509_CRL_CLASS);
++ X509_EXTENSION *ext = checksimple(L, 2, X509_EXT_CLASS);
++
++ if (!X509_CRL_add_ext(crl, ext, -1))
++ return auxL_error(L, auxL_EOPENSSL, "x509.crl:addExtension");
++
++ lua_pushboolean(L, 1);
++
++ return 1;
++} /* xx_addExtension() */
++
+ static int xx_sign(lua_State *L) {
+ X509_CRL *crl = checksimple(L, 1, X509_CRL_CLASS);
+ EVP_PKEY *key = checksimple(L, 2, PKEY_CLASS);
+@@ -4412,6 +4424,7 @@ static const luaL_Reg xx_methods[] = {
+ { "getIssuer", &xx_getIssuer },
+ { "setIssuer", &xx_setIssuer },
+ { "add", &xx_add },
++ { "addExtension", &xx_addExtension },
+ { "sign", &xx_sign },
+ { "text", &xx_text },
+ { "tostring", &xx__tostring },
+--
+2.1.0
+