【问题标题】:awscrt python module throwing 'undefined symbol: EVP_aead_aes_128_gcm_tls13' error in ARM yoctoawscrt python 模块在 ARM yocto 中抛出 \'undefined symbol: EVP_aead_aes_128_gcm_tls13\' 错误
【发布时间】:2022-09-23 13:23:29
【问题描述】:

我有一个自定义 ARM 网关,我正在尝试在其上运行 greengrass v2 组件。这需要 python awsiotsdk。但是当我导入 awsiotsdk 时,我收到了这个错误:

ImportError: /usr/lib/python3.7/site-packages/_awscrt.cpython-37m-arm-linux-gnueabi.so: undefined symbol: EVP_aead_aes_128_gcm_tls13

当我在具有相同 awsiotsdk 版本的 x86 环境中运行相同组件时,我没有收到错误消息。

这是我注意到的差异:

ARM 网关

bash-5.0# strings   /usr/lib/python3.7/site-packages/_awscrt.cpython-37m-arm-linux-gnueabi.so    | grep -i EVP_aead_aes_128_gcm_tls13
    EVP_aead_aes_128_gcm_tls13
    EVP_aead_aes_128_gcm_tls13
    EVP_aead_aes_128_gcm_tls13
    bash-5.0# 

X86 笔记本电脑

    bash-4.2# strings   /usr/local/lib64/python3.7/site-packages/_awscrt.cpython-37m-x86_64-linux-gnu.so    | grep -i EVP_aead_aes_128_gcm_tls13
    EVP_aead_aes_128_gcm_tls13
    EVP_aead_aes_128_gcm_tls13_storage
    EVP_aead_aes_128_gcm_tls13_once_bss_get
    EVP_aead_aes_128_gcm_tls13_storage_bss_get
    EVP_aead_aes_128_gcm_tls13_do_init
    EVP_aead_aes_128_gcm_tls13_init
    EVP_aead_aes_128_gcm_tls13_once
    EVP_aead_aes_128_gcm_tls13_init
    EVP_aead_aes_128_gcm_tls13_storage
    EVP_aead_aes_128_gcm_tls13_once
    EVP_aead_aes_128_gcm_tls13
    bash-4.2# 

顺便说一句,网关中的 awscrt 模块是在“pip install”步骤期间编译的。所以我想也许它与openssl有关?可能网关不支持 TLS1.3。但看起来网关确实支持 TLS1.3 。

bash-5.0# openssl version
OpenSSL 1.1.1g  21 Apr 2020
bash-5.0#

如何解决这个问题?

  • EVP_aead_aes_128_gcm_tls13 看起来像 OpenSSL,但实际上不是。 OpenSSL 定义了许多 EVP_* 函数,但这个函数并不存在。一些谷歌搜索表明这可能是一个 BoringSSL 的东西(BoringSSL 是 OpenSSL 的一个分支)
  • 那很奇怪。它看起来不像 awscrt 代码引用 EVP_aead_aes_128_gcm_tls13。也许在构建网关时引入了这种依赖关系。不确定如何确认。不要认为 yocto 操作系统很无聊

标签: python pip openssl aws-iot evp-cipher


【解决方案1】:

我可以确认像“EVP_aead_aes_128_gcm_tls13”这样的符号是“awscrt”python模块的一部分,它们是来自boringssl项目的taken

在我的情况下,从网关内部构建的“setup.py”不知何故未能包含此功能。但是,当我在笔记本电脑中使用 yocto 跨工具链构建 awscrt 时,它起作用了。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-10-10
    • 2023-02-15
    • 1970-01-01
    • 1970-01-01
    • 2018-05-07
    • 1970-01-01
    • 2017-03-02
    • 2012-06-24
    相关资源
    最近更新 更多