The0x539 / rust-deluge-rpc

4 stars 2 forks source link

WebPKIError(BadDER) when calling Session::connect #2

Open Gnurur opened 3 years ago

Gnurur commented 3 years ago

I'm getting Error: Custom { kind: InvalidData, error: WebPKIError(BadDER) } when calling Session::connect("localhost:58846"). deluged is running (with allow_remote = true) and I am able to connect using deluge-gtk. However, dtui can't connect, possibly because of the same problem. This may also be a problem with deluge, I'm not sure.

Edit: I should mention I'm using the latest git version

Gnurur commented 3 years ago

I've tried removing the TLS code and now it receives and unexpected EOF from the connection. This might also be the underlying issue that caused this error with the TLS connection.

The0x539 commented 3 years ago

This is an issue with my underlying TLS dependencies - there's an assumption that this is being used in a Web context where an extension to the key format involving server names is expected, but Deluge generates certs that don't have this data. I'm not quite sure how to avoid this, so personally I generate a cert that makes webpki happy instead.

Gnurur commented 3 years ago

Thanks! I'll try to generate a certificate and see if it helps. I couldn't get other RPC clients to work either and deluge-console doesn't work unless I run it as the deluge user. So there might be more things going on with Deluge.

ajruckman commented 2 years ago

Hi, did you find a solution to this? Having the same trouble even on the latest build of Deluge...

The0x539 commented 2 years ago

All I know to do is to generate a cert that satisfies webpki.