This introduces a new ConfigError variant for when the configuration contains a path but the respective file cannot be read (could be because the file is missing or because of permission problems). This new variant is then used if a specified certificate file (server or client certificate) cannot be read.
To not duplicate code, I changed the visibility of Config::path to pub(crate) so it can be reused in the variants of Connection::new_secured_transport.
Resolves #212.
This introduces a new
ConfigError
variant for when the configuration contains a path but the respective file cannot be read (could be because the file is missing or because of permission problems). This new variant is then used if a specified certificate file (server or client certificate) cannot be read.To not duplicate code, I changed the visibility of
Config::path
topub(crate)
so it can be reused in the variants ofConnection::new_secured_transport
.Not sure if or how to add tests for this.