Skip to content
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

哥们你的demo有个小bug #17

Closed
mandarenmanman opened this issue Sep 14, 2017 · 1 comment
Closed

哥们你的demo有个小bug #17

mandarenmanman opened this issue Sep 14, 2017 · 1 comment

Comments

@mandarenmanman
Copy link

mandarenmanman commented Sep 14, 2017

-- conf/test.lua:

local resty_rsa = require "resty.rsa"
local rsa_public_key, rsa_priv_key, err = resty_rsa:generate_rsa_keys(2048)  -----这里是rsa_priv_key
if not rsa_public_key then
    ngx.say('generate rsa keys err: ', err)
end

ngx.say(rsa_public_key)
--[[
-----BEGIN RSA PUBLIC KEY-----
MIIBCgKCAQEAuw4T755fepEyXTM66pzf6nv8NtnukQTMGnhmBFIFHp/P2vEpxjXU
BBDUpzKkVFR3wuK9O1FNmRDAGNGYC0N/9cZNdhykA1NixJfKQzncN31VJTmNqJNZ
W0x7H9ZGoh2aE0zCCZpRlC1Rf5rL0SVlBoQkn/n9LnYFwyLLIK5/d/y/NZVL6Z6L
cyvga0zRajamLIjY0Dy/8YIwVV6kaSsHeRv2cOB03eam6gbhLGIz/l8wuJhIn1rO
yJLQ36IOJymbbNmcC7+2hEQJP40qLvH7hZ1LaAkgQUHjfi8RvH2T1Jmce7XGPxCo
Ed0yfeFz+pL1KeSWNey6cL3N5hJZE8EntQIDAQAB
-----END RSA PUBLIC KEY-----
]]--

ngx.say( rsa_private_key)    ------------------这里为rsa_private_key

rsa_priv_key
rsa_private_key
两个地方变量名称不一样,我说特么怎么输出为空。。。

@spacewander
Copy link
Owner

多谢指正,已经把错误的变量命名更正了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants