diff options
author | Bodo Möller <bodo@openssl.org> | 2000-12-15 16:59:49 +0000 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 2000-12-15 16:59:49 +0000 |
commit | 2c0d10123eac1117d64a8476bbc1f730439403ab (patch) | |
tree | 3196fcc55a6cb92193953d55a890314bde77a217 /apps/x509.c | |
parent | 3ac82faae5eb02140f347610be0726f549a0aa0a (diff) | |
download | openssl-2c0d10123eac1117d64a8476bbc1f730439403ab.tar.gz |
If CONF_get_string returns NULL and we want to tolerate this
(e.g., use a default), we have to call ERR_clear_error().
Diffstat (limited to 'apps/x509.c')
-rw-r--r-- | apps/x509.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/apps/x509.c b/apps/x509.c index de25790145..9422e1d15c 100644 --- a/apps/x509.c +++ b/apps/x509.c @@ -498,8 +498,15 @@ bad: ,errorline,extfile); goto end; } - if (!extsect && !(extsect = CONF_get_string(extconf, "default", - "extensions"))) extsect = "default"; + if (!extsect) + { + extsect = CONF_get_string(extconf, "default", "extensions"); + if (!extsect) + { + ERR_clear_error(); + extsect = "default"; + } + } X509V3_set_ctx_test(&ctx2); X509V3_set_conf_lhash(&ctx2, extconf); if (!X509V3_EXT_add_conf(extconf, &ctx2, extsect, NULL)) |