From: Giuseppe Longo Date: Fri, 4 Oct 2024 12:45:59 +0000 (+0200) Subject: sdp: log media's encryption key X-Git-Tag: suricata-8.0.0-beta1~111 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=891da0fa4a814336f90562ced003dfe5ddd1627f;p=thirdparty%2Fsuricata.git sdp: log media's encryption key The encryption key subfield of the media description field is not logged when it should be. Ticket #7305 --- diff --git a/etc/schema.json b/etc/schema.json index 96c3e478b8..901b964a39 100644 --- a/etc/schema.json +++ b/etc/schema.json @@ -4222,6 +4222,12 @@ "optional": true, "description": "Connection data per media description" }, + "encryption_key": { + "type": "string", + "optional": true, + "description": + "Field used to convey encryption keys if SDP is used over a secure channel" + }, "attributes": { "type": "array", "description": diff --git a/rust/src/sdp/logger.rs b/rust/src/sdp/logger.rs index 43e16049ab..f5d3b6fdd0 100644 --- a/rust/src/sdp/logger.rs +++ b/rust/src/sdp/logger.rs @@ -102,6 +102,9 @@ fn log_media_description( if let Some(conn_data) = &m.connection_data { log_connection_data(conn_data, js)?; } + if let Some(enc_key) = &m.encryption_key { + js.set_string("encryption_key", enc_key)?; + } if let Some(attrs) = &m.attributes { log_attributes(attrs, js)?; }