Skip to content

Commit 75515e7

Browse files
nickvikerasclaude
andauthored
Install default rustls CryptoProvider in sui-kv-rpc [1.65 backport] (#25304)
## Summary - Backport of #25303 to 1.65 release branch - Install the default ring `CryptoProvider` at startup in `sui-kv-rpc`, same fix as #25300 (sui-indexer-alt-graphql / sui-indexer-alt-jsonrpc) - Prevents panics when TLS is used without an explicitly installed provider ## Test plan - [x] `cargo check -p sui-kv-rpc` passes - [x] Cherry-pick applied cleanly 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent d502a4c commit 75515e7

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/sui-kv-rpc/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ axum.workspace = true
1212
bin-version.workspace = true
1313
clap.workspace = true
1414
prometheus.workspace = true
15+
rustls.workspace = true
1516
mysten-metrics.workspace = true
1617
mysten-network.workspace = true
1718
sui-data-ingestion-core.workspace = true

crates/sui-kv-rpc/src/main.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ async fn health_check() -> &'static str {
4242
#[tokio::main]
4343
async fn main() -> Result<()> {
4444
let _guard = TelemetryConfig::new().with_env().init();
45+
rustls::crypto::ring::default_provider()
46+
.install_default()
47+
.expect("Failed to install CryptoProvider");
4548
let app = App::parse();
4649
unsafe {
4750
std::env::set_var("GOOGLE_APPLICATION_CREDENTIALS", app.credentials.clone());

0 commit comments

Comments
 (0)