From 68ca81c8fea37cd14f743baa532033a93384ee72 Mon Sep 17 00:00:00 2001 From: Przemek Stekiel Date: Wed, 8 Mar 2023 15:14:47 +0100 Subject: [PATCH] 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 --- programs/x509/cert_req.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/programs/x509/cert_req.c b/programs/x509/cert_req.c index 74ade34d50..8baca81d8a 100644 --- a/programs/x509/cert_req.c +++ b/programs/x509/cert_req.c @@ -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'; }