diff --git a/src/lcrypto.c b/src/lcrypto.c index 48364d1..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; @@ -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; }