Deleted Added
full compact
dgst.c (68651) dgst.c (79998)
1/* apps/dgst.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *

--- 59 unchanged lines hidden (view full) ---

68#include <openssl/pem.h>
69
70#undef BUFSIZE
71#define BUFSIZE 1024*8
72
73#undef PROG
74#define PROG dgst_main
75
1/* apps/dgst.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *

--- 59 unchanged lines hidden (view full) ---

68#include <openssl/pem.h>
69
70#undef BUFSIZE
71#define BUFSIZE 1024*8
72
73#undef PROG
74#define PROG dgst_main
75
76void do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, char binout,
76void do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
77 EVP_PKEY *key, unsigned char *sigin, int siglen);
78
79int MAIN(int, char **);
80
81int MAIN(int argc, char **argv)
82 {
83 unsigned char *buf=NULL;
84 int i,err=0;
85 const EVP_MD *md=NULL,*m;
86 BIO *in=NULL,*inp;
87 BIO *bmd=NULL;
88 BIO *out = NULL;
89 const char *name;
90#define PROG_NAME_SIZE 16
91 char pname[PROG_NAME_SIZE];
92 int separator=0;
93 int debug=0;
94 const char *outfile = NULL, *keyfile = NULL;
95 const char *sigfile = NULL, *randfile = NULL;
77 EVP_PKEY *key, unsigned char *sigin, int siglen);
78
79int MAIN(int, char **);
80
81int MAIN(int argc, char **argv)
82 {
83 unsigned char *buf=NULL;
84 int i,err=0;
85 const EVP_MD *md=NULL,*m;
86 BIO *in=NULL,*inp;
87 BIO *bmd=NULL;
88 BIO *out = NULL;
89 const char *name;
90#define PROG_NAME_SIZE 16
91 char pname[PROG_NAME_SIZE];
92 int separator=0;
93 int debug=0;
94 const char *outfile = NULL, *keyfile = NULL;
95 const char *sigfile = NULL, *randfile = NULL;
96 char out_bin = -1, want_pub = 0, do_verify = 0;
96 int out_bin = -1, want_pub = 0, do_verify = 0;
97 EVP_PKEY *sigkey = NULL;
98 unsigned char *sigbuf = NULL;
99 int siglen = 0;
100
101 apps_startup();
102
103 if ((buf=(unsigned char *)OPENSSL_malloc(BUFSIZE)) == NULL)
104 {

--- 228 unchanged lines hidden (view full) ---

333 if (in != NULL) BIO_free(in);
334 BIO_free_all(out);
335 EVP_PKEY_free(sigkey);
336 if(sigbuf) OPENSSL_free(sigbuf);
337 if (bmd != NULL) BIO_free(bmd);
338 EXIT(err);
339 }
340
97 EVP_PKEY *sigkey = NULL;
98 unsigned char *sigbuf = NULL;
99 int siglen = 0;
100
101 apps_startup();
102
103 if ((buf=(unsigned char *)OPENSSL_malloc(BUFSIZE)) == NULL)
104 {

--- 228 unchanged lines hidden (view full) ---

333 if (in != NULL) BIO_free(in);
334 BIO_free_all(out);
335 EVP_PKEY_free(sigkey);
336 if(sigbuf) OPENSSL_free(sigbuf);
337 if (bmd != NULL) BIO_free(bmd);
338 EXIT(err);
339 }
340
341void do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, char binout,
341void do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
342 EVP_PKEY *key, unsigned char *sigin, int siglen)
343 {
344 int len;
345 int i;
346
347 for (;;)
348 {
349 i=BIO_read(bp,(char *)buf,BUFSIZE);

--- 43 unchanged lines hidden ---
342 EVP_PKEY *key, unsigned char *sigin, int siglen)
343 {
344 int len;
345 int i;
346
347 for (;;)
348 {
349 i=BIO_read(bp,(char *)buf,BUFSIZE);

--- 43 unchanged lines hidden ---