hidekatsu-izuno / josekit-rs

JOSE (Javascript Object Signing and Encryption) library for Rust (based on OpenSSL).
Apache License 2.0
69 stars 30 forks source link

Remove unsafe and direct use of openssl-sys #2

Closed dodomorandi closed 3 years ago

dodomorandi commented 3 years ago

I recently started using josekit for a project, and I was very impressed by the project, also considering it's developed by one person.

I noticed that the project contains a very small amount of unsafe, and I saw that the main problem was related to the openssl crate not exposing some APIs. I decided to implement the missing pieces, and recently the new version of the openssl crate has been published, making these new APIs available for josekit.

I based my work on openssl on your work on josekit, so I did nothing more than creating an abstraction layer over your code. With this PR, josekit is 100% safe code, which is always a nice feature to have.

Let me know if you like this. Thank you for efforts you put into this crate! :heart:

hidekatsu-izuno commented 3 years ago

Thank you for your work. That what I was thinking. I will release a new version in the near feature.

dodomorandi commented 3 years ago

I noticed that you removed the crate foreign-types because now it is unused. This is interesting, because I run cargo udeps just before making the PR, and it was unable to detect that that crate could be removed. I will make some tests, and if the thing is real I will open an issue on the repo of the tool.