From 198afd05c48dc9b92e01222c4b008a93b0e39711 Mon Sep 17 00:00:00 2001 From: caiyiheng Date: Tue, 25 Jun 2019 16:57:20 +0800 Subject: [PATCH 1/2] Update lcrypto.c --- src/lcrypto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lcrypto.c b/src/lcrypto.c index 48364d1..f2a1232 100644 --- a/src/lcrypto.c +++ b/src/lcrypto.c @@ -1217,7 +1217,7 @@ static int pkey_from_pem(lua_State *L) size_t ret; ret = BIO_puts(mem, key); - if (ret != strlen(key)) + if (ret != (int)strlen(key)) { goto error; } From 10ad64af01da98bb70c465a485fe42dd177122e5 Mon Sep 17 00:00:00 2001 From: caiyiheng Date: Tue, 25 Jun 2019 17:07:28 +0800 Subject: [PATCH 2/2] Update lcrypto.c --- src/lcrypto.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lcrypto.c b/src/lcrypto.c index f2a1232..5a2ed78 100644 --- a/src/lcrypto.c +++ b/src/lcrypto.c @@ -1157,7 +1157,6 @@ static int pkey_to_pem(lua_State *L) struct evp_pkey_st *pkey_st = *pkey; int ret; - long len; BUF_MEM *buf; BIO *mem = BIO_new(BIO_s_mem()); @@ -1176,7 +1175,7 @@ static int pkey_to_pem(lua_State *L) goto error; } - len = BIO_get_mem_ptr(mem, &buf); + BIO_get_mem_ptr(mem, &buf); lua_pushlstring(L, buf->data, buf->length); ret = 1;