Mercurial > hg > nginx-quic
annotate src/os/unix/ngx_posix_config.h @ 7352:0de0b16a551c
SSL: corrected SSL_ERROR_WANT_WRITE / SSL_ERROR_WANT_READ logging.
While SSL_read() most likely to return SSL_ERROR_WANT_WRITE (and SSL_write()
accordingly SSL_ERROR_WANT_READ) during an SSL renegotiation, it is
not necessary mean that a renegotiation was started. In particular,
it can never happen during a renegotiation or can happen multiple times
during a renegotiation.
Because of the above, misleading "peer started SSL renegotiation" info
messages were replaced with "SSL_read: want write" and "SSL_write: want read"
debug ones.
Additionally, "SSL write handler" and "SSL read handler" are now logged
by the SSL write and read handlers, to make it easier to understand that
temporary SSL handlers are called instead of normal handlers.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 10 Sep 2018 18:57:19 +0300 |
parents | fc0d06224eda |
children |
rev | line source |
---|---|
441
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
374
diff
changeset
|
1 |
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
374
diff
changeset
|
2 /* |
444
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
441
diff
changeset
|
3 * Copyright (C) Igor Sysoev |
4412 | 4 * Copyright (C) Nginx, Inc. |
441
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
374
diff
changeset
|
5 */ |
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
374
diff
changeset
|
6 |
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
374
diff
changeset
|
7 |
355
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
8 #ifndef _NGX_POSIX_CONFIG_H_INCLUDED_ |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
9 #define _NGX_POSIX_CONFIG_H_INCLUDED_ |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
10 |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
11 |
515 | 12 #if (NGX_HPUX) |
455 | 13 #define _XOPEN_SOURCE |
14 #define _XOPEN_SOURCE_EXTENDED 1 | |
4692
489839d07b38
Fixed "sendmsg() failed" alerts on HP-UX.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4557
diff
changeset
|
15 #define _HPUX_ALT_XOPEN_SOCKET_API |
455 | 16 #endif |
17 | |
18 | |
515 | 19 #if (NGX_TRU64) |
467 | 20 #define _REENTRANT |
21 #endif | |
22 | |
23 | |
6156
a88e309f839b
Configure: GNU Hurd properly recognized.
Maxim Dounin <mdounin@mdounin.ru>
parents:
5389
diff
changeset
|
24 #if (NGX_GNU_HURD) |
a88e309f839b
Configure: GNU Hurd properly recognized.
Maxim Dounin <mdounin@mdounin.ru>
parents:
5389
diff
changeset
|
25 #ifndef _GNU_SOURCE |
a88e309f839b
Configure: GNU Hurd properly recognized.
Maxim Dounin <mdounin@mdounin.ru>
parents:
5389
diff
changeset
|
26 #define _GNU_SOURCE /* accept4() */ |
a88e309f839b
Configure: GNU Hurd properly recognized.
Maxim Dounin <mdounin@mdounin.ru>
parents:
5389
diff
changeset
|
27 #endif |
a88e309f839b
Configure: GNU Hurd properly recognized.
Maxim Dounin <mdounin@mdounin.ru>
parents:
5389
diff
changeset
|
28 #define _FILE_OFFSET_BITS 64 |
a88e309f839b
Configure: GNU Hurd properly recognized.
Maxim Dounin <mdounin@mdounin.ru>
parents:
5389
diff
changeset
|
29 #endif |
a88e309f839b
Configure: GNU Hurd properly recognized.
Maxim Dounin <mdounin@mdounin.ru>
parents:
5389
diff
changeset
|
30 |
a88e309f839b
Configure: GNU Hurd properly recognized.
Maxim Dounin <mdounin@mdounin.ru>
parents:
5389
diff
changeset
|
31 |
1576 | 32 #ifdef __CYGWIN__ |
33 #define timezonevar /* timezone is variable */ | |
1581
81774dc3db28
Cygwin can not pass SCM_RIGHTS via unix socket, use signals
Igor Sysoev <igor@sysoev.ru>
parents:
1576
diff
changeset
|
34 #define NGX_BROKEN_SCM_RIGHTS 1 |
1576 | 35 #endif |
36 | |
37 | |
355
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
38 #include <sys/types.h> |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
39 #include <sys/time.h> |
455 | 40 #if (NGX_HAVE_UNISTD_H) |
355
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
41 #include <unistd.h> |
455 | 42 #endif |
43 #if (NGX_HAVE_INTTYPES_H) | |
44 #include <inttypes.h> | |
45 #endif | |
355
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
46 #include <stdarg.h> |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
47 #include <stddef.h> /* offsetof() */ |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
48 #include <stdio.h> |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
49 #include <stdlib.h> |
5389
72e31d88defa
Added ngx_filename_cmp() with "/" sorted to the left.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4692
diff
changeset
|
50 #include <ctype.h> |
355
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
51 #include <errno.h> |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
52 #include <string.h> |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
53 #include <signal.h> |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
54 #include <pwd.h> |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
55 #include <grp.h> |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
56 #include <dirent.h> |
727 | 57 #include <glob.h> |
4557
b13419459a50
Added explicit include of time.h.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4412
diff
changeset
|
58 #include <time.h> |
2659
a3bcaabf2ec8
fix OpenBSD building, broken in r2616
Igor Sysoev <igor@sysoev.ru>
parents:
2615
diff
changeset
|
59 #if (NGX_HAVE_SYS_PARAM_H) |
a3bcaabf2ec8
fix OpenBSD building, broken in r2616
Igor Sysoev <igor@sysoev.ru>
parents:
2615
diff
changeset
|
60 #include <sys/param.h> /* statfs() */ |
a3bcaabf2ec8
fix OpenBSD building, broken in r2616
Igor Sysoev <igor@sysoev.ru>
parents:
2615
diff
changeset
|
61 #endif |
2615 | 62 #if (NGX_HAVE_SYS_MOUNT_H) |
63 #include <sys/mount.h> /* statfs() */ | |
64 #endif | |
65 #if (NGX_HAVE_SYS_STATVFS_H) | |
66 #include <sys/statvfs.h> /* statvfs() */ | |
67 #endif | |
355
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
68 |
455 | 69 #if (NGX_HAVE_SYS_FILIO_H) |
70 #include <sys/filio.h> /* FIONBIO */ | |
71 #endif | |
72 #include <sys/ioctl.h> /* FIONBIO */ | |
73 | |
355
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
74 #include <sys/uio.h> |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
75 #include <sys/stat.h> |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
76 #include <fcntl.h> |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
77 |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
78 #include <sys/wait.h> |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
79 #include <sys/mman.h> |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
80 #include <sys/resource.h> |
374
213f17e9f776
nginx-0.0.7-2004-07-02-09:47:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
355
diff
changeset
|
81 #include <sched.h> |
355
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
82 |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
83 #include <sys/socket.h> |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
84 #include <netinet/in.h> |
455 | 85 #include <netinet/tcp.h> /* TCP_NODELAY */ |
355
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
86 #include <arpa/inet.h> |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
87 #include <netdb.h> |
479 | 88 #include <sys/un.h> |
355
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
89 |
455 | 90 #if (NGX_HAVE_LIMITS_H) |
91 #include <limits.h> /* IOV_MAX */ | |
92 #endif | |
93 | |
1954
d85e291b99f9
it seems that malloc.h is required for Cygwin only
Igor Sysoev <igor@sysoev.ru>
parents:
1901
diff
changeset
|
94 #ifdef __CYGWIN__ |
1576 | 95 #include <malloc.h> /* memalign() */ |
96 #endif | |
97 | |
98 #if (NGX_HAVE_CRYPT_H) | |
99 #include <crypt.h> | |
100 #endif | |
101 | |
102 | |
455 | 103 #ifndef IOV_MAX |
104 #define IOV_MAX 16 | |
105 #endif | |
106 | |
107 | |
355
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
108 #include <ngx_auto_config.h> |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
109 |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
110 |
6380
7142b04337d6
Dynamic modules: dlopen() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6156
diff
changeset
|
111 #if (NGX_HAVE_DLOPEN) |
7142b04337d6
Dynamic modules: dlopen() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6156
diff
changeset
|
112 #include <dlfcn.h> |
7142b04337d6
Dynamic modules: dlopen() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6156
diff
changeset
|
113 #endif |
7142b04337d6
Dynamic modules: dlopen() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6156
diff
changeset
|
114 |
7142b04337d6
Dynamic modules: dlopen() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6156
diff
changeset
|
115 |
3909
0daede16d68b
use POSIX semaphores in shmtx instead of sched_yield()
Igor Sysoev <igor@sysoev.ru>
parents:
3052
diff
changeset
|
116 #if (NGX_HAVE_POSIX_SEM) |
0daede16d68b
use POSIX semaphores in shmtx instead of sched_yield()
Igor Sysoev <igor@sysoev.ru>
parents:
3052
diff
changeset
|
117 #include <semaphore.h> |
0daede16d68b
use POSIX semaphores in shmtx instead of sched_yield()
Igor Sysoev <igor@sysoev.ru>
parents:
3052
diff
changeset
|
118 #endif |
0daede16d68b
use POSIX semaphores in shmtx instead of sched_yield()
Igor Sysoev <igor@sysoev.ru>
parents:
3052
diff
changeset
|
119 |
0daede16d68b
use POSIX semaphores in shmtx instead of sched_yield()
Igor Sysoev <igor@sysoev.ru>
parents:
3052
diff
changeset
|
120 |
469 | 121 #if (NGX_HAVE_POLL) |
355
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
122 #include <poll.h> |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
123 #endif |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
124 |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
125 |
469 | 126 #if (NGX_HAVE_KQUEUE) |
455 | 127 #include <sys/event.h> |
128 #endif | |
129 | |
130 | |
6465 | 131 #if (NGX_HAVE_DEVPOLL) && !(NGX_TEST_BUILD_DEVPOLL) |
455 | 132 #include <sys/ioctl.h> |
133 #include <sys/devpoll.h> | |
134 #endif | |
135 | |
136 | |
3052
6060225e9261
FreeBSD and Linux AIO support
Igor Sysoev <igor@sysoev.ru>
parents:
2659
diff
changeset
|
137 #if (NGX_HAVE_FILE_AIO) |
6060225e9261
FreeBSD and Linux AIO support
Igor Sysoev <igor@sysoev.ru>
parents:
2659
diff
changeset
|
138 #include <aio.h> |
6060225e9261
FreeBSD and Linux AIO support
Igor Sysoev <igor@sysoev.ru>
parents:
2659
diff
changeset
|
139 typedef struct aiocb ngx_aiocb_t; |
6060225e9261
FreeBSD and Linux AIO support
Igor Sysoev <igor@sysoev.ru>
parents:
2659
diff
changeset
|
140 #endif |
6060225e9261
FreeBSD and Linux AIO support
Igor Sysoev <igor@sysoev.ru>
parents:
2659
diff
changeset
|
141 |
6060225e9261
FreeBSD and Linux AIO support
Igor Sysoev <igor@sysoev.ru>
parents:
2659
diff
changeset
|
142 |
1377
0d57c150115b
set default listen() backlog to 511 on all platforms except FreeBSD
Igor Sysoev <igor@sysoev.ru>
parents:
727
diff
changeset
|
143 #define NGX_LISTEN_BACKLOG 511 |
0d57c150115b
set default listen() backlog to 511 on all platforms except FreeBSD
Igor Sysoev <igor@sysoev.ru>
parents:
727
diff
changeset
|
144 |
4223
1b779cb69dc8
malloc() debugging on MacOSX.
Igor Sysoev <igor@sysoev.ru>
parents:
3909
diff
changeset
|
145 #define ngx_debug_init() |
1b779cb69dc8
malloc() debugging on MacOSX.
Igor Sysoev <igor@sysoev.ru>
parents:
3909
diff
changeset
|
146 |
1377
0d57c150115b
set default listen() backlog to 511 on all platforms except FreeBSD
Igor Sysoev <igor@sysoev.ru>
parents:
727
diff
changeset
|
147 |
601 | 148 extern char **environ; |
149 | |
150 | |
355
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
151 #endif /* _NGX_POSIX_CONFIG_H_INCLUDED_ */ |