[OE-core] python3-native certificate failure

Tom Hochstein tom.hochstein at nxp.com
Thu Apr 19 12:11:18 UTC 2018


Thanks, Ross. That is indeed what we are doing now.

Tom

-----Original Message-----
From: Burton, Ross [mailto:ross.burton at intel.com] 
Sent: Thursday, April 19, 2018 5:36 AM
To: Tom Hochstein <tom.hochstein at nxp.com>
Cc: openembedded-core at lists.openembedded.org
Subject: Re: [OE-core] python3-native certificate failure

Why don't you just use the host Python?

This is probably due to the certificate path not being correctly remapped as it goes in/out of sstate, you'll have to tell the SSL code explicitly where to find the certificates.

Ross

On 4 April 2018 at 21:09, Tom Hochstein <tom.hochstein at nxp.com> 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.
>
>
>
> 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-lin
> ux/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://emea01.safelinks.protection.out
>>>> look.com/?url=https%3A%2F%2Fsourceforge.net%2Fprojects%2Ftclap%2Ffi
>>>> les%2Ftclap-1.2.2.tar.gz&data=02%7C01%7Ctom.hochstein%40nxp.com%7C7
>>>> 096802f05364674162908d5a5e161a0%7C686ea1d3bc2b4c6fa92cd99c5c301635%
>>>> 7C0%7C0%7C636597309792188874&sdata=sM3F9XsfnAyJALQv3zOjm4fOiLiV6DuY
>>>> jCg%2FOoD9GHM%3D&reserved=0",
>>>> "~")
>
> Traceback (most recent call last):
>
>   File
> "/home/r60874/rocko/build-xwayland/tmp/work/aarch64-mx8qm-poky-linux/i
> mx-gpu-sdk/5.0.2-r0/recipe-sysroot-native/usr/lib/python3.5/urllib/req
> uest.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/i
> mx-gpu-sdk/5.0.2-r0/recipe-sysroot-native/usr/lib/python3.5/http/clien
> t.py",
> line 1107, in request
>
>     self._send_request(method, url, body, headers)
>
>   File
> "/home/r60874/rocko/build-xwayland/tmp/work/aarch64-mx8qm-poky-linux/i
> mx-gpu-sdk/5.0.2-r0/recipe-sysroot-native/usr/lib/python3.5/http/clien
> t.py",
> line 1152, in _send_request
>
>     self.endheaders(body)
>
>   File
> "/home/r60874/rocko/build-xwayland/tmp/work/aarch64-mx8qm-poky-linux/i
> mx-gpu-sdk/5.0.2-r0/recipe-sysroot-native/usr/lib/python3.5/http/clien
> t.py",
> line 1103, in endheaders
>
>     self._send_output(message_body)
>
>   File
> "/home/r60874/rocko/build-xwayland/tmp/work/aarch64-mx8qm-poky-linux/i
> mx-gpu-sdk/5.0.2-r0/recipe-sysroot-native/usr/lib/python3.5/http/clien
> t.py",
> line 934, in _send_output
>
>     self.send(msg)
>
>   File
> "/home/r60874/rocko/build-xwayland/tmp/work/aarch64-mx8qm-poky-linux/i
> mx-gpu-sdk/5.0.2-r0/recipe-sysroot-native/usr/lib/python3.5/http/clien
> t.py",
> line 877, in send
>
>     self.connect()
>
>   File
> "/home/r60874/rocko/build-xwayland/tmp/work/aarch64-mx8qm-poky-linux/i
> mx-gpu-sdk/5.0.2-r0/recipe-sysroot-native/usr/lib/python3.5/http/clien
> t.py",
> line 1261, in connect
>
>     server_hostname=server_hostname)
>
>   File
> "/home/r60874/rocko/build-xwayland/tmp/work/aarch64-mx8qm-poky-linux/i
> mx-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/i
> mx-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/i
> mx-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/i
> mx-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/i
> mx-gpu-sdk/5.0.2-r0/recipe-sysroot-native/usr/lib/python3.5/urllib/req
> uest.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/i
> mx-gpu-sdk/5.0.2-r0/recipe-sysroot-native/usr/lib/python3.5/urllib/req
> uest.py",
> line 163, in urlopen
>
>     return opener.open(url, data, timeout)
>
>   File
> "/home/r60874/rocko/build-xwayland/tmp/work/aarch64-mx8qm-poky-linux/i
> mx-gpu-sdk/5.0.2-r0/recipe-sysroot-native/usr/lib/python3.5/urllib/req
> uest.py",
> line 466, in open
>
>     response = self._open(req, data)
>
>   File
> "/home/r60874/rocko/build-xwayland/tmp/work/aarch64-mx8qm-poky-linux/i
> mx-gpu-sdk/5.0.2-r0/recipe-sysroot-native/usr/lib/python3.5/urllib/req
> uest.py",
> line 484, in _open
>
>     '_open', req)
>
>   File
> "/home/r60874/rocko/build-xwayland/tmp/work/aarch64-mx8qm-poky-linux/i
> mx-gpu-sdk/5.0.2-r0/recipe-sysroot-native/usr/lib/python3.5/urllib/req
> uest.py",
> line 444, in _call_chain
>
>     result = func(*args)
>
>   File
> "/home/r60874/rocko/build-xwayland/tmp/work/aarch64-mx8qm-poky-linux/i
> mx-gpu-sdk/5.0.2-r0/recipe-sysroot-native/usr/lib/python3.5/urllib/req
> uest.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/i
> mx-gpu-sdk/5.0.2-r0/recipe-sysroot-native/usr/lib/python3.5/urllib/req
> uest.py",
> line 1256, in do_open
>
>     raise URLError(err)
>
> urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] 
> certificate verify failed (_ssl.c:720)>
>
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Flist
> s.openembedded.org%2Fmailman%2Flistinfo%2Fopenembedded-core&data=02%7C01%7Ctom.hochstein%40nxp.com%7C7096802f05364674162908d5a5e161a0%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636597309792188874&sdata=MS1z%2FNo4umupW2EBfoZCzuIwUjcgfyPR8T0yrZ0UmWk%3D&reserved=0
>


More information about the Openembedded-core mailing list