Only use DSA-functions if available.
[openssl.git] / apps / s_client.c
index 15a63cc9e6a8029daa9048a817fa8fe48afe7b08..658a79d390654a8c5f414cf21f86467d601a1a34 100644 (file)
@@ -271,6 +271,9 @@ int MAIN(int argc, char **argv)
        if (bio_err == NULL)
                bio_err=BIO_new_fp(stderr,BIO_NOCLOSE);
 
+       if (!load_config(bio_err, NULL))
+               goto end;
+
        if (    ((cbuf=OPENSSL_malloc(BUFSIZZ)) == NULL) ||
                ((sbuf=OPENSSL_malloc(BUFSIZZ)) == NULL) ||
                ((mbuf=OPENSSL_malloc(BUFSIZZ)) == NULL))
@@ -430,6 +433,11 @@ bad:
                goto end;
                }
 
+       OpenSSL_add_ssl_algorithms();
+       SSL_load_error_strings();
+
+        e = setup_engine(bio_err, engine_id, 1);
+
        if (!app_RAND_load_file(NULL, bio_err, 1) && inrand == NULL
                && !RAND_status())
                {
@@ -452,11 +460,6 @@ bad:
                        }
                }
 
-       OpenSSL_add_ssl_algorithms();
-       SSL_load_error_strings();
-
-        e = setup_engine(bio_err, engine_id, 1);
-
        ctx=SSL_CTX_new(meth);
        if (ctx == NULL)
                {