Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: nerda-codes <[email protected]>
  • Loading branch information
SamyOubouaziz and nerda-codes authored Jun 11, 2024
1 parent 404d611 commit de770b5
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,9 @@ conn, err := pgx.Connect(context.Background(), connString)

### Go/pgx

[pgx](https://github.com/jackc/pgx) supports the `sslmode=verify-full` option, but not `sslrootcert=system`. However, when using `sslmode=verify-full`, checks will also be made against default certification authority certificates trusted by your operating system, as if `sslrootcert=system` parameter was set.
[pgx](https://github.com/jackc/pgx) supports the `sslmode=verify-full` option, but not `sslrootcert=system`. However, when using `sslmode=verify-full`, checks will also be made against default certification authority certificates trusted by your operating system, as if the `sslrootcert=system` parameter was set.

To ensure SSL/TLS is enforced and the server certificate is valid, add `sslmode=verify-full` to your connection parameters:
To ensure SSL/TLS is enforced and the server certificate is valid, add `sslmode=verify-full` to your connection parameters:

```go
connString := "postgresql://{username}:{password}@{host}:{port}/{databasename}?sslmode=verify-full"
Expand Down Expand Up @@ -224,9 +224,9 @@ var dataSourceBuilder = new NpgsqlDataSourceBuilder(connString);

### Rust

[rust-postgresql](https://github.com/sfackler/rust-postgres) does not support the `sslmode=verify-full` and `sslrootcert=system` options. However, when using `sslmode=require`, you can pass a `TlsConnector` object to perform the certificate verification.
[rust-postgresql](https://github.com/sfackler/rust-postgres) does not support the `sslmode=verify-full` and `sslrootcert=system` options. However, when using `sslmode=require`, you can pass a `TlsConnector` object to perform the certificate verification.

Also, when using the standard [rust-openssl](https://github.com/sfackler/rust-openssl) library, checks will also be made against default certification authority certificates trusted by your operating system as if `sslrootcert=system` parameter was set.
Also, when using the standard [rust-openssl](https://github.com/sfackler/rust-openssl) library, checks will also be made against default certification authority certificates trusted by your operating system as if the `sslrootcert=system` parameter was set.

To ensure SSL/TLS is enforced and the server certificate is valid, add `sslmode=require` to your connection parameters:
```rust
Expand Down

0 comments on commit de770b5

Please sign in to comment.