-
Notifications
You must be signed in to change notification settings - Fork 102
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
fix EVP_PKEY #55
fix EVP_PKEY #55
Conversation
lib/resty/rsa.lua
Outdated
if not pcall(function () return C.EVP_PKEY_size(pkey) end) then | ||
size = C.EVP_PKEY_get_size(pkey) | ||
else | ||
size=C.EVP_PKEY_size(pkey) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
size=C.EVP_PKEY_size(pkey) | |
size = C.EVP_PKEY_size(pkey) |
lib/resty/rsa.lua
Outdated
local size = C.EVP_PKEY_size(pkey) | ||
--local size = C.EVP_PKEY_size(pkey) | ||
local size | ||
if not pcall(function () return C.EVP_PKEY_size(pkey) end) then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use pcall like
lua-resty-rsa/lib/resty/rsa.lua
Line 151 in d4e22cf
if not pcall(function () return C.EVP_MD_CTX_create end) then |
lib/resty/rsa.lua
Outdated
@@ -388,7 +389,13 @@ function _M.new(_, opts) | |||
end | |||
end | |||
|
|||
local size = C.EVP_PKEY_size(pkey) | |||
--local size = C.EVP_PKEY_size(pkey) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can remove it now
lib/resty/rsa.lua
Outdated
@@ -388,7 +396,8 @@ function _M.new(_, opts) | |||
end | |||
end | |||
|
|||
local size = C.EVP_PKEY_size(pkey) | |||
local size=evp_pkey_size(pkey) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
local size=evp_pkey_size(pkey) | |
local size = evp_pkey_size(pkey) |
thank you, actually this is my first pull request |
I hope you're having fun! |
@nogolang |
fix EVP_PKEY and old version still work