summaryrefslogtreecommitdiffstats
path: root/ssl/statem/statem_dtls.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2016-09-20 14:47:44 +0100
committerMatt Caswell <matt@openssl.org>2016-09-20 14:47:44 +0100
commit08029dfa03c0ee3a50f373017143aaae5f87d17f (patch)
tree536a5df572e89053310d4b8a4fe6dee4ce56485b /ssl/statem/statem_dtls.c
parent85a7a5e6ef633d2b01ef9792463a36b507a35a6a (diff)
Convert WPACKET_put_bytes to use convenience macros
All the other functions that take an argument for the number of bytes use convenience macros for this purpose. We should do the same with WPACKET_put_bytes(). Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'ssl/statem/statem_dtls.c')
-rw-r--r--ssl/statem/statem_dtls.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ssl/statem/statem_dtls.c b/ssl/statem/statem_dtls.c
index 3146f77b0d..f892f0f82e 100644
--- a/ssl/statem/statem_dtls.c
+++ b/ssl/statem/statem_dtls.c
@@ -876,7 +876,7 @@ int dtls_construct_change_cipher_spec(SSL *s)
WPACKET pkt;
if (!WPACKET_init(&pkt, s->init_buf)
- || !WPACKET_put_bytes(&pkt, SSL3_MT_CCS, 1)) {
+ || !WPACKET_put_bytes_u8(&pkt, SSL3_MT_CCS)) {
SSLerr(SSL_F_TLS_CONSTRUCT_FINISHED, ERR_R_INTERNAL_ERROR);
goto err;
}
@@ -887,7 +887,7 @@ int dtls_construct_change_cipher_spec(SSL *s)
if (s->version == DTLS1_BAD_VER) {
s->d1->next_handshake_write_seq++;
- if (!WPACKET_put_bytes(&pkt, s->d1->handshake_write_seq, 2)) {
+ if (!WPACKET_put_bytes_u16(&pkt, s->d1->handshake_write_seq)) {
SSLerr(SSL_F_TLS_CONSTRUCT_FINISHED, ERR_R_INTERNAL_ERROR);
goto err;
}