Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add config for gpg keyring #407

Merged
merged 2 commits into from
Oct 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

### Changes
- The logging of the NASL internal regexp functions was extended to include the pattern in case of a failed regcomp(). [#397](https://github.com/greenbone/openvas/pull/397)
- Add config for gpg keyring path (OPENVAS_GPG_BASE_DIR) [#407](https://github.com/greenbone/openvas/pull/407)

[Unreleased]: https://github.com/greenbone/openvas/compare/openvas-7.0...master

Expand Down
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@ if (NOT GVM_ACCESS_KEY_DIR)
set (GVM_ACCESS_KEY_DIR "${GVM_SYSCONF_DIR}")
endif (NOT GVM_ACCESS_KEY_DIR)

if (NOT OPENVAS_GPG_BASE_DIR)
set (OPENVAS_GPG_BASE_DIR "${OPENVAS_SYSCONF_DIR}")
endif (NOT OPENVAS_GPG_BASE_DIR)

set (OPENVAS_LIB_INSTALL_DIR "${LIBDIR}")

set (OPENVAS_CONF "${OPENVAS_SYSCONF_DIR}/openvas.conf")
Expand Down
1 change: 1 addition & 0 deletions nasl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ add_definitions (-DOPENVAS_STATE_DIR="${OPENVAS_STATE_DIR}")
add_definitions (-DOPENVASLIB_VERSION="${NASL_VERSION_MAJOR}.${NASL_VERSION_MINOR}.${NASL_VERSION_PATCH}")
add_definitions (-DOPENVAS_SYSCONF_DIR="${OPENVAS_SYSCONF_DIR}")
add_definitions (-DOPENVAS_NASL_VERSION="${NASL_VERSION}")
add_definitions (-DOPENVAS_GPG_BASE_DIR="${OPENVAS_GPG_BASE_DIR}")

include_directories (${GLIB_INCLUDE_DIRS}
${GPGME_INCLUDE_DIRS}
Expand Down
2 changes: 1 addition & 1 deletion nasl/nasl_signature.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ nasl_verify_signature (const char *filename, const char *fcontent, size_t flen)
gchar *scontent = NULL;
gchar *offset = NULL;
gchar *endpos = NULL;
gchar *path = g_build_filename (OPENVAS_SYSCONF_DIR, "gnupg", NULL);
gchar *path = g_build_filename (OPENVAS_GPG_BASE_DIR, "gnupg", NULL);
gboolean success;
gpgme_error_t err;
gpgme_ctx_t ctx = gvm_init_gpgme_ctx_from_dir (path);
Expand Down