summaryrefslogtreecommitdiffstats
path: root/ssl/d1_msg.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2016-09-07 11:34:39 +0100
committerMatt Caswell <matt@openssl.org>2016-11-04 12:09:45 +0000
commit7ee8627f6eb7cf63b34d2701d76bb66f6db811e5 (patch)
tree3cc2467dedda4c802868d9ff2c00ca6b979e4ea6 /ssl/d1_msg.c
parenteda757514ea3018c8510b4738b5e37479aeadc5e (diff)
Convert libssl writing for size_t
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'ssl/d1_msg.c')
-rw-r--r--ssl/d1_msg.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/ssl/d1_msg.c b/ssl/d1_msg.c
index ae7aff6959..ac6d28421c 100644
--- a/ssl/d1_msg.c
+++ b/ssl/d1_msg.c
@@ -10,7 +10,8 @@
#define USE_SOCKETS
#include "ssl_locl.h"
-int dtls1_write_app_data_bytes(SSL *s, int type, const void *buf_, int len)
+int dtls1_write_app_data_bytes(SSL *s, int type, const void *buf_, size_t len,
+ size_t *written)
{
int i;
@@ -41,8 +42,7 @@ int dtls1_write_app_data_bytes(SSL *s, int type, const void *buf_, int len)
return -1;
}
- i = dtls1_write_bytes(s, type, buf_, len);
- return i;
+ return dtls1_write_bytes(s, type, buf_, len, written);
}
int dtls1_dispatch_alert(SSL *s)
@@ -51,6 +51,7 @@ int dtls1_dispatch_alert(SSL *s)
void (*cb) (const SSL *ssl, int type, int val) = NULL;
unsigned char buf[DTLS1_AL_HEADER_LENGTH];
unsigned char *ptr = &buf[0];
+ size_t written;
s->s3->alert_dispatch = 0;
@@ -65,7 +66,7 @@ int dtls1_dispatch_alert(SSL *s)
}
#endif
- i = do_dtls1_write(s, SSL3_RT_ALERT, &buf[0], sizeof(buf), 0);
+ i = do_dtls1_write(s, SSL3_RT_ALERT, &buf[0], sizeof(buf), 0, &written);
if (i <= 0) {
s->s3->alert_dispatch = 1;
/* fprintf( stderr, "not done with alert\n" ); */
@@ -91,5 +92,5 @@ int dtls1_dispatch_alert(SSL *s)
cb(s, SSL_CB_WRITE_ALERT, j);
}
}
- return (i);
+ return i;
}