GithubHelp home page GithubHelp logo

Comments (4)

spacewander avatar spacewander commented on June 28, 2024

Look like OpenSSL doesn't provide any error message with some malformed public keys. Will dive into it when I have enough free time. Thanks for your report.

from lua-resty-rsa.

spacewander avatar spacewander commented on June 28, 2024

@zcong2333
我追了下 OpenSSL 的内部实现,发现在 PEM_read_bio 里面,如果 EVP_DecodeFinal 没有更新传进去的长度参数,那么就不会有报错。这一块应该是 OpenSSL 实现的问题。我改了下代码,如果 OpenSSL 没有提供错误信息,那么返回一个 "internal error"。

另外,对于 -----BEGIN PUBLIC 开头的公钥,记得加上 key_type = resty_rsa.KEY_TYPE.PKCS8,,参考文档:
https://github.com/spacewander/lua-resty-rsa#new

from lua-resty-rsa.

zcong2333 avatar zcong2333 commented on June 28, 2024

@spacewander
好的,多谢提醒。多问一句,我这边更新版本就可以了吧

from lua-resty-rsa.

zcong2333 avatar zcong2333 commented on June 28, 2024

我更新了rsa.lua.可以了。多谢

from lua-resty-rsa.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.