You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When configuring a client to use client_private_key when using mTLS it fails to read a key from the provided pem file.
I think I know how to solve it. But I'll start by describing the bug.
It's probably due to what formatting the pem file uses.
I noticed that using pkcs8_private_keys does manage to get the key while rsa_private_keys does not.
If i copy this piece o code from io/zenoh-links/zenoh-link-tls/src/unicast.rs TlsServerConfig new function
[2023-03-23T16:52:53Z DEBUG zenoh_link_tls::unicast] Loading client authentication key and certificate...
thread 'main' panicked at 'removal index (is 0) should be < len (is 0)', io/zenoh-links/zenoh-link-tls/src/unicast.rs:627:47
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[2023-03-23T16:52:53Z DEBUG zenoh::net::routing::router] Close Face{0, 20}
Describe the bug
When configuring a client to use client_private_key when using mTLS it fails to read a key from the provided pem file.
I think I know how to solve it. But I'll start by describing the bug.
It's probably due to what formatting the pem file uses.
I noticed that using pkcs8_private_keys does manage to get the key while rsa_private_keys does not.
If i copy this piece o code from io/zenoh-links/zenoh-link-tls/src/unicast.rs TlsServerConfig new function
And add that to the TlsClientConfig new function right after keys are loaded
The steps used to reproduce works as I'm expecting them to. The bug goes away.
To reproduce
Unzip the mTLS_zenoh_test.zip
cd into folder
Generate CA, peer and client certificates and sign peer and client with the CA certificate
./generate_ca_root_certificate.sh
./generate_client_cert.sh localhost
./generate_client_cert.sh client1
./sign_client_with_ca.sh localhost
./sign_client_with_ca.sh client1
Start the peer
zenohd -c peer1.json5
Start the client
RUST_LOG=debug z_sub -e tls/localhost:7447 -m client -c client1.json5
Log output of z_sub ends with
System info
mTLS_zenoh_test.zip
The text was updated successfully, but these errors were encountered: