Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--verify=no doesn't work #7

Closed
nhooyr opened this issue Mar 28, 2016 · 5 comments
Closed

--verify=no doesn't work #7

nhooyr opened this issue Mar 28, 2016 · 5 comments

Comments

@nhooyr
Copy link

nhooyr commented Mar 28, 2016

HTTPie 1.0.0-dev
Requests 2.9.1
Pygments 2.1.3
Python 2.7.11 (default, Jan 22 2016, 08:29:18) 
[GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)]
/usr/local/opt/python/bin/python2.7
Darwin 15.4.0

<Environment {
    "colors": 256, 
    "config": {
        "__meta__": {
            "about": "u'HTTPie configuration file'", 
            "help": "u'https://github.com/jkbrzt/httpie#config'", 
            "httpie": "u'1.0.0-dev'"
        }, 
        "default_options": "[u'--style=bw']"
    }, 
    "config_dir": "/Users/nhooyr/.httpie", 
    "is_windows": false, 
    "stderr": "<open file '<stderr>', mode 'w' at 0x1018f41e0>", 
    "stderr_isatty": false, 
    "stdin": "<open file '<stdin>', mode 'r' at 0x1018f40c0>", 
    "stdin_encoding": "UTF-8", 
    "stdin_isatty": true, 
    "stdout": "<open file '<stdout>', mode 'w' at 0x1018f4150>", 
    "stdout_encoding": "utf8", 
    "stdout_isatty": false
}>

>>> requests.request(**{
    "allow_redirects": false, 
    "auth": "None", 
    "cert": "None", 
    "data": {}, 
    "files": {}, 
    "headers": {
        "User-Agent": "HTTPie/1.0.0-dev"
    }, 
    "method": "get", 
    "params": {}, 
    "proxies": {}, 
    "stream": true, 
    "timeout": 30, 
    "url": "u'https://localhost'", 
    "verify": false
})


http: error: SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)
Traceback (most recent call last):
  File "/usr/local/bin/http", line 9, in <module>
    load_entry_point('httpie==1.0.0.dev0', 'console_scripts', 'http')()
  File "/usr/local/lib/python2.7/site-packages/httpie/core.py", line 227, in main
    log_error=log_error,
  File "/usr/local/lib/python2.7/site-packages/httpie/core.py", line 99, in program
    final_response = get_response(args, config_dir=env.config.directory)
  File "/usr/local/lib/python2.7/site-packages/httpie/client.py", line 70, in get_response
    response = requests_session.request(**kwargs)
  File "/usr/local/lib/python2.7/site-packages/requests/sessions.py", line 468, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python2.7/site-packages/requests/sessions.py", line 576, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/hyper/contrib.py", line 66, in send
    request.headers
  File "/usr/local/lib/python2.7/site-packages/hyper/common/connection.py", line 98, in request
    method=method, url=url, body=body, headers=headers
  File "/usr/local/lib/python2.7/site-packages/hyper/http11/connection.py", line 164, in request
    self.connect()
  File "/usr/local/lib/python2.7/site-packages/hyper/http11/connection.py", line 128, in connect
    sock, proto = wrap_socket(sock, host, self.ssl_context)
  File "/usr/local/lib/python2.7/site-packages/hyper/tls.py", line 42, in wrap_socket
    ssl_sock = _ssl_context.wrap_socket(sock, server_hostname=server_hostname)
  File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 352, in wrap_socket
    _context=self)
  File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 579, in __init__
    self.do_handshake()
  File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 808, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)
@Lukasa
Copy link

Lukasa commented Mar 28, 2016

Right now hyper does not respect the verification settings from httpie or from requests.

@jkbrzt
Copy link
Member

jkbrzt commented Mar 29, 2016

@Lukasa thanks for the information.

@nhooyr Please follow the development of this issue under https://github.com/Lukasa/hyper (and https://github.com/jkbrzt/httpie-http2)

@jkbrzt jkbrzt closed this as completed Mar 29, 2016
@guoxiao
Copy link

guoxiao commented Jul 7, 2016

If this issue still exists, should we keep it open rather than closing it?

@thomasleveil
Copy link

Installing hyper from the HEAD of their master branch fix this issue as explained on python-hyper/hyper#340 (comment)

pip install -U git+https://github.com/Lukasa/hyper.git

@Fuxy22
Copy link

Fuxy22 commented Jun 26, 2019

This is still broken for me if i use the latest httpie-http2 with httpie from pip. Works just fine if i only use httpie alone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants