mirror of
https://github.com/httpie/cli.git
synced 2025-03-13 06:18:33 +01:00
Merge 51606bf276
into 5b604c37c6
This commit is contained in:
commit
f8932716d9
@ -811,6 +811,7 @@ ssl = options.add_group('SSL')
|
||||
|
||||
ssl.add_argument(
|
||||
'--verify',
|
||||
dest='verify',
|
||||
default='yes',
|
||||
short_help='If "no", skip SSL verification. If a file path, use it as a CA bundle.',
|
||||
help="""
|
||||
@ -820,6 +821,16 @@ ssl.add_argument(
|
||||
variable instead.)
|
||||
""",
|
||||
)
|
||||
ssl.add_argument(
|
||||
'-k',
|
||||
dest='verify',
|
||||
default='no',
|
||||
short_help='Shortcut for "--verify=no" skipping SSL verification',
|
||||
help="""
|
||||
Shortcut for "--verify=no" which skips verification of the host's
|
||||
SSL certificate. See the '--verify' flag help for further information.
|
||||
""",
|
||||
)
|
||||
ssl.add_argument(
|
||||
'--ssl',
|
||||
dest='ssl_version',
|
||||
|
@ -113,6 +113,11 @@ class TestServerCert:
|
||||
r = http(httpbin_secure.url + '/get', '--verify=no')
|
||||
assert HTTP_OK in r
|
||||
|
||||
def test_verify_no_shortcut_OK(self, httpbin_secure):
|
||||
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
|
||||
r = http(httpbin_secure.url + '/get', '-k')
|
||||
assert HTTP_OK in r
|
||||
|
||||
@pytest.mark.parametrize('verify_value', ['false', 'fALse'])
|
||||
def test_verify_false_OK(self, httpbin_secure, verify_value):
|
||||
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
|
||||
|
Loading…
Reference in New Issue
Block a user