GithubHelp home page GithubHelp logo

ssl about cinatra HOT 9 CLOSED

51bitquant avatar 51bitquant commented on August 16, 2024
ssl

from cinatra.

Comments (9)

qicosmos avatar qicosmos commented on August 16, 2024

应该是缺少证书文件,你直接把init_ssl 参数去掉试一下,直接init_ssl();

from cinatra.

51bitquant avatar 51bitquant commented on August 16, 2024
 client.init_ssl("../../include/cinatra", "server.crt");

这个server.crt 文件还是可以找到的,在项目中。

from cinatra.

qicosmos avatar qicosmos commented on August 16, 2024

你先把参数去掉试一下再说。

from cinatra.

51bitquant avatar 51bitquant commented on August 16, 2024

去掉参数提示: handle failed tlsv1 alert internal error (SSL routines)

from cinatra.

qicosmos avatar qicosmos commented on August 16, 2024

cmake 里把ENABLE_SSL 设置为ON

from cinatra.

51bitquant avatar 51bitquant commented on August 16, 2024

SET(ENABLE_GZIP ON)
SET(ENABLE_SSL ON)
SET(ENABLE_CLIENT_SSL ON)
这个之前已经设置好了,还是不行。

from cinatra.

qicosmos avatar qicosmos commented on August 16, 2024

你跑的是tests是吧,tests的话要tests 里面的cmakelists中的CINATRA_ENABLE_SSL 改成ON

先清理一下cmake

from cinatra.

qicosmos avatar qicosmos commented on August 16, 2024

我本地测试这个case 返回的是302重定向,是正常的。

from cinatra.

51bitquant avatar 51bitquant commented on August 16, 2024

int main() {
using namespace cinatra;
coro_http_client client{};
client.init_ssl("", "", asio::ssl::verify_peer, "connecting domain");
auto response = client.get("https://www.domain.com");
std::cout << response.status << std::endl;
std::cout << response.resp_body << std::endl;

return 0;

}

from cinatra.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.