[OE-core] python3-native certificate failure

Khem Raj raj.khem at gmail.com
Thu Apr 5 00:29:00 UTC 2018


On 4/4/18 1:09 PM, Tom Hochstein wrote:
> I am trying to download a URL from a source package using
> python3-native, but it is failing with a certificate failure. I added
> DEPENDS on ca-certificates-native and python3-certifi-native, but it
> doesn’t seem to help. A colleague with a corresponding SDK took the
> aarch64 sysroot certificates and dropped them in x86_64 sysroot and the
> problem was fixed.
> 
>  

you might try adding nativesdk-ca-certificates to TOOLCHAIN_HOST_TASK
and regenerate SDK

> 
> Tom
> 
>  
> 
> r60874 at tx30imx-01:~/rocko/build-xwayland$ bitbake imx-gpu-sdk -c devshell
> 
> root at tx30imx-01:~/rocko/build-xwayland/tmp/work/aarch64-mx8qm-poky-linux/imx-gpu-sdk/5.0.2-r0/git#
> python3
> 
> Python 3.5.3 (default, Mar  6 2018, 14:15:44)
> 
> [GCC 5.4.0 20160609] on linux
> 
> Type "help", "copyright", "credits" or "license" for more information.
> 
>>>> import urllib.request
> 
>>>>
> urllib.request.urlretrieve("https://sourceforge.net/projects/tclap/files/tclap-1.2.2.tar.gz",
> "~")
> 
> Traceback (most recent call last):
> 
>   File
> "/home/r60874/rocko/build-xwayland/tmp/work/aarch64-mx8qm-poky-linux/imx-gpu-sdk/5.0.2-r0/recipe-sysroot-native/usr/lib/python3.5/urllib/request.py",
> line 1254, in do_open
> 
>     h.request(req.get_method(), req.selector, req.data, headers)
> 
>   File
> "/home/r60874/rocko/build-xwayland/tmp/work/aarch64-mx8qm-poky-linux/imx-gpu-sdk/5.0.2-r0/recipe-sysroot-native/usr/lib/python3.5/http/client.py",
> line 1107, in request
> 
>     self._send_request(method, url, body, headers)
> 
>   File
> "/home/r60874/rocko/build-xwayland/tmp/work/aarch64-mx8qm-poky-linux/imx-gpu-sdk/5.0.2-r0/recipe-sysroot-native/usr/lib/python3.5/http/client.py",
> line 1152, in _send_request
> 
>     self.endheaders(body)
> 
>   File
> "/home/r60874/rocko/build-xwayland/tmp/work/aarch64-mx8qm-poky-linux/imx-gpu-sdk/5.0.2-r0/recipe-sysroot-native/usr/lib/python3.5/http/client.py",
> line 1103, in endheaders
> 
>     self._send_output(message_body)
> 
>   File
> "/home/r60874/rocko/build-xwayland/tmp/work/aarch64-mx8qm-poky-linux/imx-gpu-sdk/5.0.2-r0/recipe-sysroot-native/usr/lib/python3.5/http/client.py",
> line 934, in _send_output
> 
>     self.send(msg)
> 
>   File
> "/home/r60874/rocko/build-xwayland/tmp/work/aarch64-mx8qm-poky-linux/imx-gpu-sdk/5.0.2-r0/recipe-sysroot-native/usr/lib/python3.5/http/client.py",
> line 877, in send
> 
>     self.connect()
> 
>   File
> "/home/r60874/rocko/build-xwayland/tmp/work/aarch64-mx8qm-poky-linux/imx-gpu-sdk/5.0.2-r0/recipe-sysroot-native/usr/lib/python3.5/http/client.py",
> line 1261, in connect
> 
>     server_hostname=server_hostname)
> 
>   File
> "/home/r60874/rocko/build-xwayland/tmp/work/aarch64-mx8qm-poky-linux/imx-gpu-sdk/5.0.2-r0/recipe-sysroot-native/usr/lib/python3.5/ssl.py",
> line 385, in wrap_socket
> 
>     _context=self)
> 
>   File
> "/home/r60874/rocko/build-xwayland/tmp/work/aarch64-mx8qm-poky-linux/imx-gpu-sdk/5.0.2-r0/recipe-sysroot-native/usr/lib/python3.5/ssl.py",
> line 760, in __init__
> 
>     self.do_handshake()
> 
>   File
> "/home/r60874/rocko/build-xwayland/tmp/work/aarch64-mx8qm-poky-linux/imx-gpu-sdk/5.0.2-r0/recipe-sysroot-native/usr/lib/python3.5/ssl.py",
> line 996, in do_handshake
> 
>     self._sslobj.do_handshake()
> 
>   File
> "/home/r60874/rocko/build-xwayland/tmp/work/aarch64-mx8qm-poky-linux/imx-gpu-sdk/5.0.2-r0/recipe-sysroot-native/usr/lib/python3.5/ssl.py",
> line 641, in do_handshake
> 
>     self._sslobj.do_handshake()
> 
> ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed
> (_ssl.c:720)
> 
>  
> 
> During handling of the above exception, another exception occurred:
> 
>  
> 
> Traceback (most recent call last):
> 
>   File "<stdin>", line 1, in <module>
> 
>   File
> "/home/r60874/rocko/build-xwayland/tmp/work/aarch64-mx8qm-poky-linux/imx-gpu-sdk/5.0.2-r0/recipe-sysroot-native/usr/lib/python3.5/urllib/request.py",
> line 188, in urlretrieve
> 
>     with contextlib.closing(urlopen(url, data)) as fp:
> 
>   File
> "/home/r60874/rocko/build-xwayland/tmp/work/aarch64-mx8qm-poky-linux/imx-gpu-sdk/5.0.2-r0/recipe-sysroot-native/usr/lib/python3.5/urllib/request.py",
> line 163, in urlopen
> 
>     return opener.open(url, data, timeout)
> 
>   File
> "/home/r60874/rocko/build-xwayland/tmp/work/aarch64-mx8qm-poky-linux/imx-gpu-sdk/5.0.2-r0/recipe-sysroot-native/usr/lib/python3.5/urllib/request.py",
> line 466, in open
> 
>     response = self._open(req, data)
> 
>   File
> "/home/r60874/rocko/build-xwayland/tmp/work/aarch64-mx8qm-poky-linux/imx-gpu-sdk/5.0.2-r0/recipe-sysroot-native/usr/lib/python3.5/urllib/request.py",
> line 484, in _open
> 
>     '_open', req)
> 
>   File
> "/home/r60874/rocko/build-xwayland/tmp/work/aarch64-mx8qm-poky-linux/imx-gpu-sdk/5.0.2-r0/recipe-sysroot-native/usr/lib/python3.5/urllib/request.py",
> line 444, in _call_chain
> 
>     result = func(*args)
> 
>   File
> "/home/r60874/rocko/build-xwayland/tmp/work/aarch64-mx8qm-poky-linux/imx-gpu-sdk/5.0.2-r0/recipe-sysroot-native/usr/lib/python3.5/urllib/request.py",
> line 1297, in https_open
> 
>     context=self._context, check_hostname=self._check_hostname)
> 
>   File
> "/home/r60874/rocko/build-xwayland/tmp/work/aarch64-mx8qm-poky-linux/imx-gpu-sdk/5.0.2-r0/recipe-sysroot-native/usr/lib/python3.5/urllib/request.py",
> line 1256, in do_open
> 
>     raise URLError(err)
> 
> urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED]
> certificate verify failed (_ssl.c:720)>
> 
> 




More information about the Openembedded-core mailing list