htrefil/rkvm

Add option for non-tls operation

Zapeth opened this issue · 0 comments

I've been trying to set up a Linux server <=> Windows clients environment but every time I try to connect with a client I get:
Error: Failed to connect: The certificate's CN name does not match the passed value. (os error -2146762481)
(error constant name: CERT_E_CN_NO_MATCH)

I've already tried generating various certificates with different altNames (IP and DNS) but nothing worked.

I realize this is probably not an issue with this crate, but I'd still like to request an option to run the server without requiring a certificate.

For a quick and dirty workaround I disabled

rkvm/client/src/main.rs

Lines 34 to 37 in bf13366

let mut stream = connector
.connect(server, stream)
.await
.context("Failed to connect")?;
and

rkvm/server/src/main.rs

Lines 85 to 91 in bf13366

let stream = match acceptor.accept(stream).await {
Ok(stream) => stream,
Err(err) => {
log::error!("{}: TLS error: {}", address, err);
continue;
}
};
, but a proper configurable implementation would be obviously preferred.