Docs for cipher and base64 BIOs.
[openssl.git] / apps / openssl.c
index 9ddd5364540f534bb694f382f14f6b46d1ac1b20..c3680c5e711661b15c4edbacda642cf7c04adc13 100644 (file)
@@ -59,6 +59,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
+#define OPENSSL_C /* tells apps.h to use complete apps_startup() */
 #include <openssl/bio.h>
 #include <openssl/crypto.h>
 #include <openssl/lhash.h>
@@ -67,7 +68,6 @@
 #include <openssl/pem.h>
 #include <openssl/ssl.h>
 #define USE_SOCKETS /* needed for the _O_BINARY defs in the MS world */
-#define OPENSSL_C /* tells apps.h to use complete apps_startup() */
 #include "apps.h"
 #include "progs.h"
 #include "s_apps.h"
@@ -101,6 +101,8 @@ int main(int Argc, char *Argv[])
        arg.data=NULL;
        arg.count=0;
 
+       if (getenv("OPENSSL_DEBUG_MEMORY") != NULL)
+               CRYPTO_malloc_debug_init();
        CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON);
 
        apps_startup();
@@ -201,12 +203,12 @@ end:
                config=NULL;
                }
        if (prog != NULL) lh_free(prog);
-       if (arg.data != NULL) Free(arg.data);
+       if (arg.data != NULL) OPENSSL_free(arg.data);
        ERR_remove_state(0);
 
        EVP_cleanup();
        ERR_free_strings();
-
+       
        CRYPTO_mem_leaks(bio_err);
        if (bio_err != NULL)
                {