Avoid some shadowed variable names.

Submitted by: Nils Larsch
This commit is contained in:
Geoff Thorpe 2003-11-04 00:51:32 +00:00
parent c465e7941e
commit d8ec0dcf45
6 changed files with 21 additions and 21 deletions

View File

@ -944,7 +944,7 @@ static void print_stuff(BIO *bio, SSL *s, int full)
SSL_CIPHER *c; SSL_CIPHER *c;
X509_NAME *xn; X509_NAME *xn;
int j,i; int j,i;
const COMP_METHOD *comp, *exp; const COMP_METHOD *comp, *expansion;
if (full) if (full)
{ {
@ -1048,11 +1048,11 @@ static void print_stuff(BIO *bio, SSL *s, int full)
EVP_PKEY_free(pktmp); EVP_PKEY_free(pktmp);
} }
comp=SSL_get_current_compression(s); comp=SSL_get_current_compression(s);
exp=SSL_get_current_expansion(s); expansion=SSL_get_current_expansion(s);
BIO_printf(bio,"Compression: %s\n", BIO_printf(bio,"Compression: %s\n",
comp ? SSL_COMP_get_name(comp) : "NONE"); comp ? SSL_COMP_get_name(comp) : "NONE");
BIO_printf(bio,"Expansion: %s\n", BIO_printf(bio,"Expansion: %s\n",
exp ? SSL_COMP_get_name(exp) : "NONE"); expansion ? SSL_COMP_get_name(expansion) : "NONE");
SSL_SESSION_print(bio,SSL_get_session(s)); SSL_SESSION_print(bio,SSL_get_session(s));
BIO_printf(bio,"---\n"); BIO_printf(bio,"---\n");
if (peer != NULL) if (peer != NULL)

View File

@ -77,15 +77,15 @@ int BIO_dump_indent(BIO *bio, const char *s, int len, int indent)
{ {
int ret=0; int ret=0;
char buf[288+1],tmp[20],str[128+1]; char buf[288+1],tmp[20],str[128+1];
int i,j,rows,trunc; int i,j,rows,trc;
unsigned char ch; unsigned char ch;
int dump_width; int dump_width;
trunc=0; trc=0;
#ifdef TRUNCATE #ifdef TRUNCATE
for(; (len > 0) && ((s[len-1] == ' ') || (s[len-1] == '\0')); len--) for(; (len > 0) && ((s[len-1] == ' ') || (s[len-1] == '\0')); len--)
trunc++; trc++;
#endif #endif
if (indent < 0) if (indent < 0)
@ -142,9 +142,9 @@ int BIO_dump_indent(BIO *bio, const char *s, int len, int indent)
ret+=BIO_write(bio,(char *)buf,strlen(buf)); ret+=BIO_write(bio,(char *)buf,strlen(buf));
} }
#ifdef TRUNCATE #ifdef TRUNCATE
if (trunc > 0) if (trc > 0)
{ {
sprintf(buf,"%s%04x - <SPACES/NULS>\n",str,len+trunc); sprintf(buf,"%s%04x - <SPACES/NULS>\n",str,len+trc);
ret+=BIO_write(bio,(char *)buf,strlen(buf)); ret+=BIO_write(bio,(char *)buf,strlen(buf));
} }
#endif #endif

View File

@ -576,12 +576,12 @@ abs_val(LDOUBLE value)
} }
static LDOUBLE static LDOUBLE
pow10(int exp) pow10(int in_exp)
{ {
LDOUBLE result = 1; LDOUBLE result = 1;
while (exp) { while (in_exp) {
result *= 10; result *= 10;
exp--; in_exp--;
} }
return result; return result;
} }

View File

@ -232,7 +232,7 @@ extern SW_EXPORT SureWareHook_Dsa_Sign_t SureWareHook_Dsa_Sign;
* mlen,elen and dlen are all multiple of sizeof(unsigned long) * mlen,elen and dlen are all multiple of sizeof(unsigned long)
*/ */
typedef int SureWareHook_Mod_Exp_t(char*const msg,int mlen,const unsigned long *mod, typedef int SureWareHook_Mod_Exp_t(char*const msg,int mlen,const unsigned long *mod,
int elen,const unsigned long *exp, int elen,const unsigned long *exponent,
int dlen,unsigned long *data, int dlen,unsigned long *data,
unsigned long *res); unsigned long *res);
extern SW_EXPORT SureWareHook_Mod_Exp_t SureWareHook_Mod_Exp; extern SW_EXPORT SureWareHook_Mod_Exp_t SureWareHook_Mod_Exp;

View File

@ -199,10 +199,10 @@ int ssl3_change_cipher_state(SSL *s, int which)
COMP_METHOD *comp; COMP_METHOD *comp;
const EVP_MD *m; const EVP_MD *m;
EVP_MD_CTX md; EVP_MD_CTX md;
int exp,n,i,j,k,cl; int is_exp,n,i,j,k,cl;
int reuse_dd = 0; int reuse_dd = 0;
exp=SSL_C_IS_EXPORT(s->s3->tmp.new_cipher); is_exp=SSL_C_IS_EXPORT(s->s3->tmp.new_cipher);
c=s->s3->tmp.new_sym_enc; c=s->s3->tmp.new_sym_enc;
m=s->s3->tmp.new_hash; m=s->s3->tmp.new_hash;
if (s->s3->tmp.new_compression == NULL) if (s->s3->tmp.new_compression == NULL)
@ -276,9 +276,9 @@ int ssl3_change_cipher_state(SSL *s, int which)
p=s->s3->tmp.key_block; p=s->s3->tmp.key_block;
i=EVP_MD_size(m); i=EVP_MD_size(m);
cl=EVP_CIPHER_key_length(c); cl=EVP_CIPHER_key_length(c);
j=exp ? (cl < SSL_C_EXPORT_KEYLENGTH(s->s3->tmp.new_cipher) ? j=is_exp ? (cl < SSL_C_EXPORT_KEYLENGTH(s->s3->tmp.new_cipher) ?
cl : SSL_C_EXPORT_KEYLENGTH(s->s3->tmp.new_cipher)) : cl; cl : SSL_C_EXPORT_KEYLENGTH(s->s3->tmp.new_cipher)) : cl;
/* Was j=(exp)?5:EVP_CIPHER_key_length(c); */ /* Was j=(is_exp)?5:EVP_CIPHER_key_length(c); */
k=EVP_CIPHER_iv_length(c); k=EVP_CIPHER_iv_length(c);
if ( (which == SSL3_CHANGE_CIPHER_CLIENT_WRITE) || if ( (which == SSL3_CHANGE_CIPHER_CLIENT_WRITE) ||
(which == SSL3_CHANGE_CIPHER_SERVER_READ)) (which == SSL3_CHANGE_CIPHER_SERVER_READ))
@ -307,7 +307,7 @@ int ssl3_change_cipher_state(SSL *s, int which)
EVP_MD_CTX_init(&md); EVP_MD_CTX_init(&md);
memcpy(mac_secret,ms,i); memcpy(mac_secret,ms,i);
if (exp) if (is_exp)
{ {
/* In here I set both the read and write key/iv to the /* In here I set both the read and write key/iv to the
* same value since only the correct one will be used :-). * same value since only the correct one will be used :-).

View File

@ -952,7 +952,7 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method,
char *SSL_CIPHER_description(SSL_CIPHER *cipher, char *buf, int len) char *SSL_CIPHER_description(SSL_CIPHER *cipher, char *buf, int len)
{ {
int is_export,pkl,kl; int is_export,pkl,kl;
char *ver,*exp; char *ver,*exp_str;
char *kx,*au,*enc,*mac; char *kx,*au,*enc,*mac;
unsigned long alg,alg2,alg_s; unsigned long alg,alg2,alg_s;
#ifdef KSSL_DEBUG #ifdef KSSL_DEBUG
@ -968,7 +968,7 @@ char *SSL_CIPHER_description(SSL_CIPHER *cipher, char *buf, int len)
is_export=SSL_C_IS_EXPORT(cipher); is_export=SSL_C_IS_EXPORT(cipher);
pkl=SSL_C_EXPORT_PKEYLENGTH(cipher); pkl=SSL_C_EXPORT_PKEYLENGTH(cipher);
kl=SSL_C_EXPORT_KEYLENGTH(cipher); kl=SSL_C_EXPORT_KEYLENGTH(cipher);
exp=is_export?" export":""; exp_str=is_export?" export":"";
if (alg & SSL_SSLV2) if (alg & SSL_SSLV2)
ver="SSLv2"; ver="SSLv2";
@ -1094,9 +1094,9 @@ char *SSL_CIPHER_description(SSL_CIPHER *cipher, char *buf, int len)
return("Buffer too small"); return("Buffer too small");
#ifdef KSSL_DEBUG #ifdef KSSL_DEBUG
BIO_snprintf(buf,len,format,cipher->name,ver,kx,au,enc,mac,exp,alg); BIO_snprintf(buf,len,format,cipher->name,ver,kx,au,enc,mac,exp_str,alg);
#else #else
BIO_snprintf(buf,len,format,cipher->name,ver,kx,au,enc,mac,exp); BIO_snprintf(buf,len,format,cipher->name,ver,kx,au,enc,mac,exp_str);
#endif /* KSSL_DEBUG */ #endif /* KSSL_DEBUG */
return(buf); return(buf);
} }