Spelling error.
[openssl.git] / apps / dhparam.c
index 00cf87bf6d47ff9a14687b6210f4ef889a22d6f0..cbc65bcc5f5e94c4686efb979e741e07a48861b6 100644 (file)
 #include <openssl/dh.h>
 #include <openssl/x509.h>
 #include <openssl/pem.h>
-#include <openssl/engine.h>
 
 #ifndef OPENSSL_NO_DSA
 #include <openssl/dsa.h>
@@ -167,6 +166,9 @@ int MAIN(int argc, char **argv)
                if ((bio_err=BIO_new(BIO_s_file())) != NULL)
                        BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
 
+       if (!load_config(bio_err, NULL))
+               goto end;
+
        infile=NULL;
        outfile=NULL;
        informat=FORMAT_PEM;
@@ -488,7 +490,7 @@ bad:
                printf("\tif ((dh->p == NULL) || (dh->g == NULL))\n");
                printf("\t\t{ DH_free(dh); return(NULL); }\n");
                if (dh->length)
-                       printf("\tdh->length = %d;\n", dh->length);
+                       printf("\tdh->length = %ld;\n", dh->length);
                printf("\treturn(dh);\n\t}\n");
                OPENSSL_free(data);
                }
@@ -517,7 +519,7 @@ end:
        if (out != NULL) BIO_free_all(out);
        if (dh != NULL) DH_free(dh);
        apps_shutdown();
-       EXIT(ret);
+       OPENSSL_EXIT(ret);
        }
 
 /* dh_cb is identical to dsa_cb in apps/dsaparam.c */