pythonsslssl-certificatetls1.2certifi

Where to find certifi folder in ubuntu 18


I just installed a new Ubuntu 18 machine. I use python 3.6 and openssl 1.1.0g for a program. I installed package name certifi which is necessary for certificate validation in openssl with python (I previously encountered problems where python could not validate the server TLS certificate untill I downloaded this package and pasted a self-signed certificate for my internal server).

I used this command to install it:

/usr/local/lib/python3.6/dist-packages$ pip3 install certifi
Collecting certifi
  Downloading https://files.pythonhosted.org/packages/7c/e6/92ad559b7192d846975fc916b65f667c7b8c3a32bea7372340bfe9a15fa5/certifi-2018.4.16-py2.py3-none-any.whl (150kB)
    100% |████████████████████████████████| 153kB 1.4MB/s 
Installing collected packages: certifi
Successfully installed certifi-2018.4.16

I need to paste a files inside it for a trusted certificate of internal servers. In my previous machine (ubuntu 16.04) I pasted the self-signed certificates inside: /usr/local/lib/python3.6/dist-packages/certifi/ Now, I can not find certifi directory even though I installed the package. Where/how can I find it and do the same thing I was able to do it with ubuntu 16.04?


Solution

  • import certifi
    print(certifi.__file__)