#include <string.h>
#include <stdlib.h>
#define OPENSSL_C /* tells apps.h to use complete apps_startup() */
+#include "apps.h"
#include <openssl/bio.h>
#include <openssl/crypto.h>
#include <openssl/lhash.h>
#include <openssl/ssl.h>
#include <openssl/engine.h>
#define USE_SOCKETS /* needed for the _O_BINARY defs in the MS world */
-#include "apps.h"
#include "progs.h"
#include "s_apps.h"
#include <openssl/err.h>
static int MS_CALLBACK cmp(const void *a_void,const void *b_void);
static LHASH *prog_init(void );
static int do_cmd(LHASH *prog,int argc,char *argv[]);
-CONF *config=NULL;
char *default_config_file=NULL;
/* Make sure there is only one when MONOLITH is defined */
#ifdef MONOLITH
+CONF *config=NULL;
BIO *bio_err=NULL;
#endif
int main(int Argc, char *Argv[])
{
ARGS arg;
-#define PROG_NAME_SIZE 16
- char pname[PROG_NAME_SIZE];
+#define PROG_NAME_SIZE 39
+ char pname[PROG_NAME_SIZE+1];
FUNCTION f,*fp;
MS_STATIC char *prompt,buf[1024],config_name[256];
int n,i,ret=0;
config=NCONF_new(NULL);
i=NCONF_load(config,p,&errline);
- if (i == 0) ERR_clear_error();
+ if (i == 0)
+ {
+ NCONF_free(config);
+ config = NULL;
+ ERR_clear_error();
+ }
prog=prog_init();