mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
5ad2c03fb6
Summary:
Convert client certificates (which are expected to be supplied as PEM files) into an in-memory PKCS#12 archive to pass into libcurl. This is necessary on certain platforms (such as Windows) whose native crypto APIs do not support loading PEM files.
This was previously landed as D27637069 (5b759a2b52
), which unconditionally converted the certificates under the assumption that all major TLS backends support PKCS#12. That assumption is still true, but it did not account for the fact that libcurl itself is dynamically linked on some platforms (such as MacOS), and the system libcurl may be too old to support support in-memory certs (via `CURLOPT_SSLCERT_BLOB` added in libcurl version 7.71.0). This diff gates this feature behind the `http.convert-cert` config option, which we can selectively set on platforms where it is needed.
Reviewed By: mzr
Differential Revision: D28524444
fbshipit-source-id: 4af9cdd60b8ef3977ad81abdb8e406c63795e628
37 lines
852 B
TOML
37 lines
852 B
TOML
# @generated by autocargo from //eden/scm/lib/http-client:[http-cli,http-client]
|
|
[package]
|
|
name = "http-client"
|
|
version = "0.1.0"
|
|
edition = "2018"
|
|
|
|
[[bin]]
|
|
name = "http_cli"
|
|
path = "src/bin/cli.rs"
|
|
|
|
[dependencies]
|
|
anyhow = "1.0"
|
|
atty = "0.2"
|
|
curl = { version = "0.4", features = ["http2"] }
|
|
curl-sys = "0.4"
|
|
env_logger = "0.7"
|
|
futures = { version = "0.3.13", features = ["async-await", "compat"] }
|
|
http = "0.2"
|
|
once_cell = "1.4"
|
|
openssl = "0.10"
|
|
parking_lot = "0.10.2"
|
|
paste = "1.0"
|
|
pin-project = "0.4"
|
|
regex = "1.4.2"
|
|
serde = { version = "=1.0.118", features = ["derive", "rc"] }
|
|
serde_cbor = "0.11"
|
|
serde_json = { version = "1.0", features = ["float_roundtrip"] }
|
|
structopt = "0.3.21"
|
|
thiserror = "1.0"
|
|
tokio = { version = "1.5", features = ["full", "test-util"] }
|
|
tracing = "0.1"
|
|
url = "2.1.0"
|
|
|
|
[dev-dependencies]
|
|
crossbeam = "0.7"
|
|
mockito = "0.25"
|