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

Eliminate get_tag() and parse_tags(). #743

Merged
merged 7 commits into from
Sep 12, 2019

Conversation

janowagner
Copy link
Member

@janowagner janowagner commented Sep 8, 2019

The function get_tag() only parses the cvss_base_vector
from the incoming OSP XML for a VT and adds it to the nvti tags
string.

Using the new function nvt_add_tag() makes avoids the knowledge
about the internal syntax (pipe-separated list).

This last tag that is parsed is now located in function nvti_from_vt().

Also this removes the parsing for "cvss_base" inside the tags
string which happened in nvti_from_vt(). Actually it is not being
parsed anyway but rather computed from the vector.

This is done now directly after parsing the cvss_base_vector from
XML inside nvt_from_vt().

An in turn this make it possible to remove parse_tags() function,
another place where the internal knowledge about the pipe-separated
syntax for tags was present.

This requires greenbone/gvm-libs#263

Checklist:

The function get_tag() only parses the cvss_base_vector
from the incoming OSP XML for a VT and adds it to the nvti tags
string.

Using the new function nvt_add_tag() makes avoids the knowledge
about the internal syntax (pipe-separated list).

This last tag that is parsed is now located in function nvti_from_vt().

Also this removes the parsing for "cvss_base" inside the tags
string which happened in nvti_from_vt(). Actually it is not being
parsed anyway but rather computed from the vector.
This finally removes the parse_tags() function that was
aware of the pipe-separated internal syntax of tags.
@janowagner janowagner changed the title Eliminate remains of get_tag(). Eliminate get_tag() and parse_tags(). Sep 8, 2019
@janowagner janowagner marked this pull request as ready for review September 10, 2019 21:14
Copy link
Contributor

@mattmundell mattmundell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice to see this tag format going. Just a couple minor requests.

src/manage_sql_nvts.c Outdated Show resolved Hide resolved
src/manage_sql_nvts.c Outdated Show resolved Hide resolved
@mattmundell mattmundell merged commit 4aee748 into greenbone:master Sep 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants