<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Python HTTPS connection in Software Development Kit (SDK) and API Discussions</title>
    <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Python-HTTPS-connection/m-p/117826#M1885</link>
    <description>&lt;P&gt;Have you tried&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;import ssl&lt;BR /&gt;ssl._create_default_https_context = ssl._create_unverified_context&lt;/PRE&gt;&lt;P&gt;to disable certificate&amp;nbsp;verification?&lt;/P&gt;</description>
    <pubDate>Fri, 01 Apr 2016 07:41:44 GMT</pubDate>
    <dc:creator>acjackson</dc:creator>
    <dc:date>2016-04-01T07:41:44Z</dc:date>
    <item>
      <title>Python HTTPS connection</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Python-HTTPS-connection/m-p/117802#M1884</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am having some issues to work with the python API to connect to the controllers. So far I was connecting using a cluster account. I am using Python 3.4 on a CENTOS 7.2 server using 5.4P1 MNSDK.&amp;nbsp;&lt;/P&gt;&lt;P&gt;While opening a HTTPS connection I get:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Traceback (most recent call last):&lt;BR /&gt;File "netappops.py", line 304, in &amp;lt;module&amp;gt;&lt;BR /&gt;a.GetSnapshotsList()&lt;BR /&gt;File "netappops.py", line 275, in GetSnapshotsList&lt;BR /&gt;raise StorageException("query failed: reason %s error number: %s ", resp.results_reason(),resp.results_errno())&lt;BR /&gt;__main__.StorageException: ('query failed: reason %s error number: %s ', '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600)', 13001)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On the controllers I have a self-signed certificate. This error is despite I dont want to do an host or server verification: NaServer methods:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;def is_server_cert_verification_enabled(self):&lt;/P&gt;&lt;P&gt;def is_hostname_verification_enabled(self):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;return false.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have solved the first problem adding the selfsigned certificate to my CA chain.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I try to connect to the vserver management IP, and I get:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Traceback (most recent call last):&lt;BR /&gt;File "netappops.py", line 306, in &amp;lt;module&amp;gt;&lt;BR /&gt;a.GetSnapshotsList()&lt;BR /&gt;File "netappops.py", line 274, in GetSnapshotsList&lt;BR /&gt;resp=self.server_zapi.invoke("snapshot-list-info", "volume", self.volume["name"])&lt;BR /&gt;File "/ORA/dbs01/work/storage-api/lib/python/NetApp/NaServer.py", line 542, in invoke&lt;BR /&gt;return self.invoke_elem(xi)&lt;BR /&gt;File "/ORA/dbs01/work/storage-api/lib/python/NetApp/NaServer.py", line 482, in invoke_elem&lt;BR /&gt;connection.endheaders()&lt;BR /&gt;File "/usr/lib64/python3.4/http/client.py", line 1084, in endheaders&lt;BR /&gt;self._send_output(message_body)&lt;BR /&gt;File "/usr/lib64/python3.4/http/client.py", line 922, in _send_output&lt;BR /&gt;self.send(msg)&lt;BR /&gt;File "/usr/lib64/python3.4/http/client.py", line 857, in send&lt;BR /&gt;self.connect()&lt;BR /&gt;File "/usr/lib64/python3.4/http/client.py", line 1231, in connect&lt;BR /&gt;server_hostname=server_hostname)&lt;BR /&gt;File "/usr/lib64/python3.4/ssl.py", line 365, in wrap_socket&lt;BR /&gt;_context=self)&lt;BR /&gt;File "/usr/lib64/python3.4/ssl.py", line 583, in __init__&lt;BR /&gt;self.do_handshake()&lt;BR /&gt;File "/usr/lib64/python3.4/ssl.py", line 818, in do_handshake&lt;BR /&gt;match_hostname(self.getpeercert(), self.server_hostname)&lt;BR /&gt;File "/usr/lib64/python3.4/ssl.py", line 289, in match_hostname&lt;BR /&gt;% (hostname, dnsnames[0]))&lt;BR /&gt;ssl.CertificateError: hostname 'dbnasc501-mgmt02.cern.ch' doesn't match 'vs2sx50'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Again I dont want to do any SSL verification. Is no otherway that to create a certificate (and DNS entry) with the vs2sx50 (this is my vserver name) on it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 21:35:48 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Python-HTTPS-connection/m-p/117802#M1884</guid>
      <dc:creator>gasparuben</dc:creator>
      <dc:date>2025-06-04T21:35:48Z</dc:date>
    </item>
    <item>
      <title>Re: Python HTTPS connection</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Python-HTTPS-connection/m-p/117826#M1885</link>
      <description>&lt;P&gt;Have you tried&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;import ssl&lt;BR /&gt;ssl._create_default_https_context = ssl._create_unverified_context&lt;/PRE&gt;&lt;P&gt;to disable certificate&amp;nbsp;verification?&lt;/P&gt;</description>
      <pubDate>Fri, 01 Apr 2016 07:41:44 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Python-HTTPS-connection/m-p/117826#M1885</guid>
      <dc:creator>acjackson</dc:creator>
      <dc:date>2016-04-01T07:41:44Z</dc:date>
    </item>
    <item>
      <title>Re: Python HTTPS connection</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Python-HTTPS-connection/m-p/117839#M1886</link>
      <description>&lt;P&gt;Thank you! Indeed this solves the issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Apr 2016 09:50:53 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Python-HTTPS-connection/m-p/117839#M1886</guid>
      <dc:creator>gasparuben</dc:creator>
      <dc:date>2016-04-01T09:50:53Z</dc:date>
    </item>
  </channel>
</rss>

