diff options
author | Bob Beck <beck@cvs.openbsd.org> | 2015-09-10 10:22:29 +0000 |
---|---|---|
committer | Bob Beck <beck@cvs.openbsd.org> | 2015-09-10 10:22:29 +0000 |
commit | 88a0937d27b2170a227eb731fc6e2c03e1e6f221 (patch) | |
tree | 30f73b08ad1a7ed69f276553b2c29f492371ff55 /lib/libtls/tls.h | |
parent | cf62476995aa2d557f8c44d6cfdbcae71adc3378 (diff) |
Change tls_read and tls_write semantics to return an ssize_t to better
match read() and write() semantics to make porting existing code using
read/write easier.. requested by bluhm@ who convinced jsing and I to break
the api
ok jsing@ bluhm@
Diffstat (limited to 'lib/libtls/tls.h')
-rw-r--r-- | lib/libtls/tls.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/libtls/tls.h b/lib/libtls/tls.h index 8548fe1d831..13b88c31d47 100644 --- a/lib/libtls/tls.h +++ b/lib/libtls/tls.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tls.h,v 1.16 2015/09/10 10:14:20 jsing Exp $ */ +/* $OpenBSD: tls.h,v 1.17 2015/09/10 10:22:28 beck Exp $ */ /* * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> * @@ -95,9 +95,8 @@ int tls_connect_servername(struct tls *_ctx, const char *_host, const char *_port, const char *_servername); int tls_connect_socket(struct tls *_ctx, int _s, const char *_servername); int tls_handshake(struct tls *_ctx); -int tls_read(struct tls *_ctx, void *_buf, size_t _buflen, size_t *_outlen); -int tls_write(struct tls *_ctx, const void *_buf, size_t _buflen, - size_t *_outlen); +ssize_t tls_read(struct tls *_ctx, void *_buf, size_t _buflen); +ssize_t tls_write(struct tls *_ctx, const void *_buf, size_t _buflen); int tls_close(struct tls *_ctx); uint8_t *tls_load_file(const char *_file, size_t *_len, char *_password); |