Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Bookmark
- Permalink
- Email to a Friend
- Report Inappropriate Content
To keep things simple I'd like to disable the certificate verification when connectiing via HTTPs:
s = NaServer("##.##.##.##", 1 , 31)
s.set_server_type("FILER")
s.set_transport_type("HTTPS")
s.set_port(443)
s.set_style("LOGIN")
print(s.is_server_cert_verification_enabled())
s.set_admin_user("admin", "####")
s.is_server_cert_verification_enabled() is False by default
but I still get this error:
<results status="failed" reason="[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600)" errno="13001"></results>
Solved! See The Solution
2 REPLIES 2
- Bookmark
- Permalink
- Email to a Friend
- Report Inappropriate Content
I found this solution, insert this code at the beginning of your source file:
import ssl
try:
_create_unverified_https_context = ssl._create_unverified_context
except AttributeError:
# Legacy Python that doesn't verify HTTPS certificates by default
pass
else:
# Handle target environment that doesn't support HTTPS verification
ssl._create_default_https_context = _create_unverified_https_context
- Bookmark
- Permalink
- Email to a Friend
- Report Inappropriate Content
Thank you. It's helps me a lot.