Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
dfcb080d
Commit
dfcb080d
authored
Mar 15, 2018
by
Emmanuel Hocdet
Committed by
Geoff Simmons
Apr 02, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved vtc test for vmod_proxy
parent
cd6b026a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
o00005.vtc
bin/varnishtest/tests/o00005.vtc
+31
-0
No files found.
bin/varnishtest/tests/o00005.vtc
View file @
dfcb080d
...
@@ -9,18 +9,30 @@ varnish v1 -proto "PROXY" -vcl+backend {
...
@@ -9,18 +9,30 @@ varnish v1 -proto "PROXY" -vcl+backend {
import proxy;
import proxy;
sub vcl_deliver {
sub vcl_deliver {
if (proxy.is_ssl()) {
set resp.http.is_ssl = "yes";
}
if (!proxy.client_has_cert_sess()) {
set resp.http.client_has_cert_sess = "no";
}
if (!proxy.client_has_cert_conn()) {
set resp.http.client_has_cert_conn = "no";
}
if (proxy.ssl_verify_result() == 0) {
if (proxy.ssl_verify_result() == 0) {
set resp.http.verify = "ok";
set resp.http.verify = "ok";
}
}
set resp.http.alpn = proxy.alpn();
set resp.http.alpn = proxy.alpn();
set resp.http.authority = proxy.authority();
set resp.http.ssl-version = proxy.ssl_version();
set resp.http.ssl-version = proxy.ssl_version();
set resp.http.cipher = proxy.ssl_cipher();
set resp.http.cipher = proxy.ssl_cipher();
set resp.http.key = proxy.cert_key();
set resp.http.key = proxy.cert_key();
set resp.http.sign = proxy.cert_sign();
set resp.http.sign = proxy.cert_sign();
set resp.http.cn = proxy.client_cert_cn();
}
}
} -start
} -start
client c1 {
client c1 {
# PROXY2 with CRC32C TLV
sendhex "0d 0a 0d 0a 00 0d 0a 51 55 49 54 0a 21 11 00 65"
sendhex "0d 0a 0d 0a 00 0d 0a 51 55 49 54 0a 21 11 00 65"
sendhex "d9 46 b5 21 5f 8e a8 22 ed 96 01 bb 03 00 04 95"
sendhex "d9 46 b5 21 5f 8e a8 22 ed 96 01 bb 03 00 04 95"
sendhex "03 ee 75 01 00 02 68 32 02 00 0a 68 6f 63 64 65"
sendhex "03 ee 75 01 00 02 68 32 02 00 0a 68 6f 63 64 65"
...
@@ -32,10 +44,29 @@ client c1 {
...
@@ -32,10 +44,29 @@ client c1 {
txreq
txreq
rxresp
rxresp
expect resp.status == 200
expect resp.status == 200
expect resp.http.is_ssl == yes
expect resp.http.client_has_cert_sess == no
expect resp.http.client_has_cert_conn == no
expect resp.http.verify == ok
expect resp.http.verify == ok
expect resp.http.alpn == h2
expect resp.http.alpn == h2
expect resp.http.authority == hocdet.net
expect resp.http.ssl-version == TLSv1.3
expect resp.http.ssl-version == TLSv1.3
expect resp.http.cipher == AEAD-AES128-GCM-SHA256
expect resp.http.cipher == AEAD-AES128-GCM-SHA256
expect resp.http.key == EC256
expect resp.http.key == EC256
expect resp.http.sign == RSA-SHA256
expect resp.http.sign == RSA-SHA256
expect resp.http.cn == ""
} -run
client c1 {
# PROXY2 with CRC32C TLV and bad checksum
sendhex "0d 0a 0d 0a 00 0d 0a 51 55 49 54 0a 21 11 00 65"
sendhex "d9 46 b5 21 5f 8e a8 22 ed 96 01 bb 03 00 04 95"
sendhex "03 ee 75 01 00 02 68 32 02 00 0a 68 6f 63 64 65"
sendhex "74 2e 6e 65 74 20 00 3d 01 00 00 00 00 21 00 07"
sendhex "54 4c 53 76 31 2e 33 25 00 05 45 43 32 35 36 24"
sendhex "00 0a 52 53 41 2d 53 48 41 32 35 36 23 00 16 41"
sendhex "45 41 44 2d 41 45 53 31 32 38 2d 47 43 4d 2d 53"
sendhex "48 41 32 35 35"
txreq
expect_close
} -run
} -run
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment