projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
backport fix from the stable branch
[openssl.git]
/
ssl
/
s3_lib.c
diff --git
a/ssl/s3_lib.c
b/ssl/s3_lib.c
index adeb3418a93b4730a42f7002b39681462413a565..2b2d2bdadefdb657ef3daa86e4ec53d917855279 100644
(file)
--- a/
ssl/s3_lib.c
+++ b/
ssl/s3_lib.c
@@
-1381,6
+1381,10
@@
static SSL_METHOD SSLv3_data= {
ssl3_shutdown,
ssl3_renegotiate,
ssl3_renegotiate_check,
ssl3_shutdown,
ssl3_renegotiate,
ssl3_renegotiate_check,
+ ssl3_get_message,
+ ssl3_read_bytes,
+ ssl3_write_bytes,
+ ssl3_dispatch_alert,
ssl3_ctrl,
ssl3_ctx_ctrl,
ssl3_get_cipher_by_char,
ssl3_ctrl,
ssl3_ctx_ctrl,
ssl3_get_cipher_by_char,
@@
-1391,7
+1395,7
@@
static SSL_METHOD SSLv3_data= {
ssl_bad_method,
ssl3_default_timeout,
&SSLv3_enc_data,
ssl_bad_method,
ssl3_default_timeout,
&SSLv3_enc_data,
- ssl_undefined_function,
+ ssl_undefined_
void_
function,
ssl3_callback_ctrl,
ssl3_ctx_callback_ctrl,
};
ssl3_callback_ctrl,
ssl3_ctx_callback_ctrl,
};
@@
-1421,7
+1425,7
@@
SSL_CIPHER *ssl3_get_cipher(unsigned int u)
return(NULL);
}
return(NULL);
}
-int ssl3_pending(SSL *s)
+int ssl3_pending(
const
SSL *s)
{
if (s->rstate == SSL_ST_READ_BODY)
return 0;
{
if (s->rstate == SSL_ST_READ_BODY)
return 0;
@@
-1680,7
+1684,7
@@
long ssl3_ctrl(SSL *s, int cmd, long larg, void *parg)
return(ret);
}
return(ret);
}
-long ssl3_callback_ctrl(SSL *s, int cmd, void (*fp)())
+long ssl3_callback_ctrl(SSL *s, int cmd, void (*fp)(
void
))
{
int ret=0;
{
int ret=0;
@@
-1829,7
+1833,7
@@
long ssl3_ctx_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg)
}
if (!EC_KEY_up_ref((EC_KEY *)parg))
{
}
if (!EC_KEY_up_ref((EC_KEY *)parg))
{
- SSLerr(SSL_F_SSL3_CTRL,ERR_R_ECDH_LIB);
+ SSLerr(SSL_F_SSL3_CT
X_CT
RL,ERR_R_ECDH_LIB);
return 0;
}
ecdh = (EC_KEY *)parg;
return 0;
}
ecdh = (EC_KEY *)parg;
@@
-1874,7
+1878,7
@@
long ssl3_ctx_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg)
return(1);
}
return(1);
}
-long ssl3_ctx_callback_ctrl(SSL_CTX *ctx, int cmd, void (*fp)())
+long ssl3_ctx_callback_ctrl(SSL_CTX *ctx, int cmd, void (*fp)(
void
))
{
CERT *cert;
{
CERT *cert;
@@
-2141,13
+2145,13
@@
int ssl3_shutdown(SSL *s)
{
/* resend it if not sent */
#if 1
{
/* resend it if not sent */
#if 1
- s
sl3
_dispatch_alert(s);
+ s
->method->ssl
_dispatch_alert(s);
#endif
}
else if (!(s->shutdown & SSL_RECEIVED_SHUTDOWN))
{
/* If we are waiting for a close from our peer, we are closed */
#endif
}
else if (!(s->shutdown & SSL_RECEIVED_SHUTDOWN))
{
/* If we are waiting for a close from our peer, we are closed */
- s
sl3
_read_bytes(s,0,NULL,0,0);
+ s
->method->ssl
_read_bytes(s,0,NULL,0,0);
}
if ((s->shutdown == (SSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDOWN)) &&
}
if ((s->shutdown == (SSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDOWN)) &&
@@
-2202,8
+2206,8
@@
int ssl3_write(SSL *s, const void *buf, int len)
}
else
{
}
else
{
- ret=s
sl3
_write_bytes(s,SSL3_RT_APPLICATION_DATA,
-
buf,len);
+ ret=s
->method->ssl
_write_bytes(s,SSL3_RT_APPLICATION_DATA,
+ buf,len);
if (ret <= 0) return(ret);
}
if (ret <= 0) return(ret);
}
@@
-2217,7
+2221,7
@@
static int ssl3_read_internal(SSL *s, void *buf, int len, int peek)
clear_sys_error();
if (s->s3->renegotiate) ssl3_renegotiate_check(s);
s->s3->in_read_app_data=1;
clear_sys_error();
if (s->s3->renegotiate) ssl3_renegotiate_check(s);
s->s3->in_read_app_data=1;
- ret=s
sl3
_read_bytes(s,SSL3_RT_APPLICATION_DATA,buf,len,peek);
+ ret=s
->method->ssl
_read_bytes(s,SSL3_RT_APPLICATION_DATA,buf,len,peek);
if ((ret == -1) && (s->s3->in_read_app_data == 2))
{
/* ssl3_read_bytes decided to call s->handshake_func, which
if ((ret == -1) && (s->s3->in_read_app_data == 2))
{
/* ssl3_read_bytes decided to call s->handshake_func, which
@@
-2226,7
+2230,7
@@
static int ssl3_read_internal(SSL *s, void *buf, int len, int peek)
* and thinks that application data makes sense here; so disable
* handshake processing and try to read application data again. */
s->in_handshake++;
* and thinks that application data makes sense here; so disable
* handshake processing and try to read application data again. */
s->in_handshake++;
- ret=s
sl3
_read_bytes(s,SSL3_RT_APPLICATION_DATA,buf,len,peek);
+ ret=s
->method->ssl
_read_bytes(s,SSL3_RT_APPLICATION_DATA,buf,len,peek);
s->in_handshake--;
}
else
s->in_handshake--;
}
else