#endif
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 unsigned int dtls1_link_min_mtu(void);
tls1_export_keying_material,
SSL_ENC_FLAG_DTLS | SSL_ENC_FLAG_EXPLICIT_IV,
DTLS1_HM_HEADER_LENGTH,
- dtls1_set_handshake_header,
dtls1_set_handshake_header2,
dtls1_close_construct_packet,
dtls1_handshake_write
SSL_ENC_FLAG_DTLS | SSL_ENC_FLAG_EXPLICIT_IV | SSL_ENC_FLAG_SIGALGS
| SSL_ENC_FLAG_SHA256_PRF | SSL_ENC_FLAG_TLS1_2_CIPHERS,
DTLS1_HM_HEADER_LENGTH,
- dtls1_set_handshake_header,
dtls1_set_handshake_header2,
dtls1_close_construct_packet,
dtls1_handshake_write
}
#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)
{
return dtls1_do_write(s, SSL3_RT_HANDSHAKE);
int use_context))ssl_undefined_function,
0,
SSL3_HM_HEADER_LENGTH,
- ssl3_set_handshake_header,
ssl3_set_handshake_header2,
tls_close_construct_packet,
ssl3_handshake_write
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
* conversion is complete. The old ssl3_set_handshake_heder() can be deleted
/* Handshake header length */
unsigned int hhlen;
/* 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);
/* Close construction of the handshake message */
int (*close_construct_packet) (SSL *s, WPACKET *pkt);
# define SSL_HM_HEADER_LENGTH(s) s->method->ssl3_enc->hhlen
# define ssl_handshake_start(s) \
(((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) \
s->method->ssl3_enc->set_handshake_header2((s), (pkt), (htype))
# define ssl_close_construct_packet(s, pkt) \
__owur int ssl3_do_change_cipher_spec(SSL *ssl);
__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 tls_close_construct_packet(SSL *s, WPACKET *pkt);
__owur int dtls1_set_handshake_header2(SSL *s, WPACKET *pkt, int htype);
tls1_export_keying_material,
0,
SSL3_HM_HEADER_LENGTH,
- ssl3_set_handshake_header,
ssl3_set_handshake_header2,
tls_close_construct_packet,
ssl3_handshake_write
tls1_export_keying_material,
SSL_ENC_FLAG_EXPLICIT_IV,
SSL3_HM_HEADER_LENGTH,
- ssl3_set_handshake_header,
ssl3_set_handshake_header2,
tls_close_construct_packet,
ssl3_handshake_write
SSL_ENC_FLAG_EXPLICIT_IV | SSL_ENC_FLAG_SIGALGS | SSL_ENC_FLAG_SHA256_PRF
| SSL_ENC_FLAG_TLS1_2_CIPHERS,
SSL3_HM_HEADER_LENGTH,
- ssl3_set_handshake_header,
ssl3_set_handshake_header2,
tls_close_construct_packet,
ssl3_handshake_write