]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - apps/lib/app_rand.c
APPS: replace awkward and error-prone pattern by calls to new app_conf_try_string()
[thirdparty/openssl.git] / apps / lib / app_rand.c
index ad93858bfdbd7f76e8e7afa37e85a9103ef60d25..9691e71d7c7220621fa077afad0ac01762007cfb 100644 (file)
@@ -18,12 +18,10 @@ static STACK_OF(OPENSSL_STRING) *randfiles;
 
 void app_RAND_load_conf(CONF *c, const char *section)
 {
-    const char *randfile = NCONF_get_string(c, section, "RANDFILE");
+    const char *randfile = app_conf_try_string(c, section, "RANDFILE");
 
-    if (randfile == NULL) {
-        ERR_clear_error();
+    if (randfile == NULL)
         return;
-    }
     if (RAND_load_file(randfile, -1) < 0) {
         BIO_printf(bio_err, "Can't load %s into RNG\n", randfile);
         ERR_print_errors(bio_err);