fffonion/lua-resty-openssl

about the return value of store:verify

Closed this issue · 2 comments

It seems better to return false here in order to distinguish verification failure and error. What do you think? @fffonion

@catbro666 it makes sense, but asking user relying on the difference of false and nil is dangerous, as Lua assert() also doesn't distinguish the two. So I would incline to keep it as is.

How about returning other values? Returning 1 and 0 in Lua land also seems a bit weird (and breaks the API):). Anyway, the difference between verification failure and error is not so critical, keeping it as is is also acceptable for me.