mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-14 15:53:28 +01:00
* 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>
18 lines
611 B
Python
18 lines
611 B
Python
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
|