Async does not ignore invalid cert
Closed this issue · 5 comments
First, great to see a Gremlin lib for Rust!
I ran into the following problem: My code runs fine in sync mode with the following options
let options = ConnectionOptions::builder()
.host("...")
.ssl(true)
.tls_options(TlsOptions {
accept_invalid_certs: true
})
.serializer(GraphSON::V2)
.deserializer(GraphSON::V2)
.build();
The Gremlin server uses a self signed cert, so I need to ignore it here. If I switch to the async version using async-std
, I get the error Error: WebSocketAsync(Io(Custom { kind: InvalidData, error: WebPKIError(UnknownIssuer) }))
on runtime.
Either I'm doing something wrong (new to Rust) or the async query version does not ignore the self-signed cert.
Rest of the code looks like this:
let client = GremlinClient::connect(options).await?;
let g = traversal().with_remote_async(client);
let results = g.v(())
// omitted
.to_list().await?;
Any help is welcome!
Hi @secana
thanks for raising this issue. Indeed there is no way to skip invalid certs on the async APIs.
Let me check if i can fix it :)
Thx for the fast response! I'll test is as soon as a new version is available and report if the problem is solved.
Hi @secana
i've just release the version 0.6.0 which contain this fix. Let me know if that's work for you.
If not please re-open this issue thanks :)
Works like charm! Thx for the fast fix.