无法创建SSL client
shuqian2017 opened this issue · comments
启动服务端报错如下
root@armbian:/home/fke/smargate# ./proxy_server -i1000 -o1000 -w4
no environment-variable "SMS_HOME" define.
current search/work path: /home/fke/smargate/
Server config file is: /home/fke/smargate/conf-proxy.xml
[INFO] plugin path is:/home/fke/smargate/plugin/
[WARN] NOT-FOUND library in :/home/fke/smargate/plugin/
[WARN] load plugin module error.
[INFO] version of CORE: Linux ARC ARM64 v0.31.10
*****************************NO PLUGIN INFORMATION*****************************
[INFO] CPU BITS-ORDER is:LITTLE_ENDIAN
[INFO] CPU BYTE-ORDER is:LITTLE_ENDIAN
OpenSSL function:[SSL_get_peer_certificate] NOT-FOUND.
OpenSSL function:[SSL_get_peer_certificate] NOT-FOUND.
[2023-07-15 13:26:47] [ERROR] Error create SSL-Context[Client].
设备环境
- 安装服务端的设备armbian64系统的盒子
- 使用的服务端文件是
dynamic/linux_mini_arm64v0.31.10.tar
- 查询到设备的ssl版本为
libssl.so.3
和libcrypto.so.3
- 配置文件
conf-proxy.xml
里面也以及修改ssl的版本号
配置文件信息:
root@armbian:/home/fke/smargate# ldd $(which openssl)|grep -E "libssl|libcrypto"|awk '{print $1}'}'
libssl.so.3
libcrypto.so.3
<?xml version="1.0" encoding="GBK"?>
<app-config code="PROXY" name="proxy-server">
<app-parameter>
<ssl-tunnel-required value="first" /><!-- [ none | first | only ] ,none is default. this option set P2P tunnel by SSL or NOT -->
<ssl-create-certfile value="true" /><!-- [ true | false ],if set true sg-server try to create default cacertfiles while not setted, ps: openssl must be installed -->
<libssl value="libssl.so.3" /><!-- need replace. same as /lib/libssl.x or /lib64/libssl.x -->
<libcrypto value="libcrypto.so.3" /><!-- need replace. same as /lib/libcrypto.x or /lib64/libcrypto.x -->
</app-parameter>
<moudle-parameter>
<log-level value="LOG_ERROR"/>
<log-write-mode value="CONSOLE_ONLY"/>
<app-name value="home." /><!-- need replace -->
<app-description value="access to this machine by proxy." /><!-- need replace -->
<user-audit value="*******:1"/><!-- need replace and must is numeric-->
</moudle-parameter>
</app-config>
请大佬们看看是什么问题,感谢!
补充说明:
root@armbian:/home/fke/smargate# ldd proxy_server
linux-vdso.so.1 (0x0000007fae27e000)
libpthread.so.0 => /lib/aarch64-linux-gnu/libpthread.so.0 (0x0000007fae230000)
libdl.so.2 => /lib/aarch64-linux-gnu/libdl.so.2 (0x0000007fae210000)
libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000007fae060000)
/lib/ld-linux-aarch64.so.1 (0x0000007fae245000)
这是本地openssl库的问题,解决方案:
1、升级或重新安装openssl
2、可v我索取兼容版本(不支持证书校验)
# 新版本
fke@armbian:~/smargate$ openssl version
OpenSSL 3.1.1 30 May 2023 (Library: OpenSSL 3.1.1 30 May 2023)
# 旧版本
fke@armbian:~/smargate$ /usr/bin/openssl-bak version
OpenSSL 3.0.2 15 Mar 2022 (Library: OpenSSL 3.1.1 30 May 2023)
重新编译安装了新版本的openssl;启动服务端报错依然是Error create SSL-Context[Client]
.
请大佬有空再帮忙看看
```shell # 新版本 fke@armbian:~/smargate$ openssl version OpenSSL 3.1.1 30 May 2023 (Library: OpenSSL 3.1.1 30 May 2023)# 旧版本 fke@armbian:~/smargate$ /usr/bin/openssl-bak version OpenSSL 3.0.2 15 Mar 2022 (Library: OpenSSL 3.1.1 30 May 2023)重新编译安装了新版本的openssl;启动服务端报错依然是Error create SSL-Context[Client].
请大佬有空再帮忙看看
版本已更新,请重新下载测试。
版本已更新,请重新下载测试。
大佬,我看网盘和github上的文件都是15号的😂
版本已更新,请重新下载测试。
大佬,我看网盘和github上的文件都是15号的😂
没关系,只要确认比你本地版本时间戳要新就行
没关系,只要确认比你本地版本时间戳要新就行
踩坑:不要随便升级openssl版本
昨天升级完openssl,后面ssh连接不上。报错ssh Connection closed by foreign host
还好之前的openssl,以及libcrypto.so、libssl.so文件做过备份😂
解决方案: 回退了系统自带的openssl版本,然后下载15号的mini版本,smarGate已经正常
没关系,只要确认比你本地版本时间戳要新就行
踩坑:不要随便升级openssl版本
昨天升级完openssl,后面ssh连接不上。报错
ssh Connection closed by foreign host
还好之前的openssl,以及libcrypto.so、libssl.so文件做过备份😂解决方案: 回退了系统自带的openssl版本,然后下载15号的mini版本,smarGate已经正常
你没有同步升级openssh。
其实只需将新版本的libcrypto.so、libssl.so库,改名拷贝到lib下,然后配置到conf-proxy.xml配置文件中即可。
目前版本的库尽管sg能正常跑起来,但无法做双向证书验证,好在此功能使用的不多。
经过考虑认为阉割功能只为正常运行不妥。遂兼容最新openssl3.0
目前sg mini版本对openssl0.9~3.0全系版本兼容。如有需要请自行下载更新