summaryrefslogtreecommitdiffstats
path: root/ssl/ssl_lib.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2010-08-27 11:57:42 +0000
committerDr. Stephen Henson <steve@openssl.org>2010-08-27 11:57:42 +0000
commit35cae95032c71cd3523d38246401a1b7d7a74c37 (patch)
treea780edc644d51044291f66e35a05f7bd039c677e /ssl/ssl_lib.c
parent11a36aa96f055c5d1ea8a762b1f9c1ab22e32425 (diff)
PR: 1833
Submitted By: Robin Seggelmann <seggelmann@fh-muenster.de> Fix other cases not covered by original patch.
Diffstat (limited to 'ssl/ssl_lib.c')
-rw-r--r--ssl/ssl_lib.c30
1 files changed, 9 insertions, 21 deletions
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c
index d4fc4aa1b3..d4ca62ed2c 100644
--- a/ssl/ssl_lib.c
+++ b/ssl/ssl_lib.c
@@ -202,9 +202,9 @@ int SSL_clear(SSL *s)
* needed because SSL_clear is not called when doing renegotiation) */
/* This is set if we are doing dynamic renegotiation so keep
* the old cipher. It is sort of a SSL_clear_lite :-) */
- if (s->renegotiate) return(1);
+ if (s->new_session) return(1);
#else
- if (s->renegotiate)
+ if (s->new_session)
{
SSLerr(SSL_F_SSL_CLEAR,ERR_R_INTERNAL_ERROR);
return 0;
@@ -1008,29 +1008,18 @@ int SSL_shutdown(SSL *s)
int SSL_renegotiate(SSL *s)
{
- if (s->renegotiate == 0)
- s->renegotiate=1;
-
- s->new_session=1;
-
+ if (s->new_session == 0)
+ {
+ s->new_session=1;
+ }
return(s->method->ssl_renegotiate(s));
}
-int SSL_renegotiate_abbreviated(SSL *s)
-{
- if (s->renegotiate == 0)
- s->renegotiate=1;
-
- s->new_session=0;
-
- return(s->method->ssl_renegotiate(s));
-}
-
int SSL_renegotiate_pending(SSL *s)
{
/* becomes true when negotiation is requested;
* false again once a handshake has finished */
- return (s->renegotiate != 0);
+ return (s->new_session != 0);
}
long SSL_ctrl(SSL *s,int cmd,long larg,void *parg)
@@ -1383,7 +1372,7 @@ int ssl_cipher_list_to_bytes(SSL *s,STACK_OF(SSL_CIPHER) *sk,unsigned char *p,
/* If p == q, no ciphers and caller indicates an error. Otherwise
* add SCSV if not renegotiating.
*/
- if (p != q && !s->new_session)
+ if (p != q && !s->renegotiate)
{
static SSL_CIPHER scsv =
{
@@ -1430,7 +1419,7 @@ STACK_OF(SSL_CIPHER) *ssl_bytes_to_cipher_list(SSL *s,unsigned char *p,int num,
(p[n-1] == (SSL3_CK_SCSV & 0xff)))
{
/* SCSV fatal if renegotiating */
- if (s->new_session)
+ if (s->renegotiate)
{
SSLerr(SSL_F_SSL_BYTES_TO_CIPHER_LIST,SSL_R_SCSV_RECEIVED_WHEN_RENEGOTIATING);
ssl3_send_alert(s,SSL3_AL_FATAL,SSL_AD_HANDSHAKE_FAILURE);
@@ -2530,7 +2519,6 @@ SSL *SSL_dup(SSL *s)
ret->in_handshake = s->in_handshake;
ret->handshake_func = s->handshake_func;
ret->server = s->server;
- ret->renegotiate = s->renegotiate;
ret->new_session = s->new_session;
ret->quiet_shutdown = s->quiet_shutdown;
ret->shutdown=s->shutdown;