Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/lcrypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -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());

Expand All @@ -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;

Expand Down Expand Up @@ -1217,7 +1216,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;
}
Expand Down