diff options
Diffstat (limited to 'main/lua-ossl/0004-pkey.new-type-rename-variable.patch')
-rw-r--r-- | main/lua-ossl/0004-pkey.new-type-rename-variable.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/main/lua-ossl/0004-pkey.new-type-rename-variable.patch b/main/lua-ossl/0004-pkey.new-type-rename-variable.patch new file mode 100644 index 00000000000..522985f9165 --- /dev/null +++ b/main/lua-ossl/0004-pkey.new-type-rename-variable.patch @@ -0,0 +1,43 @@ +From f287bd7a314458a3870ee4e7fbdfc7e0ea41a4b6 Mon Sep 17 00:00:00 2001 +From: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> +Date: Sun, 2 Sep 2018 14:22:43 +0300 +Subject: [PATCH 04/10] pkey.new: type: rename variable + +--- + src/openssl.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/openssl.c b/src/openssl.c +index 9b10165..ed18e60 100644 +--- a/src/openssl.c ++++ b/src/openssl.c +@@ -4299,7 +4299,7 @@ static int pk_new(lua_State *L) { + #endif + } /* switch() */ + } else if (lua_isstring(L, 1)) { +- int type = optencoding(L, 2, "*", X509_ANY|X509_PEM|X509_DER); ++ int format = optencoding(L, 2, "*", X509_ANY|X509_PEM|X509_DER); + int pubonly = 0, prvtonly = 0; + const char *opt, *data; + size_t len; +@@ -4325,7 +4325,7 @@ static int pk_new(lua_State *L) { + if (!(bio = BIO_new_mem_buf((void *)data, len))) + return auxL_error(L, auxL_EOPENSSL, "pkey.new"); + +- if (type == X509_PEM || type == X509_ANY) { ++ if (format == X509_PEM || format == X509_ANY) { + if (!prvtonly && !pub) { + /* + * BIO_reset is a rewind for read-only +@@ -4346,7 +4346,7 @@ static int pk_new(lua_State *L) { + } + } + +- if (type == X509_DER || type == X509_ANY) { ++ if (format == X509_DER || format == X509_ANY) { + if (!prvtonly && !pub) { + BIO_reset(bio); + +-- +2.24.1 + |