projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Avoid a warning.
[oweals/openssl.git]
/
apps
/
dgst.c
diff --git
a/apps/dgst.c
b/apps/dgst.c
index eea291db1274f907c27b61ab2c02d5e5eded113f..9107a5230d1917064ca65d8abbce7e8ba6bfe7aa 100644
(file)
--- a/
apps/dgst.c
+++ b/
apps/dgst.c
@@
-60,12
+60,12
@@
#include <string.h>
#include <stdlib.h>
#include "apps.h"
#include <string.h>
#include <stdlib.h>
#include "apps.h"
-#include
"bio.h"
-#include
"err.h"
-#include
"evp.h"
-#include
"objects.h"
-#include
"x509.h"
-#include
"pem.h"
+#include
<openssl/bio.h>
+#include
<openssl/err.h>
+#include
<openssl/evp.h>
+#include
<openssl/objects.h>
+#include
<openssl/x509.h>
+#include
<openssl/pem.h>
#undef BUFSIZE
#define BUFSIZE 1024*8
#undef BUFSIZE
#define BUFSIZE 1024*8
@@
-73,22
+73,15
@@
#undef PROG
#define PROG dgst_main
#undef PROG
#define PROG dgst_main
-#ifndef NOPROTO
void do_fp(unsigned char *buf,BIO *f,int sep);
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;
{
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;
BIO *in=NULL,*inp;
BIO *bmd=NULL;
- char *name;
+ c
onst c
har *name;
#define PROG_NAME_SIZE 16
char pname[PROG_NAME_SIZE];
int separator=0;
#define PROG_NAME_SIZE 16
char pname[PROG_NAME_SIZE];
int separator=0;
@@
-112,7
+105,7
@@
char **argv;
argc--;
argv++;
argc--;
argv++;
-
for (i=0; i<argc; i++
)
+
while (argc > 0
)
{
if ((*argv)[0] != '-') break;
if (strcmp(*argv,"-c") == 0)
{
if ((*argv)[0] != '-') break;
if (strcmp(*argv,"-c") == 0)
@@
-146,6
+139,8
@@
char **argv;
LN_sha,LN_sha);
BIO_printf(bio_err,"-%3s to use the %s message digest algorithm\n",
LN_mdc2,LN_mdc2);
LN_sha,LN_sha);
BIO_printf(bio_err,"-%3s to use the %s message digest algorithm\n",
LN_mdc2,LN_mdc2);
+ BIO_printf(bio_err,"-%3s to use the %s message digest algorithm\n",
+ LN_ripemd160,LN_ripemd160);
err=1;
goto end;
}
err=1;
goto end;
}
@@
-201,10
+196,7
@@
end:
EXIT(err);
}
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;
{
int len;
int i;