convert comma-separated RDNs into slash-separated OpenSSL --subject format

This commit is contained in:
Andreas Steffen
2008-06-05 19:28:08 +00:00
parent 6649a3ca80
commit 1e5522ffd7
+3 -13
View File
@@ -315,14 +315,14 @@ static enumerator_t *create_lease_query(char *filter)
NULL NULL
}; };
/* if the filter string contains a distinguished name as a ID, we filter /* if the filter string contains a distinguished name as a ID, we replace
* out ", " and replace them by "; " to not confuse the getsubopt parser */ * ", " by "/ " in order to not confuse the getsubopt parser */
pos = filter; pos = filter;
while ((pos = strchr(pos, ','))) while ((pos = strchr(pos, ',')))
{ {
if (pos[1] == ' ') if (pos[1] == ' ')
{ {
pos[0] = ';'; pos[0] = '/';
} }
pos++; pos++;
} }
@@ -340,16 +340,6 @@ static enumerator_t *create_lease_query(char *filter)
case FIL_ID: case FIL_ID:
if (value) if (value)
{ {
/* now re-replace the "; " by ", " */
pos = value;
while ((pos = strchr(pos, ';')))
{
if (pos[1] == ' ')
{
pos[0] = ',';
}
pos++;
}
id = identification_create_from_string(value); id = identification_create_from_string(value);
} }
if (!id) if (!id)