always include <string.h> (we do this in various other header files,
[openssl.git] / apps / enc.c
index a8b33874b0a068dccf535ebd3b77e74780319f45..1ba2ea2f68e1bd8201449dc0ae6283e3d40cc7d4 100644 (file)
@@ -78,7 +78,7 @@ int set_hex(char *in,unsigned char *out,int size);
 #define BSIZE  (8*1024)
 #define        PROG    enc_main
 
-void show_ciphers(const OBJ_NAME *name,void *bio_)
+static void show_ciphers(const OBJ_NAME *name,void *bio_)
        {
        BIO *bio=bio_;
        static int n;
@@ -117,8 +117,8 @@ int MAIN(int argc, char **argv)
        const EVP_CIPHER *cipher=NULL,*c;
        char *inf=NULL,*outf=NULL;
        BIO *in=NULL,*out=NULL,*b64=NULL,*benc=NULL,*rbio=NULL,*wbio=NULL;
-#define PROG_NAME_SIZE  16
-       char pname[PROG_NAME_SIZE];
+#define PROG_NAME_SIZE  39
+       char pname[PROG_NAME_SIZE+1];
        char *engine = NULL;
 
        apps_startup();
@@ -127,6 +127,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;
+
        /* first check the program name */
        program_name(argv[0],pname,PROG_NAME_SIZE);
        if (strcmp(pname,"base64") == 0)