use crate::flow::Flow;
use crate::frames::Frame;
use nom7::Err;
-use suricata_sys::sys::AppProto;
use std::ffi::CString;
use std::sync::atomic::{AtomicBool, Ordering};
+use suricata_sys::sys::AppProto;
#[repr(C)]
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
#[allow(non_camel_case_types)]
pub enum SshEncryptionHandling {
SSH_HANDLE_ENCRYPTION_TRACK_ONLY = 0, // Disable raw content inspection, continue tracking
- SSH_HANDLE_ENCRYPTION_BYPASS = 1, // Skip processing of flow, bypass if possible
- SSH_HANDLE_ENCRYPTION_FULL = 2, // Handle fully like any other protocol
+ SSH_HANDLE_ENCRYPTION_BYPASS = 1, // Skip processing of flow, bypass if possible
+ SSH_HANDLE_ENCRYPTION_FULL = 2, // Handle fully like any other protocol
}
static mut ALPROTO_SSH: AppProto = ALPROTO_UNKNOWN;
static HASSH_ENABLED: AtomicBool = AtomicBool::new(false);
-static mut ENCRYPTION_BYPASS_ENABLED: SshEncryptionHandling = SshEncryptionHandling::SSH_HANDLE_ENCRYPTION_TRACK_ONLY;
+static mut ENCRYPTION_BYPASS_ENABLED: SshEncryptionHandling =
+ SshEncryptionHandling::SSH_HANDLE_ENCRYPTION_TRACK_ONLY;
fn hassh_is_enabled() -> bool {
HASSH_ENABLED.load(Ordering::Relaxed)