mirror of
https://github.com/brunoos/luasec.git
synced 2025-04-18 22:46:47 +02:00
Code format
This commit is contained in:
parent
c9539bca86
commit
f22b3ea609
@ -689,11 +689,10 @@ static int meth_exportkeyingmaterial(lua_State *L)
|
|||||||
size_t contextlen = 0;
|
size_t contextlen = 0;
|
||||||
const unsigned char *context = NULL;
|
const unsigned char *context = NULL;
|
||||||
|
|
||||||
if(!lua_isnoneornil(L, 4)) {
|
if (!lua_isnoneornil(L, 4))
|
||||||
context = (unsigned char *)luaL_checklstring(L, 4, &contextlen);
|
context = (unsigned char*)luaL_checklstring(L, 4, &contextlen);
|
||||||
}
|
|
||||||
|
|
||||||
/* temporary buffer memory-managed by Lua itself */
|
/* Temporary buffer memory-managed by Lua itself */
|
||||||
unsigned char *out = lua_newuserdata(L, olen);
|
unsigned char *out = lua_newuserdata(L, olen);
|
||||||
|
|
||||||
if(SSL_export_keying_material(ssl->ssl, out, olen, label, llen, context, contextlen, context != NULL) != 1) {
|
if(SSL_export_keying_material(ssl->ssl, out, olen, label, llen, context, contextlen, context != NULL) != 1) {
|
||||||
@ -703,7 +702,7 @@ static int meth_exportkeyingmaterial(lua_State *L)
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
lua_pushlstring(L, (char *)out, olen);
|
lua_pushlstring(L, (char*)out, olen);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user