Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Cédric Le Ninivin
slapos
Commits
f99d53ea
Commit
f99d53ea
authored
Jul 16, 2020
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
caddy-frontend: Prove that empty ssl_proxy_ca_crt is correctly rejected
parent
cf57840d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
software/caddy-frontend/test/test.py
software/caddy-frontend/test/test.py
+18
-2
No files found.
software/caddy-frontend/test/test.py
View file @
f99d53ea
...
@@ -6071,6 +6071,11 @@ class TestSlaveRejectReportUnsafeDamaged(SlaveHttpFrontendTestCase):
...
@@ -6071,6 +6071,11 @@ class TestSlaveRejectReportUnsafeDamaged(SlaveHttpFrontendTestCase):
'
ssl
-
proxy
-
verify
': True,
'
ssl
-
proxy
-
verify
': True,
'
ssl_proxy_ca_crt
': '
damaged
',
'
ssl_proxy_ca_crt
': '
damaged
',
},
},
'
ssl
-
proxy
-
verify_ssl_proxy_ca_crt_empty
': {
'
url
': cls.backend_https_url,
'
ssl
-
proxy
-
verify
': True,
'
ssl_proxy_ca_crt
': '',
},
'
bad
-
backend
': {
'
bad
-
backend
': {
'
url
': '
http
:
//
1
:
2
:
3
:
4
',
'
url
': '
http
:
//
1
:
2
:
3
:
4
',
'
https
-
url
': '
http
:
//
host
.
domain
:
badport
',
'
https
-
url
': '
http
:
//
host
.
domain
:
badport
',
...
@@ -6147,8 +6152,8 @@ class TestSlaveRejectReportUnsafeDamaged(SlaveHttpFrontendTestCase):
...
@@ -6147,8 +6152,8 @@ class TestSlaveRejectReportUnsafeDamaged(SlaveHttpFrontendTestCase):
'backend-client-caucase-url': 'http://[%s]:8990' % self._ipv6_address,
'backend-client-caucase-url': 'http://[%s]:8990' % self._ipv6_address,
'domain': 'example.com',
'domain': 'example.com',
'accepted-slave-amount': '7',
'accepted-slave-amount': '7',
'rejected-slave-amount': '1
3
',
'rejected-slave-amount': '1
4
',
'slave-amount': '2
0
',
'slave-amount': '2
1
',
'rejected-slave-dict': {
'rejected-slave-dict': {
'_https-url': ['slave https-url "
https
:
//
[
fd46
::
c2ae
]:
!
py
!
u
\
'123123
\
'
"'
'_https-url': ['slave https-url "
https
:
//
[
fd46
::
c2ae
]:
!
py
!
u
\
'123123
\
'
"'
' invalid'
],
' invalid'
],
...
@@ -6156,6 +6161,9 @@ class TestSlaveRejectReportUnsafeDamaged(SlaveHttpFrontendTestCase):
...
@@ -6156,6 +6161,9 @@ class TestSlaveRejectReportUnsafeDamaged(SlaveHttpFrontendTestCase):
'_ssl-proxy-verify_ssl_proxy_ca_crt_damaged'
:
[
'_ssl-proxy-verify_ssl_proxy_ca_crt_damaged'
:
[
'ssl_proxy_ca_crt is invalid'
'ssl_proxy_ca_crt is invalid'
],
],
'_ssl-proxy-verify_ssl_proxy_ca_crt_empty'
:
[
'ssl_proxy_ca_crt is invalid'
],
'_bad-ciphers'
:
[
'_bad-ciphers'
:
[
"Cipher 'bad' is not supported."
,
"Cipher 'bad' is not supported."
,
"Cipher 'again' is not supported."
"Cipher 'again' is not supported."
...
@@ -6222,6 +6230,14 @@ class TestSlaveRejectReportUnsafeDamaged(SlaveHttpFrontendTestCase):
...
@@ -6222,6 +6230,14 @@ class TestSlaveRejectReportUnsafeDamaged(SlaveHttpFrontendTestCase):
parameter_dict
parameter_dict
)
)
def
test_ssl_proxy_verify_ssl_proxy_ca_crt_empty
(
self
):
parameter_dict
=
self
.
parseSlaveParameterDict
(
'ssl-proxy-verify_ssl_proxy_ca_crt_empty'
)
self
.
assertEqual
(
{
'request-error-list'
:
[
"ssl_proxy_ca_crt is invalid"
]},
parameter_dict
)
def
test_server_alias_same
(
self
):
def
test_server_alias_same
(
self
):
parameter_dict
=
self
.
parseSlaveParameterDict
(
'server-alias-same'
)
parameter_dict
=
self
.
parseSlaveParameterDict
(
'server-alias-same'
)
self
.
assertLogAccessUrlWithPop
(
parameter_dict
)
self
.
assertLogAccessUrlWithPop
(
parameter_dict
)
...
...
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