From 4589f5b1a5c2cbeab2069f9cdce605bc3a3096fb Mon Sep 17 00:00:00 2001 From: Kaarle Ritvanen Date: Sun, 2 Sep 2018 13:07:20 +0300 Subject: [PATCH 01/10] 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 9a9de0f..acb8289 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.24.1