-
-
Notifications
You must be signed in to change notification settings - Fork 221
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for verifying ssl certificates (#596)
* Add support for verifying ssl certificates Signed-off-by: Lukas Straub <lukasstraub2@web.de> * Add documentation for new certificate configuration options Signed-off-by: Lukas Straub <lukasstraub2@web.de> * Add test to check the verification of ssl certificates Signed-off-by: Lukas Straub <lukasstraub2@web.de>
- Loading branch information
1 parent
b66608c
commit f628b40
Showing
5 changed files
with
54 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
debug: true | ||
|
||
collections: | ||
live: $live | ||
|
||
certificates: | ||
cert_reqs: 'CERT_REQUIRED' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from .base_config_test import BaseConfigTest | ||
|
||
# ============================================================================ | ||
class TestCertReq(BaseConfigTest): | ||
@classmethod | ||
def setup_class(cls): | ||
super(TestCertReq, cls).setup_class('config_test_cert_req.yaml') | ||
|
||
def test_expired_cert(self): | ||
resp = self.testapp.get('/live/mp_/https://expired.badssl.com/', status='*') | ||
|
||
assert resp.status_int == 400 | ||
|
||
def test_good_cert(self): | ||
resp = self.testapp.get('/live/mp_/https://www.google.com/', status='*') | ||
|
||
assert resp.status_int >= 200 and resp.status_int < 400 |