@@ -10,10 +10,11 @@ http {
10
10
access_log access.log;
11
11
12
12
server {
13
+ # no resumption (default)
13
14
listen 8443 ssl;
14
- server_name localhost;
15
15
ssl_certificate ../../../test-ca/rsa/server.cert;
16
16
ssl_certificate_key ../../../test-ca/rsa/server.key;
17
+ server_name localhost;
17
18
18
19
location = / {
19
20
return 200 "hello world\n" ;
@@ -44,4 +45,81 @@ http {
44
45
return 200 "s-dn:$ssl_client_s_dn \ni-dn:$ssl_client_i_dn \nserial:$ssl_client_serial \nfp:$ssl_client_fingerprint \nverify:$ssl_client_verify \nv-start:$ssl_client_v_start \nv-end:$ssl_client_v_end \nv-remain:$ssl_client_v_remain \ncert:\n$ssl_client_cert \n" ;
45
46
}
46
47
}
48
+
49
+ server {
50
+ # per-worker resumption
51
+ listen 8444 ssl;
52
+ ssl_session_cache builtin;
53
+ ssl_certificate ../../../test-ca/rsa/server.cert;
54
+ ssl_certificate_key ../../../test-ca/rsa/server.key;
55
+ server_name localhost;
56
+
57
+ location = / {
58
+ return 200 "hello world\n" ;
59
+ }
60
+
61
+ location /ssl-agreed {
62
+ return 200 "protocol:$ssl_protocol ,cipher:$ssl_cipher \n" ;
63
+ }
64
+
65
+ location /ssl-server-name {
66
+ return 200 "server-name:$ssl_server_name \n" ;
67
+ }
68
+
69
+ location /ssl-was-reused {
70
+ return 200 "reused:$ssl_session_reused \n" ;
71
+ }
72
+ }
73
+
74
+ server {
75
+ # per-worker & per-server resumption
76
+ listen 8445 ssl;
77
+ ssl_session_cache builtin shared:port8445:1M;
78
+ ssl_certificate ../../../test-ca/rsa/server.cert;
79
+ ssl_certificate_key ../../../test-ca/rsa/server.key;
80
+ server_name localhost;
81
+
82
+
83
+ location = / {
84
+ return 200 "hello world\n" ;
85
+ }
86
+
87
+ location /ssl-agreed {
88
+ return 200 "protocol:$ssl_protocol ,cipher:$ssl_cipher \n" ;
89
+ }
90
+
91
+ location /ssl-server-name {
92
+ return 200 "server-name:$ssl_server_name \n" ;
93
+ }
94
+
95
+ location /ssl-was-reused {
96
+ return 200 "reused:$ssl_session_reused \n" ;
97
+ }
98
+
99
+ }
100
+
101
+ server {
102
+ # per-server resumption
103
+ listen 8446 ssl;
104
+ ssl_session_cache shared:port8446:1M;
105
+ ssl_certificate ../../../test-ca/rsa/server.cert;
106
+ ssl_certificate_key ../../../test-ca/rsa/server.key;
107
+ server_name localhost;
108
+
109
+ location = / {
110
+ return 200 "hello world\n" ;
111
+ }
112
+
113
+ location /ssl-agreed {
114
+ return 200 "protocol:$ssl_protocol ,cipher:$ssl_cipher \n" ;
115
+ }
116
+
117
+ location /ssl-server-name {
118
+ return 200 "server-name:$ssl_server_name \n" ;
119
+ }
120
+
121
+ location /ssl-was-reused {
122
+ return 200 "reused:$ssl_session_reused \n" ;
123
+ }
124
+ }
47
125
}
0 commit comments