Skip to content

Commit 4b45d7c

Browse files
committed
Switch to use rustls-ring everywhere
We switch to use `rustls-ring` everywhere, which is necessary for Swift builds, but also generally makes our lives easier.
1 parent ed12e65 commit 4b45d7c

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

.github/workflows/kotlin.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@ jobs:
3939
- name: Generate Kotlin JVM
4040
run: ./scripts/uniffi_bindgen_generate_kotlin.sh
4141

42-
- name: Install `bindgen-cli`
43-
run: cargo install --force bindgen-cli
44-
4542
- name: Generate Kotlin Android
4643
run: ./scripts/uniffi_bindgen_generate_kotlin_android.sh
4744

Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ default = []
3636
#lightning-background-processor = { version = "0.1.0" }
3737
#lightning-rapid-gossip-sync = { version = "0.1.0" }
3838
#lightning-block-sync = { version = "0.1.0", features = ["rest-client", "rpc-client", "tokio"] }
39-
#lightning-transaction-sync = { version = "0.1.0", features = ["esplora-async-https", "time", "electrum"] }
39+
#lightning-transaction-sync = { version = "0.1.0", features = ["esplora-async-https", "time", "electrum-rustls-ring"] }
4040
#lightning-liquidity = { version = "0.1.0", features = ["std"] }
4141
#lightning-macros = { version = "0.1.0" }
4242

@@ -48,7 +48,7 @@ default = []
4848
#lightning-background-processor = { git = "https://github.com/lightningdevkit/rust-lightning", branch = "main" }
4949
#lightning-rapid-gossip-sync = { git = "https://github.com/lightningdevkit/rust-lightning", branch = "main" }
5050
#lightning-block-sync = { git = "https://github.com/lightningdevkit/rust-lightning", branch = "main", features = ["rest-client", "rpc-client", "tokio"] }
51-
#lightning-transaction-sync = { git = "https://github.com/lightningdevkit/rust-lightning", branch = "main", features = ["esplora-async-https", "electrum", "time"] }
51+
#lightning-transaction-sync = { git = "https://github.com/lightningdevkit/rust-lightning", branch = "main", features = ["esplora-async-https", "electrum-rustls-ring", "time"] }
5252
#lightning-liquidity = { git = "https://github.com/lightningdevkit/rust-lightning", branch = "main" }
5353
#lightning-macros = { git = "https://github.com/lightningdevkit/rust-lightning", branch = "main" }
5454

@@ -60,7 +60,7 @@ lightning-persister = { git = "https://github.com/lightningdevkit/rust-lightning
6060
lightning-background-processor = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "4e32d85249359d8ef8ece97d89848e40154363ab" }
6161
lightning-rapid-gossip-sync = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "4e32d85249359d8ef8ece97d89848e40154363ab" }
6262
lightning-block-sync = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "4e32d85249359d8ef8ece97d89848e40154363ab", features = ["rest-client", "rpc-client", "tokio"] }
63-
lightning-transaction-sync = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "4e32d85249359d8ef8ece97d89848e40154363ab", features = ["esplora-async-https", "electrum", "time"] }
63+
lightning-transaction-sync = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "4e32d85249359d8ef8ece97d89848e40154363ab", features = ["esplora-async-https", "electrum-rustls-ring", "time"] }
6464
lightning-liquidity = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "4e32d85249359d8ef8ece97d89848e40154363ab" }
6565
lightning-macros = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "4e32d85249359d8ef8ece97d89848e40154363ab" }
6666

@@ -72,13 +72,13 @@ lightning-macros = { git = "https://github.com/lightningdevkit/rust-lightning",
7272
#lightning-background-processor = { path = "../rust-lightning/lightning-background-processor" }
7373
#lightning-rapid-gossip-sync = { path = "../rust-lightning/lightning-rapid-gossip-sync" }
7474
#lightning-block-sync = { path = "../rust-lightning/lightning-block-sync", features = ["rest-client", "rpc-client", "tokio"] }
75-
#lightning-transaction-sync = { path = "../rust-lightning/lightning-transaction-sync", features = ["esplora-async-https", "electrum", "time"] }
75+
#lightning-transaction-sync = { path = "../rust-lightning/lightning-transaction-sync", features = ["esplora-async-https", "electrum-rustls-ring", "time"] }
7676
#lightning-liquidity = { path = "../rust-lightning/lightning-liquidity", features = ["std"] }
7777
#lightning-macros = { path = "../rust-lightning/lightning-macros" }
7878

7979
bdk_chain = { version = "0.23.0", default-features = false, features = ["std"] }
8080
bdk_esplora = { version = "0.22.0", default-features = false, features = ["async-https-rustls", "tokio"]}
81-
bdk_electrum = { version = "0.23.0", default-features = false, features = ["use-rustls"]}
81+
bdk_electrum = { version = "0.23.0", default-features = false, features = ["use-rustls-ring"]}
8282
bdk_wallet = { version = "2.0.0", default-features = false, features = ["std", "keys-bip39"]}
8383

8484
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls"] }
@@ -93,7 +93,7 @@ rand = "0.8.5"
9393
chrono = { version = "0.4", default-features = false, features = ["clock"] }
9494
tokio = { version = "1.37", default-features = false, features = [ "rt-multi-thread", "time", "sync", "macros" ] }
9595
esplora-client = { version = "0.12", default-features = false, features = ["tokio", "async-https-rustls"] }
96-
electrum-client = { version = "0.24.0", default-features = true }
96+
electrum-client = { version = "0.24.0", default-features = false, features = ["proxy", "use-rustls-ring"] }
9797
libc = "0.2"
9898
uniffi = { version = "0.28.3", features = ["build"], optional = true }
9999
serde = { version = "1.0.210", default-features = false, features = ["std", "derive"] }

src/builder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1688,7 +1688,7 @@ fn optionally_install_rustls_cryptoprovider() {
16881688
INIT_CRYPTO.call_once(|| {
16891689
// Ensure we always install a `CryptoProvider` for `rustls` if it was somehow not previously installed by now.
16901690
if rustls::crypto::CryptoProvider::get_default().is_none() {
1691-
let _ = rustls::crypto::aws_lc_rs::default_provider().install_default();
1691+
let _ = rustls::crypto::ring::default_provider().install_default();
16921692
}
16931693

16941694
// Refuse to startup without TLS support. Better to catch it now than even later at runtime.

0 commit comments

Comments
 (0)