Make the script a little more location agnostic
[openssl.git] / apps / openssl.c
index 1c880d90ba1d142416ca8d1cbd16668be0a8aec8..7453e6528c9de99900c0ee675d01bead7c824b04 100644 (file)
 #include "apps.h"
 #include <openssl/bio.h>
 #include <openssl/crypto.h>
+#include <openssl/rand.h>
 #include <openssl/lhash.h>
 #include <openssl/conf.h>
 #include <openssl/x509.h>
@@ -237,7 +238,8 @@ int main(int Argc, char *ARGV[])
        long errline;
 
 #if defined( OPENSSL_SYS_VMS) && (__INITIAL_POINTER_SIZE == 64)
-       /* 2011-03-22 SMS.
+       /*- 
+        * 2011-03-22 SMS.
         * If we have 32-bit pointers everywhere, then we're safe, and
         * we bypass this mess, as on non-VMS systems.  (See ARGV,
         * above.)
@@ -434,9 +436,7 @@ end:
        if (prog != NULL) lh_FUNCTION_free(prog);
        if (arg.data != NULL) OPENSSL_free(arg.data);
 
-       apps_shutdown();
 
-       CRYPTO_mem_leaks(bio_err);
        if (bio_err != NULL)
                {
                BIO_free(bio_err);
@@ -449,6 +449,9 @@ end:
                OPENSSL_free(Argv);
                }
 #endif
+       apps_shutdown();
+       CRYPTO_mem_leaks(bio_err);
+
        OPENSSL_EXIT(ret);
        }