Skip to content

Commit 8577422

Browse files
committed
fix(pkey) clear_error in passphrase type mismatch
1 parent 369eea1 commit 8577422

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/resty/openssl/pkey.lua

+2
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ local function load_pem_der(txt, opts, funcs)
9090
if opts.passphrase then
9191
local passphrase = opts.passphrase
9292
if type(passphrase) ~= "string" then
93+
-- clear errors occur when trying
94+
C.ERR_clear_error()
9395
return nil, "passphrase must be a string"
9496
end
9597
arg = { null, nil, passphrase }

0 commit comments

Comments
 (0)