Created
April 13, 2015 12:54
-
-
Save jpic/871140345948fdd418c5 to your computer and use it in GitHub Desktop.
Problem: curl: (51) SSL: unable to obtain common name from peer certificate
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
root@my-ci:/etc/ssl/certs# curl -k https://google.com | |
Hello, World! | |
root@my-ci:/etc/ssl/certs# curl https://google.com | |
curl: (51) SSL: unable to obtain common name from peer certificate |
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
-A PREROUTING -i lxcbr0 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8080 | |
-A PREROUTING -i lxcbr0 -p tcp -m tcp --dport 443 -j REDIRECT --to-ports 8443 |
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
debug = 3 | |
foreground = yes | |
pid = | |
[server] | |
client = no | |
cert= ./server.pem | |
accept = 0.0.0.0:8443 | |
connect = 127.0.0.1:8080 | |
# Run with `stunnel stunnel-mitm-proxy.conf` |
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
#!/usr/bin/env python | |
def app(environ, start_response): | |
"""Simplest possible application object""" | |
data = 'Hello, World!\n' | |
status = '200 OK' | |
response_headers = [ | |
('Content-type','text/plain'), | |
('Content-Length', str(len(data))) | |
] | |
start_response(status, response_headers) | |
return iter([data]) | |
# Run with `gunicorn wsgi:app -b 0.0.0.0:8080` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment