#include <stdlib.h>
#include <string.h>
#include "apps.h"
-#include "bio.h"
-#include "err.h"
-#include "evp.h"
-#include "objects.h"
-#include "x509.h"
+#include <openssl/bio.h>
+#include <openssl/err.h>
+#include <openssl/evp.h>
+#include <openssl/objects.h>
+#include <openssl/x509.h>
#ifdef NO_MD5
-#include "md5.h"
+#include <openssl/md5.h>
#endif
-#include "pem.h"
+#include <openssl/pem.h>
-#ifndef NOPROTO
int set_hex(char *in,unsigned char *out,int size);
-#else
-int set_hex();
-#endif
-
#undef SIZE
#undef BSIZE
#undef PROG
#define BSIZE (8*1024)
#define PROG enc_main
-int MAIN(argc,argv)
-int argc;
-char **argv;
+int MAIN(int argc, char **argv)
{
char *strbuf=NULL;
unsigned char *buff=NULL,*bufsize=NULL;
char *hkey=NULL,*hiv=NULL;
int enc=1,printkey=0,i,base64=0;
int debug=0,olb64=0;
- EVP_CIPHER *cipher=NULL,*c;
+ 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
EXIT(ret);
}
-int set_hex(in,out,size)
-char *in;
-unsigned char *out;
-int size;
+int set_hex(char *in, unsigned char *out, int size)
{
int i,n;
unsigned char j;