Skip to content

Commit 56be2d9

Browse files
authored
Merge pull request #67 from tankyleo/db-tls
Add option to make SSL connections to the database
2 parents 432b8ef + cfd075a commit 56be2d9

File tree

7 files changed

+315
-52
lines changed

7 files changed

+315
-52
lines changed

rust/Cargo.lock

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

rust/impls/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ tokio-postgres = { version = "0.7.12", features = ["with-chrono-0_4"] }
1111
bb8-postgres = "0.7"
1212
bytes = "1.4.0"
1313
tokio = { version = "1.38.0", default-features = false }
14+
native-tls = { version = "0.2.14", default-features = false }
15+
postgres-native-tls = { version = "0.5.2", default-features = false, features = ["runtime"] }
1416

1517
[dev-dependencies]
1618
tokio = { version = "1.38.0", default-features = false, features = ["rt-multi-thread", "macros"] }

rust/impls/src/migrations.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ pub(crate) const MIGRATION_LOG_COLUMN: &str = "upgrade_from";
55
pub(crate) const CHECK_DB_STMT: &str = "SELECT 1 FROM pg_database WHERE datname = $1";
66
pub(crate) const INIT_DB_CMD: &str = "CREATE DATABASE";
77
#[cfg(test)]
8-
const DROP_DB_CMD: &str = "DROP DATABASE";
8+
pub(crate) const DROP_DB_CMD: &str = "DROP DATABASE";
99
pub(crate) const GET_VERSION_STMT: &str = "SELECT db_version FROM vss_db_version;";
1010
pub(crate) const UPDATE_VERSION_STMT: &str = "UPDATE vss_db_version SET db_version=$1;";
1111
pub(crate) const LOG_MIGRATION_STMT: &str = "INSERT INTO vss_db_upgrades VALUES($1);";
@@ -36,4 +36,4 @@ pub(crate) const MIGRATIONS: &[&str] = &[
3636
);",
3737
];
3838
#[cfg(test)]
39-
const DUMMY_MIGRATION: &str = "SELECT 1 WHERE FALSE;";
39+
pub(crate) const DUMMY_MIGRATION: &str = "SELECT 1 WHERE FALSE;";

0 commit comments

Comments
 (0)