You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
573 B

  1. --- a/src/ssl.c
  2. +++ b/src/ssl.c
  3. @@ -401,17 +401,21 @@ static int meth_want(lua_State *L)
  4. */
  5. static int meth_compression(lua_State *L)
  6. {
  7. +#ifndef OPENSSL_NO_COMP
  8. const COMP_METHOD *comp;
  9. +#endif
  10. p_ssl ssl = (p_ssl)luaL_checkudata(L, 1, "SSL:Connection");
  11. if (ssl->state != LSEC_STATE_CONNECTED) {
  12. lua_pushnil(L);
  13. lua_pushstring(L, "closed");
  14. return 2;
  15. }
  16. +#ifndef OPENSSL_NO_COMP
  17. comp = SSL_get_current_compression(ssl->ssl);
  18. if (comp)
  19. lua_pushstring(L, SSL_COMP_get_name(comp));
  20. else
  21. +#endif
  22. lua_pushnil(L);
  23. return 1;
  24. }