jkeys089 / lua-resty-hmac

HMAC functions for ngx_lua and LuaJIT
160 stars 99 forks source link

ffi struct definition improvement #17

Closed fffonion closed 4 years ago

fffonion commented 4 years ago

Hi,

Thank you providing this awesome library! Since other ffi binding to openssl exists, some user found conflicts on ffi struct definition from this library and lua-resty-openssl. (See https://github.com/Kong/kong/issues/5549) As new version of openssl starts to use evp_md_ctx_st internally, it might make sense for ffi bindings to use the same name as well to avoid such conflict. And personally I'd also suggest only let ffi know the struct member if it really needs (e.g. when linked with openssl 1.0).

Is this something you would consider as a pull request? If so I can draft one. It's more like a compatibility improvement and is transparent to ffi itself.

Thank you

jkeys089 commented 4 years ago

@fffonion Thanks for the report. We would absolutely be open to a PR.