Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with EVP_sha1 / OpenSSL #19

Open
henriquechehad opened this issue May 26, 2017 · 14 comments
Open

Error with EVP_sha1 / OpenSSL #19

henriquechehad opened this issue May 26, 2017 · 14 comments

Comments

@henriquechehad
Copy link

henriquechehad commented May 26, 2017

I'm trying to use the project but it's returning the error below:

Error → /usr/local/share/lua/5.1/api-gateway/resty/hmac.lua @ 63
suite ./test/specs/kinesis_spec.lua
/usr/local/share/lua/5.1/api-gateway/resty/hmac.lua:63: /usr/bin/luajit: undefined symbol: EVP_sha1

In my code i'm just importing, using:

local KinesisService = require('api-gateway.aws.kinesis.KinesisService')

I have the openssl, libcrypto, libssl-dev packages installed

@ddragosd
Copy link
Member

Hi, what OpenSSL version do you have installed ? It's either a missing header file or a dynamic
Linking issue

@henriquechehad
Copy link
Author

Hi @ddragosd

OpenSSL 1.0.1f 6 Jan 2014```

@ddragosd
Copy link
Member

Do you have a file named evp.h on the system ? Also, how are you building Openresty ?

@henriquechehad
Copy link
Author

yes,

/usr/include/openssl/evp.h

I rebuilded openresty now from source, but same problem

@ddragosd
Copy link
Member

ddragosd commented May 26, 2017 via email

@henriquechehad
Copy link
Author

in file exists this content with EVP_sha1:

#ifndef OPENSSL_NO_SHA
const EVP_MD *EVP_sha(void);
const EVP_MD *EVP_sha1(void);
const EVP_MD *EVP_dss(void);
const EVP_MD *EVP_dss1(void);
const EVP_MD *EVP_ecdsa(void);
#endif

Is missing something?

@henriquechehad
Copy link
Author

I tested in ubuntu and debian docker containers, same issue in both

@ddragosd
Copy link
Member

ddragosd commented May 26, 2017 via email

@ddragosd
Copy link
Member

Is there a sample you can share with me ? I'd be happy to take a look over the weekend or early next week. It shouldn't be something too complicated. Another option, in the meanwhile, is to try with this docker image : https://hub.docker.com/r/adobeapiplatform/apigateway/ , built from https://github.com/adobe-apiplatform/apigateway .

@henriquechehad
Copy link
Author

@ddragosd thanks for helping. the issue was because i was trying to test with busted, but i realized now, the project runs only inside nginx

@henriquechehad
Copy link
Author

@ddragosd is there some reason for this project is tied in nginx? is not viable to create an independent version?

@ddragosd
Copy link
Member

ddragosd commented Jun 1, 2017

@enriquechehad no special reason other than being impl initially to work with NGINX / Openresty. Are you saying you'd like to use this module w/o NGINX ?

@henriquechehad
Copy link
Author

@ddragosd yes, api-gateway-aws is the most complete Lua project for AWS that I found. Would be good to have the possibility to use the project without NGINX.

@ddragosd
Copy link
Member

ddragosd commented Jun 2, 2017

@henriquechehad, on a second thought it doesn't seem to be that straight forward to decouple it from NGINX as this module depends on multiple openresty features. At the same time I have to admit you made me curious if there are cases when such a lua module would be useful, comparing with the other aws sdks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants