diff --git a/gvm/protocols/gmp/_gmpnext.py b/gvm/protocols/gmp/_gmpnext.py
index c67f798f..01ea2e94 100644
--- a/gvm/protocols/gmp/_gmpnext.py
+++ b/gvm/protocols/gmp/_gmpnext.py
@@ -314,6 +314,7 @@ def get_agent_support_bundle(
self,
agent_id: EntityID,
days: int = 0,
+ encryption: bool = True,
) -> T:
"""Request a support bundle for an agent.
@@ -321,6 +322,7 @@ def get_agent_support_bundle(
agent_id: ID of the agent to get the support bundle for.
days: Number of days of logs to include. If None, zero is sent so the
Agent Controller uses its configured default.
+ encryption: Whether an encrypted or plain support bundle is requested.
Raises:
RequiredArgument: If agent_id is missing.
@@ -330,6 +332,7 @@ def get_agent_support_bundle(
Agents.get_agent_support_bundle(
agent_id,
days=days,
+ encryption=encryption,
)
)
diff --git a/gvm/protocols/gmp/requests/next/_agents.py b/gvm/protocols/gmp/requests/next/_agents.py
index 361caef6..731c9fd3 100644
--- a/gvm/protocols/gmp/requests/next/_agents.py
+++ b/gvm/protocols/gmp/requests/next/_agents.py
@@ -438,6 +438,7 @@ def get_agent_support_bundle(
agent_id: EntityID,
*,
days: int = 0,
+ encryption: bool = True,
) -> Request:
"""Request a support bundle for an agent.
@@ -445,6 +446,7 @@ def get_agent_support_bundle(
agent_id: ID of the agent to get the support bundle for.
days: Number of days of logs to include. If None, zero is sent so the
Agent Controller uses its configured default.
+ encryption: Whether an encrypted or plain support bundle is requested.
Raises:
RequiredArgument: If agent_id is missing.
@@ -462,5 +464,6 @@ def get_agent_support_bundle(
cmd = XmlCommand("get_agent_support_bundle")
cmd.set_attribute("agent_uuid", str(agent_id))
cmd.set_attribute("days", str(days))
+ cmd.set_attribute("encryption", to_bool(encryption))
return cmd
diff --git a/tests/protocols/gmpnext/entities/agents/test_get_agent_support_bundle.py b/tests/protocols/gmpnext/entities/agents/test_get_agent_support_bundle.py
index 359a20fc..cf65e67e 100644
--- a/tests/protocols/gmpnext/entities/agents/test_get_agent_support_bundle.py
+++ b/tests/protocols/gmpnext/entities/agents/test_get_agent_support_bundle.py
@@ -13,7 +13,7 @@ def test_get_agent_support_bundle(self):
)
self.connection.send.has_been_called_with(
- b''
+ b''
)
def test_get_agent_support_bundle_without_days_uses_zero(self):
@@ -22,7 +22,7 @@ def test_get_agent_support_bundle_without_days_uses_zero(self):
)
self.connection.send.has_been_called_with(
- b''
+ b''
)
def test_get_agent_support_bundle_with_zero_days(self):
@@ -32,7 +32,18 @@ def test_get_agent_support_bundle_with_zero_days(self):
)
self.connection.send.has_been_called_with(
- b''
+ b''
+ )
+
+ def test_get_agent_support_bundle_with_zero_days_false_encryption(self):
+ self.gmp.get_agent_support_bundle(
+ agent_id="agent-123",
+ days=0,
+ encryption=False,
+ )
+
+ self.connection.send.has_been_called_with(
+ b''
)
def test_get_agent_support_bundle_without_agent_id(self):