From: Nikos Mavrogiannopoulos Date: Mon, 27 Feb 2017 15:47:55 +0000 (+0100) Subject: certtool: store critical extensions even if no other extension are present X-Git-Tag: gnutls_3_6_0~939 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=eb4055ff9548a86161a74bc29d15e337ffcfb975;p=thirdparty%2Fgnutls.git 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 --- 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) {