Score:0

SSLCertVerificationError with python3 on ubuntu 18

bt flag
Nkh

I have been running python3 and I have a self signed certificate which i have installed into

sudo cp /opt/nkh//olccert.pem /usr/local/share/ca-certificates
sudo update-ca-certificates

I can see the certificate under /etc/ssl/certs/ca-certificates.crt

When in run python test. I encounter

import requests

headers = {

    "Authorization": "Bearer {}".format(aad_token),

}


resp = requests.get(

    url="https://test.cars.net//carsdelta/&resource=filesystem&recursive=false",
    headers=headers
)

---------------------------------------------
SSLCertVerificationError                  Traceback (most recent call last)
~/lib/python3.8/site-packages/urllib3/connectionpool.py in urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw)
    702             # Make the request on the httplib connection object.
--> 703             httplib_response = self._make_request(
    704                 conn,

How do I install my certificate so that python can consume it ?

guiverc avatar
cn flag
18? So you're asking about doing this on Ubuntu Core 18 and not Ubuntu 18.04 LTS. (18 & 18.04 are different Ubuntu products)
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.