Skip to content

Commit b94169d

Browse files
committed
Change: gpg verification failure handling of notus advisories sha256sums
When gpg verification on sha256sums for notus advisories fails it is printing a warning instead of crashing ospd-openvas. This changes the behaviour mentioned in #765 (cherry picked from commit 9d0bd4e)
1 parent fc50d3b commit b94169d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ospd_openvas/notus.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ def hashsum_verificator(
4747
def on_hash_sum_verification_failure(
4848
_: Optional[Dict[str, str]]
4949
) -> Dict[str, str]:
50-
raise Exception("GPG verification of notus sha256sums failed")
50+
logger.warning(
51+
"GPG verification of notus sha256sums failed."
52+
" Notus advisories are not loaded."
53+
)
54+
return {}
5155

5256
sha_sum_file_path = advisories_directory_path / "sha256sums"
5357
sha_sum_reload_config = ReloadConfiguration(

0 commit comments

Comments
 (0)