mirror of
https://github.com/shadowsocks/shadowsocks-rust.git
synced 2026-11-06 16:14:11 +00:00
Fixed error messages
This commit is contained in:
@@ -885,7 +885,10 @@ pub async fn run(context: SharedContext) -> io::Result<()> {
|
||||
return Err(Error::new(ErrorKind::Other, err));
|
||||
}
|
||||
}
|
||||
_ => unreachable!("http_local::run shouldn't used with {:?}", context.config().config_type),
|
||||
_ => unreachable!(
|
||||
"http_local::run shouldn't be used with {:?}",
|
||||
context.config().config_type
|
||||
),
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
||||
@@ -71,7 +71,7 @@ impl TlsAcceptor {
|
||||
let err = io::Error::new(io::ErrorKind::Other, format!("setting certificate: {}", err));
|
||||
return Err(err);
|
||||
}
|
||||
config.set_protocols(&["h2".into(), "http/1.1".into()]);
|
||||
// config.set_protocols(&["h2".into(), "http/1.1".into()]);
|
||||
|
||||
let server_config = Arc::new(config);
|
||||
|
||||
@@ -101,7 +101,7 @@ impl TlsAcceptor {
|
||||
match rustls::internal::pemfile::rsa_private_keys(&mut BufReader::new(key)) {
|
||||
Ok(pk) => Ok(pk),
|
||||
Err(..) => {
|
||||
let err = io::Error::new(io::ErrorKind::InvalidData, "error while loading PKCS #8 private keys");
|
||||
let err = io::Error::new(io::ErrorKind::InvalidData, "error while loading RSA private keys");
|
||||
Err(err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user