aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatarLibravatar daurnimator <quae@daurnimator.com> 2017-09-02 04:02:39 +1000
committerLibravatarLibravatar daurnimator <quae@daurnimator.com> 2017-09-02 04:02:39 +1000
commitd39cf31c9db918e3fcaaa1290772729276bb5b9e (patch)
treeaa3364655df9cc854ea5bb3a44f5366767384be3
parent9893561539fbbe65d5fb11a570e4c533fcd454ce (diff)
downloadluaossl-d39cf31c9db918e3fcaaa1290772729276bb5b9e.tar.gz
luaossl-d39cf31c9db918e3fcaaa1290772729276bb5b9e.tar.bz2
luaossl-d39cf31c9db918e3fcaaa1290772729276bb5b9e.zip
Fix warnings about discarding const
-rw-r--r--src/openssl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/openssl.c b/src/openssl.c
index 04833a5..5507762 100644
--- a/src/openssl.c
+++ b/src/openssl.c
@@ -3224,7 +3224,7 @@ static int pk_new(lua_State *L) {
if (!lua_istable(L, 1))
goto creat;
- if (loadfield(L, 1, "type", LUA_TSTRING, &id)) {
+ if (loadfield(L, 1, "type", LUA_TSTRING, (void*)&id)) {
static const struct { int nid; const char *sn; } types[] = {
{ EVP_PKEY_RSA, "RSA" },
{ EVP_PKEY_DSA, "DSA" },
@@ -3264,7 +3264,7 @@ static int pk_new(lua_State *L) {
case EVP_PKEY_DH:
/* dhparam field can contain a PEM encoded string.
The "dhparam" field takes precedence over "bits" */
- if (loadfield(L, 1, "dhparam", LUA_TSTRING, &dhparam))
+ if (loadfield(L, 1, "dhparam", LUA_TSTRING, (void*)&dhparam))
break;
if (loadfield(L, 1, "bits", LUA_TNUMBER, &n)) {
@@ -3279,7 +3279,7 @@ static int pk_new(lua_State *L) {
}
break;
case EVP_PKEY_EC:
- if (loadfield(L, 1, "curve", LUA_TSTRING, &id)) {
+ if (loadfield(L, 1, "curve", LUA_TSTRING, (void*)&id)) {
if (!auxS_txt2nid(&curve, id))
luaL_argerror(L, 1, lua_pushfstring(L, "%s: invalid curve", id));
}