Change separator for SAN names to ';'

When ';' is used as a separator san names must be provided in quotation marks:
./cert_req filename=../../tests/data_files/server8.key subject_name=dannybackx.hopto.org san="URI:http://pki.example.com/;IP:127.1.1.0;DNS:example.com"

Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
This commit is contained in:
Przemek Stekiel 2023-03-08 15:14:47 +01:00
parent 07c5ea348c
commit 68ca81c8fe

View file

@ -198,13 +198,11 @@ usage:
opt.san_list = NULL;
for (i = 1; i < argc; i++) {
p = argv[i];
if ((q = strchr(p, '=')) == NULL) {
goto usage;
}
*q++ = '\0';
if (strcmp(p, "filename") == 0) {
opt.filename = q;
} else if (strcmp(p, "password") == 0) {
@ -222,7 +220,7 @@ usage:
prev = NULL;
while (q != NULL) {
if ((r = strchr(q, ',')) != NULL) {
if ((r = strchr(q, ';')) != NULL) {
*r++ = '\0';
}