aboutsummaryrefslogtreecommitdiffstats
path: root/main/lua-ossl/0004-pkey.new-type-rename-variable.patch
blob: 522985f916508fe8211749ea2e7d2c4fb779448e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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