Closed Michael-LiK closed 4 years ago
Do you have a minimal breaking example? Feel free to use the testing suite and put up a PR for the failing test for us to fix.
thanks for your help, fffonion sovle my first problem ,the hs265 can use ,but rs256 is also wrong。 the project with wrong is here : https://gitee.com/shmichaelli/jwt_test
Why close? Did you solve this? Would you mind giving more context for others that might have similar issues?
i didn't sovle the problem , i just use the evp.lua to create a signature by myself.
sorry, i think use the lib with wrong ways, the signature key i use it wrong. ------example---------- Right ex: local key = ''-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w\n-----END PRIVATE KEY-- ---"
Wrong ex: local key = ''-----BEGIN PRIVATE KEY-----MIIEvQIBADANBgkqhkiG9w-----END PRIVATE KEY-- ---" ------example----------
I created the mistakes because i write wrong key , the evp.lua tell can't find start_line, then i find it. And i have a suggest, the lua-resty-jwt error can't tell the wrong reasons, i use hmac.lua and evp.lua by myself find the reasons.
i use the sign rs256 meet the problem: ERROR: /usr/local/openresty/lualib/resty/hmac.lua:105: size of C type is unknown or too large at line 39 stack traceback: /usr/local/openresty/lualib/resty/hmac.lua:105: in main chunk [C]: in function 'require' /usr/local/openresty/lualib/resty/jwt.lua:5: in main chunk [C]: in function 'require' jwt.lua:4: in function 'file_gen' init_worker_by_lua:45: in function
[C]: in function 'xpcall'
init_worker_by_lua:52: in function