curl编译:点击跳转
踩坑一
* SSL certificate problem: unable to get local issuer certificate
* closing connection #0
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.se/docs/sslcerts.html
解决方法1:添加证书
https://curl.haxx.se/ca/cacert.pem //下载证书
export CURL_CA_BUNDLE=/gui/cacert.pem //设置环境变量
解决方法2:忽略 SSL 验证
./curl -k https://www.baidu.com
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
踩坑二
routines:tls_process_key_exchange:wrong signature length
原因:编译的openssl库是64位,设备是32位,导致编译后的libcrypto.so不对,报签名长度出错。解决办法,编译之前加上 setarch i386。
setarch i386 ./config no-asm shared no-async --prefix=$PWD/build --cross-compile-prefix=arm-linux-
觉得有帮助的话,打赏一下呗。。
需要商务合作(定制程序)的欢迎私信!!