diff options
author | beck <> | 2015-09-10 10:22:28 +0000 |
---|---|---|
committer | beck <> | 2015-09-10 10:22:28 +0000 |
commit | d7b1cca0f8903e9e46ffbef6af5b6edd9d88ae39 (patch) | |
tree | f452172498692f9d194b8101802284e56f8e3c6a /src/lib/libtls/tls.h | |
parent | f7415644a66ca9d04e5e06312a163e677032b695 (diff) | |
download | openbsd-d7b1cca0f8903e9e46ffbef6af5b6edd9d88ae39.tar.gz openbsd-d7b1cca0f8903e9e46ffbef6af5b6edd9d88ae39.tar.bz2 openbsd-d7b1cca0f8903e9e46ffbef6af5b6edd9d88ae39.zip |
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 '')
-rw-r--r-- | src/lib/libtls/tls.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/libtls/tls.h b/src/lib/libtls/tls.h index 8548fe1d83..13b88c31d4 100644 --- a/src/lib/libtls/tls.h +++ b/src/lib/libtls/tls.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tls.h,v 1.16 2015/09/10 10:14:20 jsing Exp $ */ | 1 | /* $OpenBSD: tls.h,v 1.17 2015/09/10 10:22:28 beck Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -95,9 +95,8 @@ int tls_connect_servername(struct tls *_ctx, const char *_host, | |||
95 | const char *_port, const char *_servername); | 95 | const char *_port, const char *_servername); |
96 | int tls_connect_socket(struct tls *_ctx, int _s, const char *_servername); | 96 | int tls_connect_socket(struct tls *_ctx, int _s, const char *_servername); |
97 | int tls_handshake(struct tls *_ctx); | 97 | int tls_handshake(struct tls *_ctx); |
98 | int tls_read(struct tls *_ctx, void *_buf, size_t _buflen, size_t *_outlen); | 98 | ssize_t tls_read(struct tls *_ctx, void *_buf, size_t _buflen); |
99 | int tls_write(struct tls *_ctx, const void *_buf, size_t _buflen, | 99 | ssize_t tls_write(struct tls *_ctx, const void *_buf, size_t _buflen); |
100 | size_t *_outlen); | ||
101 | int tls_close(struct tls *_ctx); | 100 | int tls_close(struct tls *_ctx); |
102 | 101 | ||
103 | uint8_t *tls_load_file(const char *_file, size_t *_len, char *_password); | 102 | uint8_t *tls_load_file(const char *_file, size_t *_len, char *_password); |