diff options
author | bluhm <> | 2015-01-13 17:35:35 +0000 |
---|---|---|
committer | bluhm <> | 2015-01-13 17:35:35 +0000 |
commit | 3fd2d1d95424716eaf5c4ecf17d6bf0be444a372 (patch) | |
tree | 675defc54ce1d8f4c3d5203592fb373c717de34d /src/lib/libtls/tls_internal.h | |
parent | dda895dbd2777a18c7cdf12a3ec6dd1c0c433b46 (diff) | |
download | openbsd-3fd2d1d95424716eaf5c4ecf17d6bf0be444a372.tar.gz openbsd-3fd2d1d95424716eaf5c4ecf17d6bf0be444a372.tar.bz2 openbsd-3fd2d1d95424716eaf5c4ecf17d6bf0be444a372.zip |
For non-blocking sockets tls_connect_fds() could fail with EAGAIN.
Use the same logic from the read, write, accept functions to inform
the caller wether a readable or writable socket is needed. After
that event, the connect function must be called again. All the
checks before connecting are done only once.
OK tedu@
Diffstat (limited to 'src/lib/libtls/tls_internal.h')
-rw-r--r-- | src/lib/libtls/tls_internal.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/libtls/tls_internal.h b/src/lib/libtls/tls_internal.h index 4b250574ef..1a2bd388b7 100644 --- a/src/lib/libtls/tls_internal.h +++ b/src/lib/libtls/tls_internal.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tls_internal.h,v 1.5 2014/12/17 17:51:33 doug Exp $ */ | 1 | /* $OpenBSD: tls_internal.h,v 1.6 2015/01/13 17:35:35 bluhm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014 Jeremie Courreges-Anglas <jca@openbsd.org> | 3 | * Copyright (c) 2014 Jeremie Courreges-Anglas <jca@openbsd.org> |
4 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> | 4 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> |
@@ -44,7 +44,8 @@ struct tls_config { | |||
44 | 44 | ||
45 | #define TLS_CLIENT (1 << 0) | 45 | #define TLS_CLIENT (1 << 0) |
46 | #define TLS_SERVER (1 << 1) | 46 | #define TLS_SERVER (1 << 1) |
47 | #define TLS_SERVER_CONN (1 << 2) | 47 | #define TLS_SERVER_CONN (1 << 2) |
48 | #define TLS_CONNECTING (1 << 3) | ||
48 | 49 | ||
49 | struct tls { | 50 | struct tls { |
50 | struct tls_config *config; | 51 | struct tls_config *config; |