Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update lcrypto.c #49

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
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