本文的目的是介绍SSL不会被libwebsockets初始化:没有LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT的详细情况,特别关注没有使用ssl2.0的相关信息。我们将通过
本文的目的是介绍SSL 不会被 libwebsockets 初始化:没有 LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT的详细情况,特别关注没有使用ssl2.0的相关信息。我们将通过专业的研究、有关数据的分析等多种方式,为您呈现一个全面的了解SSL 不会被 libwebsockets 初始化:没有 LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT的机会,同时也不会遗漏关于c – 如何使用debug构建libwebsockets(即-g所以我可以使用gdb)? (我在libwebsockets函数上遇到段错误,ssl_ctrl())、Composer :SSL routines:SSL3_GET_SERVER_CERTIE、django.db.utils.OperationalError:(2026,'SSL连接错误:SSL_CTX_set_tmp_dh失败')、ELASTICSEARCH6 移除terms聚合中的 global_ordinals_hash 和 global_ordinals_low_cardinality,替代为global_ordinals的知识。
本文目录一览:- SSL 不会被 libwebsockets 初始化:没有 LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT(没有使用ssl2.0)
- c – 如何使用debug构建libwebsockets(即-g所以我可以使用gdb)? (我在libwebsockets函数上遇到段错误,ssl_ctrl())
- Composer :SSL routines:SSL3_GET_SERVER_CERTIE
- django.db.utils.OperationalError:(2026,'SSL连接错误:SSL_CTX_set_tmp_dh失败')
- ELASTICSEARCH6 移除terms聚合中的 global_ordinals_hash 和 global_ordinals_low_cardinality,替代为global_ordinals
SSL 不会被 libwebsockets 初始化:没有 LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT(没有使用ssl2.0)
如何解决SSL 不会被 libwebsockets 初始化:没有 LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT?
我使用运行 ue4 专用服务器的 linux cent os 8.3 在所有平台上都成功运行。
我的专用服务器使用新的驱动程序 libwebsockets 运行,因为该解决方案适用于任何平台(也包括网络)。
运行服务器后,我发现消息:
[2021/03/13 14:37:05:2941] NOTICE: SSL will not be initialized by libwebsockets: no LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT
[2021/03/13 14:37:05:2942] NOTICE: Creating Vhost ''default'' port 8889,1 protocols,IPv6 off
[2021/03/13 14:37:05:2942] NOTICE: Using non-SSL mode
我还发现最初 ssl 被禁用,这是正常的,但我现在需要使用它。
这对我来说并不简单,因为(我的主机是 windows10,我使用跨 linux 平台工具 - ue4)
我需要使用脚本
帮助文本:
summary
the build script will build:
- zlib
- OpenSSL
- libcurl
- libwebsockets
- webRTC
- windows:
o Visual Studio (2013 & 2015)
o CMake
o Git for Windows (can be install with minimal "Use Git Bash only")
----------------------------------------------------------------------
TO RUN THE BUILD
----------------------------------------------------------------------
- NOTE: OpenSSL will NOT build if the path contains a space in the path
- that said,this script builds "stand-alone"
- in other words,you can do something like this
(windows devs,remember to use git bash):
mkdir -p /isolated
cp BUILD.EPIC.sh copY.EPIC.sh /isolated/.
cd /isolated
./BUILD.EPIC.sh
我目前的 Visual Studio 2019 我还安装了 Visual Studio 2015
在我尝试之后我得到了:
$ ./BUILD.EPIC.sh
+ ZLIB_VERSION=v1.2.8
+ SSL_VERSION=OpenSSL_1_1_1c
+ CURL_VERSION=curl-7_65_3
+ WEBRTC_HASH=f2eae333a2e42d20e92e7606bfca087fddcaaaa0
+ BUILD_WEBRTC=true
+ true
+ USE_VS_2013=false
+ UE4_BUILD_WIN32=false
+ configure_platform
++ uname
+ SYstem=MINGW64_NT-10.0-19042
++ uname -m
+ MACHINE=x86_64
+ case $SYstem in
+ false
+ WINTARGET=64
+ false
+ PLATFORM=Win64/VS2015
+ build_environment
+ CMAKE_GEN=''Unix Makefiles''
+ CMAKE=cmake
+ case $SYstem in
+ false
+ VC=14
+ VS=2015
+ VSCT=''C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\''
+ X64=amd64
+ false
+ MACHINE=amd64
+ CMAKE_GEN=''Visual Studio 14 2015 Win64''
+ VCVARSALL=''"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\..\..\VC\vcvarsall.bat" amd64''
+ CMAKE=''C:\Program Files (x86)\CMake\bin\cmake.exe''
++ cygpath -w /isolated
+ NINJA_PATH=''C:\Program Files\Git\isolated''
+ NINJA=ninja.exe
+ get_google_depot_tools
+ path_google_depot_tools
+ ''['' X == X '']''
+ case $SYstem in
+ false
++ pwd
++ sed -e ''s!^\(/.\).*!\1!''
+ GOOGLE_SHORTY=/i/googVS2015
+ WEBRTC_HASH_HACK=f2eae333a2e42d20e92e7606bfca087fddcaaaa0
+ NINJA_JOBS=
+ GOOGLE_DEPOT_TOOLS=/i/googVS2015/depot_tools
++ cygpath -w /i/googVS2015/depot_tools
+ DOS_GOOGLE_DEPOT_TOOLS=''I:\googVS2015\depot_tools''
+ case $SYstem in
+ ''['' ''!'' -d ''/c/Program Files (x86)/Windows Kits/10/Source/10.0.10586.0'' '']''
+ cat
!!! MANUAL SETUP required !!!
!!! MANUAL SETUP required !!!
install VisualStudio 2015 Update2
follow step #2 at:
https://chromium.googlesource.com/chromium/src/+/master/docs/windows_build_instructions.md
(no need to do step 1 - this build script will do that)
exiting script...
!!! MANUAL SETUP required !!!
!!! MANUAL SETUP required !!!
+ exit
是否可以只构建 libwebscokets 而没有 openSSl 和 cuurl ?
Visual Studio 安装程序不再支持 less ver vsvars32.bat 没有帮助。
我只需要用我已经存在的域 ssl 来激活 ssl 让加密....
我在 ue4 源中找不到 DLWS_WITH_SSL
./ThirdParty/
即使我成功构建,我仍然有相同的配置。
有什么建议吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)
c – 如何使用debug构建libwebsockets(即-g所以我可以使用gdb)? (我在libwebsockets函数上遇到段错误,ssl_ctrl())
网站可以在这里找到:http://libwebsockets.org/trac/libwebsockets
我的问题是,如果我为libwebsocket_client_connect()函数的ssl_connection参数传入1或2,我会得到一个段错误.
我的代码用c写的.
想要找出它发生的位置,我在gdb中运行了我的代码(在添加了-g标志之后).在segfault之后,我跑了回溯.这就是我得到的:
来自/lib/x86_64-linux-gnu/libssl.so.1.0.0的SSL_ctrl()中的0x00007ffff7748c43
(gdb)回溯
来自/lib/x86_64-linux-gnu/libssl.so.1.0.0的SSL_ctrl()中的0 0x00007ffff7748c43
来自/usr/local/lib/libwebsockets.so.5.0.0的lws_client_socket_service()中的1 0x00007ffff7503aa2
来自/usr/local/lib/libwebsockets.so.5.0.0的libwebsocket_service_fd()中的2 0x00007ffff74fe606
来自/usr/local/lib/libwebsockets.so.5.0.0的libwebsocket_client_connect_2()中的3 0x00007ffff7504029
来自/usr/local/lib/libwebsockets.so.5.0.0的lws_client_socket_service()中的4 0x00007ffff75037d5
来自/usr/local/lib/libwebsockets.so.5.0.0的libwebsocket_service_fd()中的5 0x00007ffff74fe606
来自/usr/local/lib/libwebsockets.so.5.0.0的lws_plat_service()中的6 0x00007ffff7505980
还有更多,但相关信息高于……
如上所示,segfault发生在SSL_ctrl()函数中.
如果有人从libwebsockets SSL_ctrl()函数获得了段错误并解决了它,请告诉我.
如果有人可以告诉我如何使用调试标志构建libwebsockets(使用make,cmake或其他方式)和/或使它以冗长的方式写入某个日志文件和/或使其成为可能,我可以使用gdb进入函数,我非常感谢!
解决方法
请确保删除所有早期版本的libwebsockets.h(使用-DCMAKE_BUILD_TYPE = DEBUG选项构建)并使用-DCMAKE_BUILD_TYPE = DEBUG参数进行干净构建.
在此之后启用调试时执行使用-d选项设置为日志级别
如果我的可执行文件是sock,那么在运行use时启用调试日志
./sock 127.0.0.1 -p 9000 -d 65535
这将产生类似的输出
[1449754712:6654] CLIENT: lws_client_connect: direct conn [1449754712:6654] CLIENT: lws_client_connect_2 [1449754712:6654] CLIENT: lws_client_connect_2: address 127.0.0.1 Reason :35 Reason :32 Reason :36 [1449754712:6655] CLIENT: nonblocking connect retry
Composer :SSL routines:SSL3_GET_SERVER_CERTIE
先试一试
wget http://curl.haxx.se/ca/cacert.pem
curl -sS https://getcomposer.org/installer | php -- --cafile=cacert.pem
安装的php,YII2.0框架,PHP版本高于5.4,调用这个命令的时候出问题了。
composer global require "fxp/composer-asset-plugin:1.0.0"
弹出这样的问题
-
Changed current directory to /home/litianci/.composer
-
./composer.json has been updated
-
Loading composer repositories with package information
-
The "https://packagist.org/packages.json" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
-
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
-
Failed to enable crypto
-
failed to open stream: operation failedhttps://packagist.org could not be fully loaded, package information was loaded from the local cache and may be out of dateUpdating dependencies (including require-dev)
-
Nothing to install or update
-
Generating autoload files
看问题是SSL的验证问题,网上搜索了很久没有解决.
下面是来自某被墙的网页的快照。没办法,贴网址也无效。
经过原因查找,在验证证书的时候出现问题,是本地ssl判别证书太旧,导致报ssl证书错误
解决方案一、
下载新的ssl本地判别文件
wget http://curl.haxx.se/ca/cacert.pem
并更名为ca-bundle.crt放置到默认目录。如果该目录不存在可以创建。
mv cacert.pem ca-bundle.crt | mv ca-bundle.crt /etc/pki/tls/certs/
或者curl –cacert cacert.pem 方式指定调用
然后无意中更改了一下xampp-linux-x64-5.6.8-0-installer.run为一个老的版本xampp-linux-x64-1.8.3-5-installer.run,竟然可以使用了,你不妨换换版本的。
我在deepin2014.3,64bit操作系统下测试成功解决该error.
解决方案二、[版本太老,不建议用]
借鉴 http://pkg.phpcomposer.com/ 。感谢分享。
修改~/.composer/config.json,添加
-
{
-
"repositories": [
-
{"type": "composer", "url": "http://pkg.phpcomposer.com/repo/packagist/"},
-
{"packagist": false}
-
]}
最终是这样子的。
-
{
-
"config": {
-
-
},
-
"repositories": [
-
{"type": "composer", "url": "http://pkg.phpcomposer.com/repo/packagist/"},
-
{"packagist": false}
-
]}
最终测试可以使用。
解决方案三[完美解决]
参考:https://github.com/composer/composer/issues/3346
First: Check certificate file location which will be in default_cert_file key, you will found it in openssl_get_cert_locations() its php openssl function:
找到验证文件在哪里?
这个发现在
/opt/lampp/share/openssl/cert.pem
-
$ php -r "print_r(openssl_get_cert_locations());"
-
Array
-
(
-
[default_cert_file] => /opt/lampp/share/openssl/cert.pem
-
[default_cert_file_env] => SSL_CERT_FILE
-
[default_cert_dir] => /opt/lampp/share/openssl/certs
-
[default_cert_dir_env] => SSL_CERT_DIR
-
[default_private_dir] => /opt/lampp/share/openssl/private
-
[default_default_cert_area] => /opt/lampp/share/openssl
-
[ini_cafile] =>
-
[ini_capath] =>
-
)
Second: Download http://curl.haxx.se/ca/cacert.pem:
$ wget http://curl.haxx.se/ca/cacert.pem
Third: Copy certificate PEM file into default_cert_file location:
$ sudo mv cacert.pem /opt/lampp/share/openssl/cert.pem
My php-cli is under XAMPP and default_cert_file maybe point to some place that is different than this.
Fourth:Restart xampp:
$ sudo /opt/lampp/xampp restart
I hope anything after that should goes fine with you brothers.
django.db.utils.OperationalError:(2026,'SSL连接错误:SSL_CTX_set_tmp_dh失败')
我是python和django的新手。运行时出现python manage.py runserver
此错误:
django.db.utils.OperationalError: (2026, ''SSL connection error: SSL_CTX_set_tmp_dh failed'')''mysql Server version: 8.0.13 MySQL Community Server - GPL.
我在网络上找不到此错误。
答案1
小编典典我得到了答案:’ https : //dev.mysql.com/doc/refman/5.7/en/data-directory-
initialization.html ‘
‘shell> bin / mysql_ssl_rsa_setup’
ELASTICSEARCH6 移除terms聚合中的 global_ordinals_hash 和 global_ordinals_low_cardinality,替代为global_ordinals
https://www.cnblogs.com/wanghaoxiang/p/9163588.html
ELASTICSEARCH6 移除了 terms聚合中的 global_ordinals_hash 和 global_ordinals_low_cardinality,替代为global_ordinals
今天关于SSL 不会被 libwebsockets 初始化:没有 LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT和没有使用ssl2.0的分享就到这里,希望大家有所收获,若想了解更多关于c – 如何使用debug构建libwebsockets(即-g所以我可以使用gdb)? (我在libwebsockets函数上遇到段错误,ssl_ctrl())、Composer :SSL routines:SSL3_GET_SERVER_CERTIE、django.db.utils.OperationalError:(2026,'SSL连接错误:SSL_CTX_set_tmp_dh失败')、ELASTICSEARCH6 移除terms聚合中的 global_ordinals_hash 和 global_ordinals_low_cardinality,替代为global_ordinals等相关知识,可以在本站进行查询。
本文标签: