tls1_export_keying_material,
SSL_ENC_FLAG_DTLS | SSL_ENC_FLAG_EXPLICIT_IV,
DTLS1_HM_HEADER_LENGTH,
- dtls1_set_handshake_header2,
+ dtls1_set_handshake_header,
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_header2,
+ dtls1_set_handshake_header,
dtls1_close_construct_packet,
dtls1_handshake_write
};
int use_context))ssl_undefined_function,
0,
SSL3_HM_HEADER_LENGTH,
- ssl3_set_handshake_header2,
+ ssl3_set_handshake_header,
tls_close_construct_packet,
ssl3_handshake_write
};
return (NULL);
}
-/*
- * Temporary name. To be renamed ssl3_set_handshake_header() once all WPACKET
- * conversion is complete. The old ssl3_set_handshake_heder() can be deleted
- * at that point.
- * TODO - RENAME ME
- */
-int ssl3_set_handshake_header2(SSL *s, WPACKET *pkt, int htype)
+int ssl3_set_handshake_header(SSL *s, WPACKET *pkt, int htype)
{
/* Set the content type and 3 bytes for the message len */
if (!WPACKET_put_bytes_u8(pkt, htype)
/* Handshake header length */
unsigned int hhlen;
/* Set the handshake header */
- int (*set_handshake_header2) (SSL *s, WPACKET *pkt, int type);
+ int (*set_handshake_header) (SSL *s, WPACKET *pkt, int type);
/* Close construction of the handshake message */
int (*close_construct_packet) (SSL *s, WPACKET *pkt);
/* Write out handshake message */
# 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_header2(s, pkt, htype) \
- s->method->ssl3_enc->set_handshake_header2((s), (pkt), (htype))
+# define ssl_set_handshake_header(s, pkt, htype) \
+ s->method->ssl3_enc->set_handshake_header((s), (pkt), (htype))
# define ssl_close_construct_packet(s, pkt) \
s->method->ssl3_enc->close_construct_packet((s), (pkt))
# define ssl_do_write(s) s->method->ssl3_enc->do_write(s)
__owur int ssl3_do_change_cipher_spec(SSL *ssl);
__owur long ssl3_default_timeout(void);
-__owur int ssl3_set_handshake_header2(SSL *s, WPACKET *pkt, int htype);
+__owur int ssl3_set_handshake_header(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);
+__owur int dtls1_set_handshake_header(SSL *s, WPACKET *pkt, int htype);
__owur int dtls1_close_construct_packet(SSL *s, WPACKET *pkt);
__owur int ssl3_handshake_write(SSL *s);
if (i && ssl_fill_hello_random(s, 0, p, sizeof(s->s3->client_random)) <= 0)
goto err;
- if (!ssl_set_handshake_header2(s, &pkt, SSL3_MT_CLIENT_HELLO)) {
+ if (!ssl_set_handshake_header(s, &pkt, SSL3_MT_CLIENT_HELLO)) {
ssl3_send_alert(s, SSL3_AL_FATAL, SSL_AD_HANDSHAKE_FAILURE);
SSLerr(SSL_F_TLS_CONSTRUCT_CLIENT_HELLO, ERR_R_INTERNAL_ERROR);
goto err;
goto err;
}
- if (!ssl_set_handshake_header2(s, &pkt, SSL3_MT_CLIENT_KEY_EXCHANGE)) {
+ if (!ssl_set_handshake_header(s, &pkt, SSL3_MT_CLIENT_KEY_EXCHANGE)) {
ssl3_send_alert(s, SSL3_AL_FATAL, SSL_AD_HANDSHAKE_FAILURE);
SSLerr(SSL_F_TLS_CONSTRUCT_CLIENT_KEY_EXCHANGE, ERR_R_INTERNAL_ERROR);
goto err;
goto err;
}
- if (!ssl_set_handshake_header2(s, &pkt, SSL3_MT_CERTIFICATE_VERIFY)) {
+ if (!ssl_set_handshake_header(s, &pkt, SSL3_MT_CERTIFICATE_VERIFY)) {
SSLerr(SSL_F_TLS_CONSTRUCT_CLIENT_VERIFY, ERR_R_INTERNAL_ERROR);
goto err;
}
goto err;
}
- if (!ssl_set_handshake_header2(s, &pkt, SSL3_MT_NEXT_PROTO)) {
+ if (!ssl_set_handshake_header(s, &pkt, SSL3_MT_NEXT_PROTO)) {
SSLerr(SSL_F_TLS_CONSTRUCT_NEXT_PROTO, ERR_R_INTERNAL_ERROR);
goto err;
}
n2l3(data, msg_hdr->frag_len);
}
-/*
- * Temporary name. To be renamed dtls1_set_handshake_header() once all WPACKET
- * conversion is complete. The old dtls1_set_handshake_heder() can be deleted
- * at that point.
- * TODO - RENAME ME
- */
-int dtls1_set_handshake_header2(SSL *s, WPACKET *pkt, int htype)
+int dtls1_set_handshake_header(SSL *s, WPACKET *pkt, int htype)
{
unsigned char *header;
WPACKET pkt;
if (!WPACKET_init(&pkt, s->init_buf)
- || !ssl_set_handshake_header2(s, &pkt, SSL3_MT_FINISHED)) {
+ || !ssl_set_handshake_header(s, &pkt, SSL3_MT_FINISHED)) {
SSLerr(SSL_F_TLS_CONSTRUCT_FINISHED, ERR_R_INTERNAL_ERROR);
goto err;
}
goto err;
}
- if (!ssl_set_handshake_header2(s, &pkt, SSL3_MT_CERTIFICATE)
+ if (!ssl_set_handshake_header(s, &pkt, SSL3_MT_CERTIFICATE)
|| !WPACKET_start_sub_packet_u24(&pkt)) {
SSLerr(SSL_F_SSL3_OUTPUT_CERT_CHAIN, ERR_R_INTERNAL_ERROR);
goto err;
WPACKET pkt;
if (!WPACKET_init(&pkt, s->init_buf)
- || !ssl_set_handshake_header2(s, &pkt, SSL3_MT_HELLO_REQUEST)
+ || !ssl_set_handshake_header(s, &pkt, SSL3_MT_HELLO_REQUEST)
|| !ssl_close_construct_packet(s, &pkt)) {
SSLerr(SSL_F_TLS_CONSTRUCT_HELLO_REQUEST, ERR_R_INTERNAL_ERROR);
ossl_statem_set_error(s);
}
if (!WPACKET_init(&pkt, s->init_buf)
- || !ssl_set_handshake_header2(s, &pkt,
- DTLS1_MT_HELLO_VERIFY_REQUEST)
+ || !ssl_set_handshake_header(s, &pkt,
+ DTLS1_MT_HELLO_VERIFY_REQUEST)
|| !dtls_raw_hello_verify_request(&pkt, s->d1->cookie,
s->d1->cookie_len)
/*
WPACKET pkt;
if (!WPACKET_init(&pkt, s->init_buf)
- || !ssl_set_handshake_header2(s, &pkt, SSL3_MT_SERVER_HELLO)
+ || !ssl_set_handshake_header(s, &pkt, SSL3_MT_SERVER_HELLO)
|| !WPACKET_put_bytes_u16(&pkt, s->version)
/*
* Random stuff. Filling of the server_random takes place in
WPACKET pkt;
if (!WPACKET_init(&pkt, s->init_buf)
- || !ssl_set_handshake_header2(s, &pkt, SSL3_MT_SERVER_DONE)
+ || !ssl_set_handshake_header(s, &pkt, SSL3_MT_SERVER_DONE)
|| !ssl_close_construct_packet(s, &pkt)) {
SSLerr(SSL_F_TLS_CONSTRUCT_SERVER_DONE, ERR_R_INTERNAL_ERROR);
goto err;
size_t paramlen, paramoffset;
if (!WPACKET_init(&pkt, s->init_buf)
- || !ssl_set_handshake_header2(s, &pkt,
- SSL3_MT_SERVER_KEY_EXCHANGE)
+ || !ssl_set_handshake_header(s, &pkt,
+ SSL3_MT_SERVER_KEY_EXCHANGE)
|| !WPACKET_get_total_written(&pkt, ¶moffset)) {
SSLerr(SSL_F_TLS_CONSTRUCT_SERVER_KEY_EXCHANGE, ERR_R_INTERNAL_ERROR);
goto f_err;
WPACKET pkt;
if (!WPACKET_init(&pkt, s->init_buf)
- || !ssl_set_handshake_header2(s, &pkt,
- SSL3_MT_CERTIFICATE_REQUEST)) {
+ || !ssl_set_handshake_header(s, &pkt,
+ SSL3_MT_CERTIFICATE_REQUEST)) {
SSLerr(SSL_F_TLS_CONSTRUCT_CERTIFICATE_REQUEST, ERR_R_INTERNAL_ERROR);
goto err;
}
}
if (!WPACKET_init(&pkt, s->init_buf)
- || !ssl_set_handshake_header2(s, &pkt, SSL3_MT_NEWSESSION_TICKET)) {
+ || !ssl_set_handshake_header(s, &pkt, SSL3_MT_NEWSESSION_TICKET)) {
SSLerr(SSL_F_TLS_CONSTRUCT_NEW_SESSION_TICKET, ERR_R_INTERNAL_ERROR);
goto err;
}
WPACKET pkt;
if (!WPACKET_init(&pkt, s->init_buf)
- || !ssl_set_handshake_header2(s, &pkt,
- SSL3_MT_CERTIFICATE_STATUS)
+ || !ssl_set_handshake_header(s, &pkt, SSL3_MT_CERTIFICATE_STATUS)
|| !WPACKET_put_bytes_u8(&pkt, s->tlsext_status_type)
|| !WPACKET_sub_memcpy_u24(&pkt, s->tlsext_ocsp_resp,
s->tlsext_ocsp_resplen)
tls1_export_keying_material,
0,
SSL3_HM_HEADER_LENGTH,
- ssl3_set_handshake_header2,
+ ssl3_set_handshake_header,
tls_close_construct_packet,
ssl3_handshake_write
};
tls1_export_keying_material,
SSL_ENC_FLAG_EXPLICIT_IV,
SSL3_HM_HEADER_LENGTH,
- ssl3_set_handshake_header2,
+ ssl3_set_handshake_header,
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_header2,
+ ssl3_set_handshake_header,
tls_close_construct_packet,
ssl3_handshake_write
};