How to disable only hostname verification
Summary. How to disable only hostname verification
Expected Result
Communicate via SSL/TSL connection without hostname verification only
What you expected. Disable hostname verification
Actual Result
Communicate via SSL/TSL connection without hostname verification only
What happened instead. Tried with Verify=False. But it disables entire certificate validation
Reproduction Steps
import requests
res = requests.get(<url>, headers=<headers>, timeout=30)
System Information
$ python -m requests.help
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.10"
},
"implementation": {
"name": "CPython",
"version": "3.8.6"
},
"platform": {
"release": "3.10.0-1160.53.1.el7.x86_64",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.25.0"
},
"system_ssl": {
"version": "100020bf"
},
"urllib3": {
"version": "1.26.9"
},
"using_pyopenssl": false
}
This command is only available on Requests v2.16.4 and greater. Otherwise, please provide some basic information about your system (Python version, operating system, &c).
Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use StackOverflow for general usage questions instead and only report defects here.