diff options
author | daurnimator <quae@daurnimator.com> | 2017-09-03 21:32:55 +1000 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2017-09-03 21:32:55 +1000 |
commit | 3ba26461a7834e86a116463e7ac67ac7f19dfca6 (patch) | |
tree | f99a466616889049a872b18d776099a7d49f9f0b | |
parent | f7bd2dec109730b20073ce82d976b026b6e84474 (diff) | |
download | luaossl-3ba26461a7834e86a116463e7ac67ac7f19dfca6.tar.gz luaossl-3ba26461a7834e86a116463e7ac67ac7f19dfca6.tar.bz2 luaossl-3ba26461a7834e86a116463e7ac67ac7f19dfca6.zip |
Remove lua 5.1 code that's taken care of by compat-5.3
-rw-r--r-- | src/openssl.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/openssl.c b/src/openssl.c index 0d0208e..fd7d28e 100644 --- a/src/openssl.c +++ b/src/openssl.c @@ -5604,11 +5604,7 @@ static int xc_digest(lua_State *L) { luaL_Buffer B; unsigned i; -#if LUA_VERSION_NUM < 502 - luaL_buffinit(L, &B); -#else luaL_buffinitsize(L, &B, 2 * len); -#endif for (i = 0; i < len; i++) { luaL_addchar(&B, x[0x0f & (md[i] >> 4)]); @@ -8868,19 +8864,9 @@ static int ssl_getClientRandom(lua_State *L) { unsigned char *out; len = SSL_get_client_random(ssl, NULL, 0); -#if LUA_VERSION_NUM < 502 - if (LUAL_BUFFERSIZE < len) - luaL_error(L, "ssl:getClientRandom: LUAL_BUFFERSIZE(%d) < SSL_get_client_random(ssl, NULL, 0)", (int)LUAL_BUFFERSIZE, (int)len); - luaL_buffinit(L, &B); - out = (unsigned char*)luaL_prepbuffer(&B); - len = SSL_get_client_random(ssl, out, len); - luaL_addsize(&B, len); - luaL_pushresult(&B); -#else out = (unsigned char*)luaL_buffinitsize(L, &B, len); len = SSL_get_client_random(ssl, out, len); luaL_pushresultsize(&B, len); -#endif return 1; } /* ssl_getClientRandom() */ |