Why does solicit 0.4.4 attempt to use openssl 0.9.12 even though I have openssl 0.7.14 in my Cargo.toml?

被刻印的时光 ゝ 提交于 2020-01-24 20:48:05

问题


I have a simple project using the Solicit example to make a request with HTTPS. My Cargo.toml has:

[package]
name = "test"
version = "0.1.0"
authors = ["einchear"]

[dependencies.openssl]
version = "0.7.14"
features = ["tlsv1_2", "npn"]

[dependencies.solicit]
version = "0.4.4"
features = ["tls"]

When I tried to run cargo build, the error is:

error: Package `openssl v0.9.12` does not have these features: `npn, tlsv1_2`

Why 0.9.12 instead 0.7.14?


回答1:


Solicit hasn't released a new version in over a year and a half — 0.4.4 was released 2015-09-07. Version 0.4.3 (0.4.4 doesn't have a git tag for whatever reason) requires any version of openssl, so it's just pulling in the newest possible version. It doesn't matter what you have in your Cargo.toml because it's Solicit's dependencies that matters.

It's no longer even possible to publish a crate to crates.io with a * version dependency!

The current master version of Solicit has pinned to openssl 0.6, which is still an old version.

At this point in time, it doesn't seem like Solicit is an actively developed library. You may wish to investigate alternative solutions or consider contributing patches to update the dependencies.

If you don't need to have any other crates that need OpenSSL support, you might be able to use the master branch version of Solicit and just use the older version of OpenSSL.



来源:https://stackoverflow.com/questions/44060407/why-does-solicit-0-4-4-attempt-to-use-openssl-0-9-12-even-though-i-have-openssl

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!