aports/main/lua-ossl/0001-pkey.toPEM-opts-rename-const-array.patch
Kaarle Ritvanen 96eb0e947a main/lua-ossl: align with latest patch set
available at https://github.com/wahern/luaossl/pull/128

Earlier, an empty password was returned when the callback raised a Lua
error. Now the error is propagated to the OpenSSL level.

This commit also enables the -dbg subpackage.
2025-02-12 15:07:18 +02:00

33 lines
969 B
Diff

From db281ae9a12ce7518a92002c782ef697fc875f9c Mon Sep 17 00:00:00 2001
From: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
Date: Sun, 2 Sep 2018 13:07:20 +0300
Subject: [PATCH 1/9] pkey.toPEM: opts: rename const array
---
src/openssl.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/openssl.c b/src/openssl.c
index c3547bb..35ff49a 100644
--- a/src/openssl.c
+++ b/src/openssl.c
@@ -4675,14 +4675,14 @@ static int pk_toPEM(lua_State *L) {
bio = getbio(L);
for (i = 2; i <= top; i++) {
- static const char *const opts[] = {
+ static const char *const types[] = {
"public", "PublicKey",
"private", "PrivateKey",
// "params", "Parameters",
NULL,
};
- switch (auxL_checkoption(L, i, NULL, opts, 1)) {
+ switch (auxL_checkoption(L, i, NULL, types, 1)) {
case 0: case 1: /* public, PublicKey */
if (!PEM_write_bio_PUBKEY(bio, key))
return auxL_error(L, auxL_EOPENSSL, "pkey:__tostring");
--
2.48.1