Closed Bigshorting closed 11 months ago
these code have errors: Failed to load OpenSSL legacy provider
Failed to load OpenSSL legacy provider
#include "Poco/Net/HTTPRequest.h" #include "Poco/Net/HTTPResponse.h" #include "Poco/Net/WebSocket.h" #include "Poco/Net/HTTPSClientSession.h" #include "Poco/URI.h" using Poco::Net::HTTPSClientSession; using Poco::Net::HTTPRequest; using Poco::Net::HTTPResponse; using Poco::Net::HTTPMessage; using Poco::Net::WebSocket; int main() { Poco::URI uri("wss://wspap.okx.com:8443/ws/v5/business?brokerId=9999"); Poco::Net::HTTPSClientSession session(uri.getHost(), uri.getPort()); Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_GET, uri.getPathAndQuery(), Poco::Net::HTTPRequest::HTTP_1_1); Poco::Net::HTTPResponse response; Poco::Net::WebSocket ws(session, request, response); ws.close(); return 0; }
and i am using
[requires] boost/1.83.0 libcurl/8.2.1 openssl/3.1.2 poco/1.12.4 magic_enum/0.9.3 [tool_requires] cmake/3.27.4 [generators] CMakeDeps CMakeToolchain
https://github.com/pocoproject/poco/issues/4077
these code have errors:
Failed to load OpenSSL legacy provider
and i am using