Mercurial > hg > nginx-quic
annotate src/core/ngx_regex.h @ 6982:ac9b1df5b246
SSL: disabled renegotiation detection in client mode.
CVE-2009-3555 is no longer relevant and mitigated by the renegotiation
info extension (secure renegotiation). On the other hand, unexpected
renegotiation still introduces potential security risks, and hence we do
not allow renegotiation on the server side, as we never request renegotiation.
On the client side the situation is different though. There are backends
which explicitly request renegotiation, and disabled renegotiation
introduces interoperability problems. This change allows renegotiation
on the client side, and fixes interoperability problems as observed with
such backends (ticket #872).
Additionally, with TLSv1.3 the SSL_CB_HANDSHAKE_START flag is currently set
by OpenSSL when receiving a NewSessionTicket message, and was detected by
nginx as a renegotiation attempt. This looks like a bug in OpenSSL, though
this change also allows better interoperability till the problem is fixed.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Tue, 18 Apr 2017 16:08:44 +0300 |
parents | 6e1a48bcf915 |
children | 0b5f12d5c531 |
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:
216
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:
216
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:
216
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:
216
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:
216
diff
changeset
|
7 |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
8 #ifndef _NGX_REGEX_H_INCLUDED_ |
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
9 #define _NGX_REGEX_H_INCLUDED_ |
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
10 |
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
11 |
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
12 #include <ngx_config.h> |
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
13 #include <ngx_core.h> |
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
14 |
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
15 #include <pcre.h> |
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
16 |
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
17 |
3319
be47fe127f8c
ngx_regex_exec() calling optimiztion:
Igor Sysoev <igor@sysoev.ru>
parents:
1784
diff
changeset
|
18 #define NGX_REGEX_NO_MATCHED PCRE_ERROR_NOMATCH /* -1 */ |
481 | 19 |
20 #define NGX_REGEX_CASELESS PCRE_CASELESS | |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
21 |
4388
005fc2d5e84f
Added support for regex study and PCRE JIT (ticket #41) optimizations on
Valentin Bartenev <vbart@nginx.com>
parents:
3325
diff
changeset
|
22 |
005fc2d5e84f
Added support for regex study and PCRE JIT (ticket #41) optimizations on
Valentin Bartenev <vbart@nginx.com>
parents:
3325
diff
changeset
|
23 typedef struct { |
4638
6e1a48bcf915
Fixed the ngx_regex.h header file compatibility with C++.
Valentin Bartenev <vbart@nginx.com>
parents:
4412
diff
changeset
|
24 pcre *code; |
4388
005fc2d5e84f
Added support for regex study and PCRE JIT (ticket #41) optimizations on
Valentin Bartenev <vbart@nginx.com>
parents:
3325
diff
changeset
|
25 pcre_extra *extra; |
005fc2d5e84f
Added support for regex study and PCRE JIT (ticket #41) optimizations on
Valentin Bartenev <vbart@nginx.com>
parents:
3325
diff
changeset
|
26 } ngx_regex_t; |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
27 |
3325 | 28 |
1784 | 29 typedef struct { |
3325 | 30 ngx_str_t pattern; |
31 ngx_pool_t *pool; | |
32 ngx_int_t options; | |
33 | |
34 ngx_regex_t *regex; | |
35 int captures; | |
36 int named_captures; | |
37 int name_size; | |
38 u_char *names; | |
39 ngx_str_t err; | |
40 } ngx_regex_compile_t; | |
41 | |
42 | |
43 typedef struct { | |
44 ngx_regex_t *regex; | |
45 u_char *name; | |
1784 | 46 } ngx_regex_elt_t; |
47 | |
48 | |
499 | 49 void ngx_regex_init(void); |
3325 | 50 ngx_int_t ngx_regex_compile(ngx_regex_compile_t *rc); |
3319
be47fe127f8c
ngx_regex_exec() calling optimiztion:
Igor Sysoev <igor@sysoev.ru>
parents:
1784
diff
changeset
|
51 |
be47fe127f8c
ngx_regex_exec() calling optimiztion:
Igor Sysoev <igor@sysoev.ru>
parents:
1784
diff
changeset
|
52 #define ngx_regex_exec(re, s, captures, size) \ |
4638
6e1a48bcf915
Fixed the ngx_regex.h header file compatibility with C++.
Valentin Bartenev <vbart@nginx.com>
parents:
4412
diff
changeset
|
53 pcre_exec(re->code, re->extra, (const char *) (s)->data, (s)->len, 0, 0, \ |
3319
be47fe127f8c
ngx_regex_exec() calling optimiztion:
Igor Sysoev <igor@sysoev.ru>
parents:
1784
diff
changeset
|
54 captures, size) |
3325 | 55 #define ngx_regex_exec_n "pcre_exec()" |
3319
be47fe127f8c
ngx_regex_exec() calling optimiztion:
Igor Sysoev <igor@sysoev.ru>
parents:
1784
diff
changeset
|
56 |
1784 | 57 ngx_int_t ngx_regex_exec_array(ngx_array_t *a, ngx_str_t *s, ngx_log_t *log); |
58 | |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
59 |
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
60 #endif /* _NGX_REGEX_H_INCLUDED_ */ |