OpenSSL CVS Repository
http://cvs.openssl.org/
____________________________________________________________
________________
Server: cvs.openssl.org Name: Dr.
Stephen Henson
Root: /v/openssl/cvs Email: steve openssl.org
Module: openssl Date:
21-May-2007 17:53:31
Branch: HEAD Handle:
2007052116533000
Modified files:
openssl/apps dgst.c s_server.c
Log:
Fixes for dgst tool. Initialize md_name, sig_name
properly. Return error code
on failure. Keep output format consistent with previous
versions.
Also flush stdout after printing ACCEPT in s_server.
Summary:
Revision Changes Path
1.48 +11 -15 openssl/apps/dgst.c
1.118 +1 -0 openssl/apps/s_server.c
____________________________________________________________
________________
patch -p0 <<' .'
Index: openssl/apps/dgst.c
============================================================
================
$ cvs diff -u -r1.47 -r1.48 dgst.c
--- openssl/apps/dgst.c 17 May 2007 16:42:05 -0000 1.47
+++ openssl/apps/dgst.c 21 May 2007 15:53:30 -0000 1.48
 -85,7 +85,7 
{
ENGINE *e = NULL;
unsigned char *buf=NULL;
- int i,err=0;
+ int i,err=1;
const EVP_MD *md=NULL,*m;
BIO *in=NULL,*inp;
BIO *bmd=NULL;
 -234,7 +234,6 
if(do_verify && !sigfile) {
BIO_printf(bio_err, "No signature to verify: use
the -signature optionn");
- err = 1;
goto end;
}
 -288,7 +287,6 
SN_whirlpool,SN_whirlpool);
#endif
err=1;
- goto end;
}
in=BIO_new(BIO_s_file());
 -313,8 +311,10 
}
if(out_bin == -1) {
- if(keyfile) out_bin = 1;
- else out_bin = 0;
+ if(keyfile)
+ out_bin = 1;
+ else
+ out_bin = 0;
}
if(randfile)
 -494,13 +494,8 
}
else
{
- const char *md_name, *sig_name;
- if(out_bin)
- {
- md_name = NULL;
- sig_name = NULL;
- }
- else
+ const char *md_name = NULL, *sig_name = NULL;
+ if(!out_bin)
{
if (sigkey)
{
 -512,6 +507,7 
}
md_name = EVP_MD_name(md);
}
+ err = 0;
for (i=0; i<argc; i++)
{
int r;
 -608,11 +604,11 
else
{
if (sig_name)
- BIO_printf(out, "%s-%s(%s)=", sig_name,
md_name, file);
+ BIO_printf(out, "%s-%s(%s)= ", sig_name,
md_name, file);
else if (md_name)
- BIO_printf(out, "%s(%s)=", md_name, file);
+ BIO_printf(out, "%s(%s)= ", md_name, file);
else
- BIO_printf(out, "(%s)=", file);
+ BIO_printf(out, "(%s)= ", file);
for (i=0; i<(int)len; i++)
{
if (sep && (i != 0))
 .
patch -p0 <<' .'
Index: openssl/apps/s_server.c
============================================================
================
$ cvs diff -u -r1.117 -r1.118 s_server.c
--- openssl/apps/s_server.c 29 Nov 2006 20:54:55
-0000 1.117
+++ openssl/apps/s_server.c 21 May 2007 15:53:30
-0000 1.118
 -1447,6 +1447,7 
}
BIO_printf(bio_s_out,"ACCEPTn");
+ BIO_flush(bio_s_out);
if (www)
do_server(port,socket_type,&accept_socket,www_body,
context);
else
 .
____________________________________________________________
__________
OpenSSL Project http://www.openssl.org
CVS Repository Commit List
openssl-cvs openssl.org
Automated List Manager
majordomo openssl.org
|