diff --git a/README.md b/README.md index 55345ab1..6411d7a6 100644 --- a/README.md +++ b/README.md @@ -478,7 +478,7 @@ Returns a table containing the `parameters` of pkey instance. **syntax**: *ok, err = pk:set_parameters(params)* -Set the paramets of the pkey from a table `params`. +Set the parameters of the pkey from a table `params`. If the parameter is not set in the `params` table, it remains untouched in the pkey instance. diff --git a/lib/resty/openssl/digest.lua b/lib/resty/openssl/digest.lua index da117e0f..938d614c 100644 --- a/lib/resty/openssl/digest.lua +++ b/lib/resty/openssl/digest.lua @@ -1,7 +1,6 @@ local ffi = require "ffi" local C = ffi.C local ffi_gc = ffi.gc -local ffi_new = ffi.new local ffi_str = ffi.string require "resty.openssl.include.evp" diff --git a/lib/resty/openssl/pkey.lua b/lib/resty/openssl/pkey.lua index 4a34a951..86e0596a 100644 --- a/lib/resty/openssl/pkey.lua +++ b/lib/resty/openssl/pkey.lua @@ -553,7 +553,7 @@ function _M:verify(signature, digest) end ffi_gc(md_ctx, C.EVP_MD_CTX_free) if C.EVP_DigestVerifyInit(md_ctx, nil, nil, nil, self.ctx) ~= 1 then - return nil, format_error("pkey:verify: EVP_DigestSignInit") + return nil, format_error("pkey:verify: EVP_DigestVerifyInit") end code = C.EVP_DigestVerify(md_ctx, signature, #signature, digest, #digest) end diff --git a/lib/resty/openssl/provider.lua b/lib/resty/openssl/provider.lua index 811d28c3..e910215a 100644 --- a/lib/resty/openssl/provider.lua +++ b/lib/resty/openssl/provider.lua @@ -1,9 +1,5 @@ local ffi = require "ffi" local C = ffi.C -local ffi_gc = ffi.gc -local ffi_new = ffi.new -local ffi_str = ffi.string -local ffi_cast = ffi.cast require "resty.openssl.include.provider" local OPENSSL_30 = require("resty.openssl.version").OPENSSL_30