diff options
author | Simon Josefsson <simon@josefsson.org> | 2009-02-24 10:01:05 +0100 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2009-02-24 10:01:05 +0100 |
commit | 9d80f84bd37c64412b9b19dd160a523d42d28a9f (patch) | |
tree | 6abb53700b42dca853a3c95a4545121102b5d3e8 /src | |
parent | 3df7edeb17c9e486887d86ba46f5935b5b17121c (diff) | |
download | gnutls-9d80f84bd37c64412b9b19dd160a523d42d28a9f.tar.gz |
certtool: Query for multiple dnsName subjectAltName in interactive mode.
Diffstat (limited to 'src')
-rw-r--r-- | src/certtool-cfg.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/src/certtool-cfg.c b/src/certtool-cfg.c index fc77307c53..074a0cc058 100644 --- a/src/certtool-cfg.c +++ b/src/certtool-cfg.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation + * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation * * This file is part of GNUTLS. * @@ -983,18 +983,20 @@ get_dns_name_set (int type, void *crt) { const char *p; - p = read_str ("Enter the dnsName of the subject of the certificate: "); - if (!p) - return; + do + { + p = read_str ("Enter a dnsName of the subject of the certificate: "); + if (!p) + return; - if (type == TYPE_CRT) - ret = gnutls_x509_crt_set_subject_alt_name (crt, GNUTLS_SAN_DNSNAME, - p, strlen (p), - GNUTLS_FSAN_APPEND); - else - ret = gnutls_x509_crq_set_subject_alt_name (crt, GNUTLS_SAN_DNSNAME, - p, strlen (p), - GNUTLS_FSAN_APPEND); + if (type == TYPE_CRT) + ret = gnutls_x509_crt_set_subject_alt_name + (crt, GNUTLS_SAN_DNSNAME, p, strlen (p), GNUTLS_FSAN_APPEND); + else + ret = gnutls_x509_crq_set_subject_alt_name + (crt, GNUTLS_SAN_DNSNAME, p, strlen (p), GNUTLS_FSAN_APPEND); + } + while (p); } if (ret < 0) |