X-Git-Url: https://git.openssl.org/?a=blobdiff_plain;f=apps%2Fdgst.c;h=9107a5230d1917064ca65d8abbce7e8ba6bfe7aa;hb=7a01a45bc4f067a86df97dcb2bac829de33eba6e;hp=86d60c53da5a148e5be164e5b863480da30c9d7e;hpb=dfeab0689f69c0b4bd3480ffd37a9cacc2f17d9c;p=openssl.git diff --git a/apps/dgst.c b/apps/dgst.c index 86d60c53da..9107a5230d 100644 --- a/apps/dgst.c +++ b/apps/dgst.c @@ -60,12 +60,12 @@ #include #include #include "apps.h" -#include "bio.h" -#include "err.h" -#include "evp.h" -#include "objects.h" -#include "x509.h" -#include "pem.h" +#include +#include +#include +#include +#include +#include #undef BUFSIZE #define BUFSIZE 1024*8 @@ -73,22 +73,15 @@ #undef PROG #define PROG dgst_main -#ifndef NOPROTO void do_fp(unsigned char *buf,BIO *f,int sep); -#else -void do_fp(); -#endif - -int MAIN(argc,argv) -int argc; -char **argv; +int MAIN(int argc, char **argv) { unsigned char *buf=NULL; int i,err=0; - EVP_MD *md=NULL,*m; + const EVP_MD *md=NULL,*m; BIO *in=NULL,*inp; BIO *bmd=NULL; - char *name; + const char *name; #define PROG_NAME_SIZE 16 char pname[PROG_NAME_SIZE]; int separator=0; @@ -112,7 +105,7 @@ char **argv; argc--; argv++; - for (i=0; i 0) { if ((*argv)[0] != '-') break; if (strcmp(*argv,"-c") == 0) @@ -203,10 +196,7 @@ end: EXIT(err); } -void do_fp(buf,bp,sep) -unsigned char *buf; -BIO *bp; -int sep; +void do_fp(unsigned char *buf, BIO *bp, int sep) { int len; int i;