title: Python - [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1091)
body: <p>I have an Amazon linux 2 VM and I am making a python requests from this VM. For making the request I am using self signed certificate.</p>
  <p>I have appended the self signed certificate file content to the file &quot;/etc/pki/tls/certs/ca-bundle.crt&quot;.</p>
  <p>The CURL command works fine, however when making requests using python's requests method it throws below error.</p>
  <p>ERROR :  <em>(Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1091)'))</em></p>
  <p>I tried using &quot;verify&quot; parameter for Python requests method by providing path of both &quot;MyAppcert.crt&quot; as well as &quot;ca_bundle.crt&quot; files, however both approach fails.</p>
  <pre><code>import requests
  requests.get(&quot;https://&lt;my-endpoint&gt;:8888/&quot;, verify=&quot;/home/ec2-user/ssl_cert/MyAppcert.crt&quot;)
  </code></pre>
  <p>This same use case works fine on Windows server.</p>
  <p>Any help will be appreciated.</p>
  <p>Regards,</p>
  <p>Rahul Kumbhar</p>