Skip to content

Commit 535e40a

Browse files
authored
fix(query): build mysql tls config (#18953)
1 parent ac1fee9 commit 535e40a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/query/service/src/servers/mysql/tls.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ impl MySQLTlsConfig {
4747
return Ok(None);
4848
}
4949

50+
// Set default crypto provider to use
51+
// See: https://docs.rs/rustls/latest/rustls/crypto/struct.CryptoProvider.html#using-the-per-process-default-cryptoprovider
52+
let _ = rustls::crypto::ring::default_provider().install_default();
53+
5054
let cert = certs(&mut BufReader::new(File::open(&self.cert_path)?))
5155
.try_collect()
5256
.map_err(|err| ErrorCode::TLSConfigurationFailure(err.to_string()))?;

src/query/service/tests/it/servers/mysql/mysql_handler.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,6 @@ async fn test_generic_code_with_on_query() -> Result<()> {
5555

5656
#[tokio::test(flavor = "current_thread")]
5757
async fn test_connect_with_tls() -> Result<()> {
58-
// Set default crypto provider to use
59-
// See: https://docs.rs/rustls/latest/rustls/crypto/struct.CryptoProvider.html#using-the-per-process-default-cryptoprovider
60-
let _ = rustls::crypto::ring::default_provider().install_default();
61-
6258
let _fixture = TestFixture::setup().await?;
6359

6460
let tcp_keepalive_timeout_secs = 120;

0 commit comments

Comments
 (0)