pimeys / rust-web-push

A Web Push library for Rust
Apache License 2.0
113 stars 21 forks source link

Update ring dependency? #13

Closed githubaccount624 closed 4 years ago

githubaccount624 commented 4 years ago

Hello! I'm trying to use this library in my Rocket project but I'm getting a compilation error:

error: failed to select a version for `ring`.
    ... required by package `web-push v0.6.0`
    ... which is depended on by `backend v0.1.0 (C:\Users\Admin\Desktop\project\backend)`
versions that meet the requirements `^0.14` are: 0.14.6, 0.14.5, 0.14.4, 0.14.3, 0.14.2, 0.14.1, 0.14.0

the package `ring` links to the native library `ring-asm`, but it conflicts with a previous package which links to `ring-asm` as well:
package `ring v0.16.5`
    ... which is depended on by `rustls v0.16.0`
    ... which is depended on by `tokio-rustls v0.12.0`
    ... which is depended on by `rocket_http v0.5.0-dev (https://github.com/SergioBenitez/Rocket?branch=async#30c83d56)`
    ... which is depended on by `rocket v0.5.0-dev (https://github.com/SergioBenitez/Rocket?branch=async#30c83d56)`
    ... which is depended on by `backend v0.1.0 (C:\Users\Admin\Desktop\project\backend)`

failed to select a version for `ring` which could resolve this conflict

I think it's because rustls is using ring 0.16, and this is using ring 0.14. Is it possible to update the ring dependency here? Not sure if that would fix it but figured I'd ask..

githubaccount624 commented 4 years ago

I ended up forking it because I was hoping it would be a very simple version change :p but unfortunately it looks like their API changed a bit..

It looks like hkdf::extract_and_expand was replaced with just extract, and seal_in_place was moved to a different struct?

It's kind of hard for me to follow this as I have no cryptographic background, and I definitely don't want to make a wrong change.

pimeys commented 4 years ago

Ouch. I'll try this out now with my Saturday coffee...

githubaccount624 commented 4 years ago

Thanks so much!!