Fixes in SWID entity support

This commit is contained in:
Andreas Steffen
2014-06-08 11:13:51 +02:00
parent 4f31b3f724
commit 352fd7a94b
2 changed files with 7 additions and 19 deletions
@@ -8,13 +8,5 @@
<Entity <Entity
name="strongSwan Project" name="strongSwan Project"
regid="regid.2004-03.org.strongswan" regid="regid.2004-03.org.strongswan"
role="tagcreator"/> role="publisher licensor tagcreator"/>
<Entity
name="strongSwan Project"
regid="regid.2004-03.org.strongswan"
role="publisher"/>
<Entity
name="strongSwan Project"
regid="regid.2004-03.org.strongswan"
role="licensor"/>
</SoftwareIdentity> </SoftwareIdentity>
+6 -10
View File
@@ -159,7 +159,6 @@ static status_t generate_tags(private_swid_inventory_t *this, char *generator,
{ {
FILE *file; FILE *file;
char command[BUF_LEN]; char command[BUF_LEN];
char entity_name[] = "strongSwan Project";
char doc_separator[] = "'\n\n'"; char doc_separator[] = "'\n\n'";
status_t status = SUCCESS; status_t status = SUCCESS;
@@ -169,10 +168,9 @@ static status_t generate_tags(private_swid_inventory_t *this, char *generator,
/* Assemble the SWID generator command */ /* Assemble the SWID generator command */
if (this->full_tags) if (this->full_tags)
{ {
snprintf(command, BUF_LEN, "%s swid --entity-name \"%s\" " snprintf(command, BUF_LEN, "%s swid --doc-separator %s%s%s",
"--doc-separator %s%s%s", generator, doc_separator, pretty ? " --pretty" : "",
generator, entity_name, doc_separator, full ? " --full" : "");
pretty ? " --pretty" : "", full ? " --full" : "");
} }
else else
{ {
@@ -217,11 +215,9 @@ static status_t generate_tags(private_swid_inventory_t *this, char *generator,
unique_sw_id.len, unique_sw_id.ptr); unique_sw_id.len, unique_sw_id.ptr);
/* Assemble the SWID generator command */ /* Assemble the SWID generator command */
snprintf(command, BUF_LEN, "%s swid --software-id %s " snprintf(command, BUF_LEN, "%s swid --software-id %s%s%s",
"--entity-name \"%s\"%s%s", generator, software_id, pretty ? " --pretty" : "",
generator, software_id, entity_name, full ? " --full" : "");
pretty ? " --pretty" : "",
full ? " --full" : "");
/* Open a pipe stream for reading the SWID generator output */ /* Open a pipe stream for reading the SWID generator output */
file = popen(command, "r"); file = popen(command, "r");