I am trying to insert data using the official QuestDB Rust client. It all works good when using QuestDB without TLS, but when I enable TLS on my QuestDB Enterprise using a self-signed certificate, I get an error of certificate unknown.
When using the pgwire interface, I can insert data passing sslmode=require
, and it works, so I can discard any problems with QuestDB recognising the certificate. But I cannot figure it out with Rust. I saw on the docs that there is an optional feature to insecure-skip-verify
, so I added it to my Cargo.toml
. Still same error.
[package]
name = "airplanes"
version = "0.1.0"
edition = "2018"
[dependencies]
chrono = "0.4"
rand = "0.8"
tokio = { version = "1", features = ["full"] }
questdb-rs = { version = "4.0.2", features = ["insecure-skip-verify"] }
structopt = "0.3"
futures = "0.3"
[[bin]]
name = "airplanes"
path = "src/main.rs"
Enabling the optional insecure-skip-verify
is needed, but it is not enough. I also had to add tls_verify=unsafe_off;
to my connection string, and now everything is working fine. Bear in mind if you try passing the tls_verify
option in the connection script without adding the optional feature first, you will also get an error.
https::addr=$QDB_HOST:9000;token=$QDB_REST_TOKEN;tls_verify=unsafe_off;