projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Set next version.
[oweals/openssl.git]
/
ssl
/
s2_srvr.c
diff --git
a/ssl/s2_srvr.c
b/ssl/s2_srvr.c
index 27d71a2e0952e5e3f15c3d487b534f74c5d9eec0..c87d84499e76f323de205beea39fab362ad04e47 100644
(file)
--- a/
ssl/s2_srvr.c
+++ b/
ssl/s2_srvr.c
@@
-267,7
+267,7
@@
int ssl2_accept(SSL *s)
case SSL2_ST_SEND_SERVER_VERIFY_C:
/* get the number of bytes to write */
num1=BIO_ctrl(s->wbio,BIO_CTRL_INFO,0,NULL);
case SSL2_ST_SEND_SERVER_VERIFY_C:
/* get the number of bytes to write */
num1=BIO_ctrl(s->wbio,BIO_CTRL_INFO,0,NULL);
- if (num1
!=
0)
+ if (num1
>
0)
{
s->rwstate=SSL_WRITING;
num1=BIO_flush(s->wbio);
{
s->rwstate=SSL_WRITING;
num1=BIO_flush(s->wbio);
@@
-403,13
+403,14
@@
static int get_client_master_key(SSL *s)
p+=3;
n2s(p,i); s->s2->tmp.clear=i;
n2s(p,i); s->s2->tmp.enc=i;
p+=3;
n2s(p,i); s->s2->tmp.clear=i;
n2s(p,i); s->s2->tmp.enc=i;
- n2s(p,i);
s->session->key_arg_length=i;
- if(
s->session->key_arg_length
> SSL_MAX_KEY_ARG_LENGTH)
+ n2s(p,i);
+ if(
i
> SSL_MAX_KEY_ARG_LENGTH)
{
ssl2_return_error(s,SSL2_PE_UNDEFINED_ERROR);
SSLerr(SSL_F_GET_CLIENT_MASTER_KEY, SSL_R_KEY_ARG_TOO_LONG);
return -1;
}
{
ssl2_return_error(s,SSL2_PE_UNDEFINED_ERROR);
SSLerr(SSL_F_GET_CLIENT_MASTER_KEY, SSL_R_KEY_ARG_TOO_LONG);
return -1;
}
+ s->session->key_arg_length=i;
s->state=SSL2_ST_GET_CLIENT_MASTER_KEY_B;
}
s->state=SSL2_ST_GET_CLIENT_MASTER_KEY_B;
}
@@
-607,7
+608,7
@@
static int get_client_hello(SSL *s)
else
{
i=ssl_get_prev_session(s,&(p[s->s2->tmp.cipher_spec_length]),
else
{
i=ssl_get_prev_session(s,&(p[s->s2->tmp.cipher_spec_length]),
- s->s2->tmp.session_id_length);
+ s->s2->tmp.session_id_length
, NULL
);
if (i == 1)
{ /* previous session */
s->hit=1;
if (i == 1)
{ /* previous session */
s->hit=1;
@@
-657,7
+658,7
@@
static int get_client_hello(SSL *s)
{
if (sk_SSL_CIPHER_find(allow,sk_SSL_CIPHER_value(prio,z)) < 0)
{
{
if (sk_SSL_CIPHER_find(allow,sk_SSL_CIPHER_value(prio,z)) < 0)
{
- sk_SSL_CIPHER_delete(prio,z);
+
(void)
sk_SSL_CIPHER_delete(prio,z);
z--;
}
}
z--;
}
}
@@
-697,7
+698,6
@@
static int server_hello(SSL *s)
{
unsigned char *p,*d;
int n,hit;
{
unsigned char *p,*d;
int n,hit;
- STACK_OF(SSL_CIPHER) *sk;
p=(unsigned char *)s->init_buf->data;
if (s->state == SSL2_ST_SEND_SERVER_HELLO_A)
p=(unsigned char *)s->init_buf->data;
if (s->state == SSL2_ST_SEND_SERVER_HELLO_A)
@@
-778,7
+778,6
@@
static int server_hello(SSL *s)
/* lets send out the ciphers we like in the
* prefered order */
/* lets send out the ciphers we like in the
* prefered order */
- sk= s->session->ciphers;
n=ssl_cipher_list_to_bytes(s,s->session->ciphers,d,0);
d+=n;
s2n(n,p); /* add cipher length */
n=ssl_cipher_list_to_bytes(s,s->session->ciphers,d,0);
d+=n;
s2n(n,p); /* add cipher length */
@@
-1054,7
+1053,7
@@
static int request_certificate(SSL *s)
i=ssl_verify_cert_chain(s,sk);
i=ssl_verify_cert_chain(s,sk);
- if (i
)
/* we like the packet, now check the chksum */
+ if (i
> 0)
/* we like the packet, now check the chksum */
{
EVP_MD_CTX ctx;
EVP_PKEY *pkey=NULL;
{
EVP_MD_CTX ctx;
EVP_PKEY *pkey=NULL;
@@
-1083,7
+1082,7
@@
static int request_certificate(SSL *s)
EVP_PKEY_free(pkey);
EVP_MD_CTX_cleanup(&ctx);
EVP_PKEY_free(pkey);
EVP_MD_CTX_cleanup(&ctx);
- if (i
)
+ if (i
> 0)
{
if (s->session->peer != NULL)
X509_free(s->session->peer);
{
if (s->session->peer != NULL)
X509_free(s->session->peer);