diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2017-02-27 16:47:55 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2017-02-27 16:57:25 +0100 |
commit | eb4055ff9548a86161a74bc29d15e337ffcfb975 (patch) | |
tree | 7ee9e9d207f0885aabba946bbbe89268e15115d2 | |
parent | 43710a0a46d28e40bc20951d07a123de37eefe62 (diff) | |
download | gnutls-eb4055ff9548a86161a74bc29d15e337ffcfb975.tar.gz |
certtool: store critical extensions even if no other extension are present
That is, fix a bug which prevented critical extensions to be stored
if no other free-form extensions were specified.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
-rw-r--r-- | src/certtool-cfg.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/certtool-cfg.c b/src/certtool-cfg.c index ae271e10b1..7bbab9c423 100644 --- a/src/certtool-cfg.c +++ b/src/certtool-cfg.c @@ -1219,7 +1219,7 @@ void get_extensions_crt_set(int type, void *crt) if (batch) { if (!cfg.extensions) - return; + goto check_critical; for (i = 0; cfg.extensions[i] != NULL; i += 2) { if (cfg.extensions[i + 1] == NULL) { fprintf(stderr, @@ -1250,6 +1250,7 @@ void get_extensions_crt_set(int type, void *crt) } } + check_critical: if (!cfg.crit_extensions) return; for (i = 0; cfg.crit_extensions[i] != NULL; i += 2) { |