提交 e2726ce6 编写于 作者: M Matt Caswell

Remove ssl_set_handshake_header()

Remove the old ssl_set_handshake_header() implementations. Later we will
rename ssl_set_handshake_header2() to ssl_set_handshake_header().
Reviewed-by: NRich Salz <rsalz@openssl.org>
上级 42cde22f
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
#endif #endif
static void get_current_time(struct timeval *t); static void get_current_time(struct timeval *t);
static int dtls1_set_handshake_header(SSL *s, int type, unsigned long len);
static int dtls1_handshake_write(SSL *s); static int dtls1_handshake_write(SSL *s);
static unsigned int dtls1_link_min_mtu(void); static unsigned int dtls1_link_min_mtu(void);
...@@ -43,7 +42,6 @@ const SSL3_ENC_METHOD DTLSv1_enc_data = { ...@@ -43,7 +42,6 @@ const SSL3_ENC_METHOD DTLSv1_enc_data = {
tls1_export_keying_material, tls1_export_keying_material,
SSL_ENC_FLAG_DTLS | SSL_ENC_FLAG_EXPLICIT_IV, SSL_ENC_FLAG_DTLS | SSL_ENC_FLAG_EXPLICIT_IV,
DTLS1_HM_HEADER_LENGTH, DTLS1_HM_HEADER_LENGTH,
dtls1_set_handshake_header,
dtls1_set_handshake_header2, dtls1_set_handshake_header2,
dtls1_close_construct_packet, dtls1_close_construct_packet,
dtls1_handshake_write dtls1_handshake_write
...@@ -64,7 +62,6 @@ const SSL3_ENC_METHOD DTLSv1_2_enc_data = { ...@@ -64,7 +62,6 @@ const SSL3_ENC_METHOD DTLSv1_2_enc_data = {
SSL_ENC_FLAG_DTLS | SSL_ENC_FLAG_EXPLICIT_IV | SSL_ENC_FLAG_SIGALGS SSL_ENC_FLAG_DTLS | SSL_ENC_FLAG_EXPLICIT_IV | SSL_ENC_FLAG_SIGALGS
| SSL_ENC_FLAG_SHA256_PRF | SSL_ENC_FLAG_TLS1_2_CIPHERS, | SSL_ENC_FLAG_SHA256_PRF | SSL_ENC_FLAG_TLS1_2_CIPHERS,
DTLS1_HM_HEADER_LENGTH, DTLS1_HM_HEADER_LENGTH,
dtls1_set_handshake_header,
dtls1_set_handshake_header2, dtls1_set_handshake_header2,
dtls1_close_construct_packet, dtls1_close_construct_packet,
dtls1_handshake_write dtls1_handshake_write
...@@ -861,19 +858,6 @@ int DTLSv1_listen(SSL *s, BIO_ADDR *client) ...@@ -861,19 +858,6 @@ int DTLSv1_listen(SSL *s, BIO_ADDR *client)
} }
#endif #endif
static int dtls1_set_handshake_header(SSL *s, int htype, unsigned long len)
{
dtls1_set_message_header(s, htype, len, 0, len);
s->init_num = (int)len + DTLS1_HM_HEADER_LENGTH;
s->init_off = 0;
/* Buffer the message to handle re-xmits */
if (!dtls1_buffer_message(s, 0))
return 0;
return 1;
}
static int dtls1_handshake_write(SSL *s) static int dtls1_handshake_write(SSL *s)
{ {
return dtls1_do_write(s, SSL3_RT_HANDSHAKE); return dtls1_do_write(s, SSL3_RT_HANDSHAKE);
......
...@@ -2750,7 +2750,6 @@ const SSL3_ENC_METHOD SSLv3_enc_data = { ...@@ -2750,7 +2750,6 @@ const SSL3_ENC_METHOD SSLv3_enc_data = {
int use_context))ssl_undefined_function, int use_context))ssl_undefined_function,
0, 0,
SSL3_HM_HEADER_LENGTH, SSL3_HM_HEADER_LENGTH,
ssl3_set_handshake_header,
ssl3_set_handshake_header2, ssl3_set_handshake_header2,
tls_close_construct_packet, tls_close_construct_packet,
ssl3_handshake_write ssl3_handshake_write
...@@ -2778,17 +2777,6 @@ const SSL_CIPHER *ssl3_get_cipher(unsigned int u) ...@@ -2778,17 +2777,6 @@ const SSL_CIPHER *ssl3_get_cipher(unsigned int u)
return (NULL); return (NULL);
} }
int ssl3_set_handshake_header(SSL *s, int htype, unsigned long len)
{
unsigned char *p = (unsigned char *)s->init_buf->data;
*(p++) = htype;
l2n3(len, p);
s->init_num = (int)len + SSL3_HM_HEADER_LENGTH;
s->init_off = 0;
return 1;
}
/* /*
* Temporary name. To be renamed ssl3_set_handshake_header() once all WPACKET * Temporary name. To be renamed ssl3_set_handshake_header() once all WPACKET
* conversion is complete. The old ssl3_set_handshake_heder() can be deleted * conversion is complete. The old ssl3_set_handshake_heder() can be deleted
......
...@@ -1584,8 +1584,6 @@ typedef struct ssl3_enc_method { ...@@ -1584,8 +1584,6 @@ typedef struct ssl3_enc_method {
/* Handshake header length */ /* Handshake header length */
unsigned int hhlen; unsigned int hhlen;
/* Set the handshake header */ /* Set the handshake header */
int (*set_handshake_header) (SSL *s, int type, unsigned long len);
/* Set the handshake header */
int (*set_handshake_header2) (SSL *s, WPACKET *pkt, int type); int (*set_handshake_header2) (SSL *s, WPACKET *pkt, int type);
/* Close construction of the handshake message */ /* Close construction of the handshake message */
int (*close_construct_packet) (SSL *s, WPACKET *pkt); int (*close_construct_packet) (SSL *s, WPACKET *pkt);
...@@ -1596,8 +1594,6 @@ typedef struct ssl3_enc_method { ...@@ -1596,8 +1594,6 @@ typedef struct ssl3_enc_method {
# define SSL_HM_HEADER_LENGTH(s) s->method->ssl3_enc->hhlen # define SSL_HM_HEADER_LENGTH(s) s->method->ssl3_enc->hhlen
# define ssl_handshake_start(s) \ # define ssl_handshake_start(s) \
(((unsigned char *)s->init_buf->data) + s->method->ssl3_enc->hhlen) (((unsigned char *)s->init_buf->data) + s->method->ssl3_enc->hhlen)
# define ssl_set_handshake_header(s, htype, len) \
s->method->ssl3_enc->set_handshake_header(s, htype, len)
# define ssl_set_handshake_header2(s, pkt, htype) \ # define ssl_set_handshake_header2(s, pkt, htype) \
s->method->ssl3_enc->set_handshake_header2((s), (pkt), (htype)) s->method->ssl3_enc->set_handshake_header2((s), (pkt), (htype))
# define ssl_close_construct_packet(s, pkt) \ # define ssl_close_construct_packet(s, pkt) \
...@@ -1903,7 +1899,6 @@ __owur long ssl3_ctx_callback_ctrl(SSL_CTX *s, int cmd, void (*fp) (void)); ...@@ -1903,7 +1899,6 @@ __owur long ssl3_ctx_callback_ctrl(SSL_CTX *s, int cmd, void (*fp) (void));
__owur int ssl3_do_change_cipher_spec(SSL *ssl); __owur int ssl3_do_change_cipher_spec(SSL *ssl);
__owur long ssl3_default_timeout(void); __owur long ssl3_default_timeout(void);
__owur int ssl3_set_handshake_header(SSL *s, int htype, unsigned long len);
__owur int ssl3_set_handshake_header2(SSL *s, WPACKET *pkt, int htype); __owur int ssl3_set_handshake_header2(SSL *s, WPACKET *pkt, int htype);
__owur int tls_close_construct_packet(SSL *s, WPACKET *pkt); __owur int tls_close_construct_packet(SSL *s, WPACKET *pkt);
__owur int dtls1_set_handshake_header2(SSL *s, WPACKET *pkt, int htype); __owur int dtls1_set_handshake_header2(SSL *s, WPACKET *pkt, int htype);
......
...@@ -40,7 +40,6 @@ SSL3_ENC_METHOD const TLSv1_enc_data = { ...@@ -40,7 +40,6 @@ SSL3_ENC_METHOD const TLSv1_enc_data = {
tls1_export_keying_material, tls1_export_keying_material,
0, 0,
SSL3_HM_HEADER_LENGTH, SSL3_HM_HEADER_LENGTH,
ssl3_set_handshake_header,
ssl3_set_handshake_header2, ssl3_set_handshake_header2,
tls_close_construct_packet, tls_close_construct_packet,
ssl3_handshake_write ssl3_handshake_write
...@@ -60,7 +59,6 @@ SSL3_ENC_METHOD const TLSv1_1_enc_data = { ...@@ -60,7 +59,6 @@ SSL3_ENC_METHOD const TLSv1_1_enc_data = {
tls1_export_keying_material, tls1_export_keying_material,
SSL_ENC_FLAG_EXPLICIT_IV, SSL_ENC_FLAG_EXPLICIT_IV,
SSL3_HM_HEADER_LENGTH, SSL3_HM_HEADER_LENGTH,
ssl3_set_handshake_header,
ssl3_set_handshake_header2, ssl3_set_handshake_header2,
tls_close_construct_packet, tls_close_construct_packet,
ssl3_handshake_write ssl3_handshake_write
...@@ -81,7 +79,6 @@ SSL3_ENC_METHOD const TLSv1_2_enc_data = { ...@@ -81,7 +79,6 @@ SSL3_ENC_METHOD const TLSv1_2_enc_data = {
SSL_ENC_FLAG_EXPLICIT_IV | SSL_ENC_FLAG_SIGALGS | SSL_ENC_FLAG_SHA256_PRF SSL_ENC_FLAG_EXPLICIT_IV | SSL_ENC_FLAG_SIGALGS | SSL_ENC_FLAG_SHA256_PRF
| SSL_ENC_FLAG_TLS1_2_CIPHERS, | SSL_ENC_FLAG_TLS1_2_CIPHERS,
SSL3_HM_HEADER_LENGTH, SSL3_HM_HEADER_LENGTH,
ssl3_set_handshake_header,
ssl3_set_handshake_header2, ssl3_set_handshake_header2,
tls_close_construct_packet, tls_close_construct_packet,
ssl3_handshake_write ssl3_handshake_write
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册