]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
sdp: log media's encryption key
authorGiuseppe Longo <giuseppe@glongo.it>
Fri, 4 Oct 2024 12:45:59 +0000 (14:45 +0200)
committerVictor Julien <victor@inliniac.net>
Wed, 2 Apr 2025 20:36:16 +0000 (22:36 +0200)
The encryption key subfield of the media description field is not
logged when it should be.

Ticket #7305

etc/schema.json
rust/src/sdp/logger.rs

index 96c3e478b8ad0d798f47de4a587ed2a5e4fac9e1..901b964a395d4484585044c051d6e9e448196e6f 100644 (file)
                                         "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":
index 43e16049ab598444da591851b1b20553b9aeaf4d..f5d3b6fdd0f65c992f655ecaf0becc48c7b689c0 100644 (file)
@@ -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)?;
             }