handle TLS attack
included net attack count on non supported tls connection counted as attack for tls without client cert and missing quote on tls client cert
This commit is contained in:
parent
8226f03e7c
commit
9e9036280d
@ -93,7 +93,14 @@ impl NodeServer {
|
|||||||
|
|
||||||
let conn = if let Err(e) = conn {
|
let conn = if let Err(e) = conn {
|
||||||
println!("Error accepting TLS connection: {e}");
|
println!("Error accepting TLS connection: {e}");
|
||||||
if e.to_string().contains("HandshakeFailure") {
|
let attack_error_messages = [
|
||||||
|
"HandshakeFailure",
|
||||||
|
"peer sent no certificates", // "NoCertificatesPresented",
|
||||||
|
"Not found quote extension",
|
||||||
|
];
|
||||||
|
|
||||||
|
let err_str = e.to_string();
|
||||||
|
if attack_error_messages.iter().any(|att_er_str| err_str.contains(att_er_str)) {
|
||||||
state.increase_net_attacks().await;
|
state.increase_net_attacks().await;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user