aboutsummaryrefslogtreecommitdiff
path: root/ssl/ssl_locl.h
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2016-09-30 10:38:32 +0100
committerMatt Caswell <matt@openssl.org>2016-10-03 16:25:48 +0100
commit4a01c59f3689db930d056c84f548d525f651cc6b (patch)
tree4675daccaca8228a76062c00a14fa9cebaff1604 /ssl/ssl_locl.h
parent5923ad4bbe5d13c2fcc11f7849594db838ea57bd (diff)
downloadopenssl-4a01c59f3689db930d056c84f548d525f651cc6b.zip
openssl-4a01c59f3689db930d056c84f548d525f651cc6b.tar.gz
openssl-4a01c59f3689db930d056c84f548d525f651cc6b.tar.bz2
Harmonise setting the header and closing construction
Ensure all message types work the same way including CCS so that the state machine doesn't need to know about special cases. Put all the special logic into ssl_set_handshake_header() and ssl_close_construct_packet(). Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'ssl/ssl_locl.h')
-rw-r--r--ssl/ssl_locl.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/ssl/ssl_locl.h b/ssl/ssl_locl.h
index 06cf6e6..8a7e1a9 100644
--- a/ssl/ssl_locl.h
+++ b/ssl/ssl_locl.h
@@ -1586,7 +1586,7 @@ typedef struct ssl3_enc_method {
/* Set the handshake header */
int (*set_handshake_header) (SSL *s, WPACKET *pkt, int type);
/* Close construction of the handshake message */
- int (*close_construct_packet) (SSL *s, WPACKET *pkt);
+ int (*close_construct_packet) (SSL *s, WPACKET *pkt, int htype);
/* Write out handshake message */
int (*do_write) (SSL *s);
} SSL3_ENC_METHOD;
@@ -1596,8 +1596,8 @@ typedef struct ssl3_enc_method {
(((unsigned char *)s->init_buf->data) + s->method->ssl3_enc->hhlen)
# 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_close_construct_packet(s, pkt, htype) \
+ s->method->ssl3_enc->close_construct_packet((s), (pkt), (htype))
# define ssl_do_write(s) s->method->ssl3_enc->do_write(s)
/* Values for enc_flags */
@@ -1901,9 +1901,9 @@ __owur int ssl3_do_change_cipher_spec(SSL *ssl);
__owur long ssl3_default_timeout(void);
__owur int ssl3_set_handshake_header(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, 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 dtls1_close_construct_packet(SSL *s, WPACKET *pkt, int htype);
__owur int ssl3_handshake_write(SSL *s);
__owur int ssl_allow_compression(SSL *s);