Move ssl3_pending into the record layer
Reviewed-by: Richard Levitte <levitte@openssl.org>
This commit is contained in:
parent
c036e210f3
commit
d5a25ae0de
4 changed files with 10 additions and 11 deletions
|
@ -171,6 +171,7 @@ void RECORD_LAYER_release(RECORD_LAYER *rl);
|
|||
int RECORD_LAYER_read_pending(RECORD_LAYER *rl);
|
||||
int RECORD_LAYER_write_pending(RECORD_LAYER *rl);
|
||||
int RECORD_LAYER_set_data(RECORD_LAYER *rl, const unsigned char *buf, int len);
|
||||
__owur int ssl3_pending(const SSL *s);
|
||||
__owur int ssl23_read_bytes(SSL *s, int n);
|
||||
__owur int ssl23_write_bytes(SSL *s);
|
||||
__owur int ssl3_write_bytes(SSL *s, int type, const void *buf, int len);
|
||||
|
|
|
@ -201,6 +201,15 @@ int RECORD_LAYER_set_data(RECORD_LAYER *rl, const unsigned char *buf, int len)
|
|||
return 1;
|
||||
}
|
||||
|
||||
int ssl3_pending(const SSL *s)
|
||||
{
|
||||
if (s->rstate == SSL_ST_READ_BODY)
|
||||
return 0;
|
||||
|
||||
return (SSL3_RECORD_get_type(&s->rlayer.rrec) == SSL3_RT_APPLICATION_DATA)
|
||||
? SSL3_RECORD_get_length(&s->rlayer.rrec) : 0;
|
||||
}
|
||||
|
||||
int ssl3_read_n(SSL *s, int n, int max, int extend)
|
||||
{
|
||||
/*
|
||||
|
|
10
ssl/s3_lib.c
10
ssl/s3_lib.c
|
@ -3078,16 +3078,6 @@ const SSL_CIPHER *ssl3_get_cipher(unsigned int u)
|
|||
return (NULL);
|
||||
}
|
||||
|
||||
int ssl3_pending(const SSL *s)
|
||||
{
|
||||
if (s->rstate == SSL_ST_READ_BODY)
|
||||
return 0;
|
||||
|
||||
return (SSL3_RECORD_get_type(RECORD_LAYER_get_rrec(&s->rlayer))
|
||||
== SSL3_RT_APPLICATION_DATA)
|
||||
? SSL3_RECORD_get_length(RECORD_LAYER_get_rrec(&s->rlayer)) : 0;
|
||||
}
|
||||
|
||||
int ssl3_set_handshake_header(SSL *s, int htype, unsigned long len)
|
||||
{
|
||||
unsigned char *p = (unsigned char *)s->init_buf->data;
|
||||
|
|
|
@ -2099,7 +2099,6 @@ __owur long ssl3_ctrl(SSL *s, int cmd, long larg, void *parg);
|
|||
__owur long ssl3_ctx_ctrl(SSL_CTX *s, int cmd, long larg, void *parg);
|
||||
__owur long ssl3_callback_ctrl(SSL *s, int cmd, void (*fp) (void));
|
||||
__owur long ssl3_ctx_callback_ctrl(SSL_CTX *s, int cmd, void (*fp) (void));
|
||||
__owur int ssl3_pending(const SSL *s);
|
||||
|
||||
void ssl3_record_sequence_update(unsigned char *seq);
|
||||
__owur int ssl3_do_change_cipher_spec(SSL *ssl);
|
||||
|
|
Loading…
Reference in a new issue