Skip to content

Commit 6a2e88b

Browse files
authored
fix(engine-ffi): resolve TLS self-signed certificate validation by using custom root store (#1166)
* fix(engine-ffi): resolve TLS self-signed certificate validation by using custom root store Signed-off-by: Mark Phelps <[email protected]> * fix: install crypto provider in production code for custom TLS configs Signed-off-by: Mark Phelps <[email protected]> * fix: use ring crypto provider for mobile platform compatibility Signed-off-by: Mark Phelps <[email protected]> * chore: use ring Signed-off-by: Mark Phelps <[email protected]> * fix: eliminate aws-lc-sys dependency for mobile compatibility Signed-off-by: Mark Phelps <[email protected]> * chore: add back request retry Signed-off-by: Mark Phelps <[email protected]> * chore: clippy Signed-off-by: Mark Phelps <[email protected]> * chore: relax error expectation Signed-off-by: Mark Phelps <[email protected]> --------- Signed-off-by: Mark Phelps <[email protected]>
1 parent 864bd30 commit 6a2e88b

File tree

2 files changed

+308
-46
lines changed

2 files changed

+308
-46
lines changed

flipt-engine-ffi/Cargo.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ crate-type = ["rlib", "dylib", "staticlib"]
1616
libc = { version = "0.2.150", features = ["std"] }
1717
serde = { version = "1.0.147", features = ["derive"] }
1818
serde_json = { version = "1.0.89", features = ["raw_value"] }
19-
reqwest = { version = "0.12.9", features = ["json", "stream", "rustls-tls", "http2"], default-features = false }
19+
reqwest = { version = "0.12.9", features = ["json", "stream", "rustls-tls-manual-roots", "http2"], default-features = false }
2020
http = "1.0"
2121
tokio = { version = "1.36.0", features = ["rt-multi-thread", "macros", "io-util", "net", "time"], default-features = false }
2222
tokio-util = { version = "0.7", features = ["io"], default-features = false }
@@ -29,13 +29,19 @@ async-trait = "0.1"
2929
base64 = "0.22"
3030
log = "0.4"
3131
env_logger = "0.11"
32+
webpki-roots = "0.26"
33+
rustls-pemfile = "2.0"
34+
rustls = { version = "0.23", default-features = false, features = ["ring", "std", "tls12"] }
3235

3336
[dependencies.flipt-evaluation]
3437
path = "../flipt-evaluation"
3538

3639
[dev-dependencies]
3740
mockall = "0.13.0"
3841
mockito = "1.4.0"
42+
tokio-rustls = { version = "0.26", default-features = false, features = ["ring"] }
43+
rustls-pemfile = "2.0"
44+
rustls = { version = "0.23", default-features = false, features = ["ring", "std", "tls12"] }
3945

4046
[build-dependencies]
4147
cbindgen = "0.29.0"

0 commit comments

Comments
 (0)