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>
diff --git a/programs/x509/cert_req.c b/programs/x509/cert_req.c
index 74ade34..8baca81 100644
--- a/programs/x509/cert_req.c
+++ b/programs/x509/cert_req.c
@@ -198,13 +198,11 @@
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 @@
prev = NULL;
while (q != NULL) {
- if ((r = strchr(q, ',')) != NULL) {
+ if ((r = strchr(q, ';')) != NULL) {
*r++ = '\0';
}