Giter Club home page Giter Club logo

Comments (3)

fafhrd91 avatar fafhrd91 commented on June 30, 2024

you probably miss root certs

from ntex.

jm-observer avatar jm-observer commented on June 30, 2024

please see my code, i had set SslVerifyMode = SslVerifyMode:NONE, So it doesn't need a ca file. In fact, I also tested async-native-tls and tokio-native-tls and they both connect correctly

builder.set_verify(ssl::SslVerifyMode::NONE);

from ntex.

fafhrd91 avatar fafhrd91 commented on June 30, 2024

works for me

[2022-12-08 09:36:35.688][main] TRACE [ntex_connect::resolve:37] DNS resolver: resolving host "google.com"
[2022-12-08 09:36:35.693][main] TRACE [ntex_connect::resolve:57] DNS resolver: host "google.com" resolved to [64.233.161.102:443, 64.233.161.138:443, 64.233.161.100:443, 64.233.161.139:443, 64.233.161.113:443, 64.233.161.101:443]
[2022-12-08 09:36:35.694][main] TRACE [ntex_connect::service:163] TCP connector - connecting to "google.com" port:443
[2022-12-08 09:36:35.694][main] TRACE [mio::poll:532] registering event source with poller: token=Token(0), interests=READABLE | WRITABLE
[2022-12-08 09:36:35.829][main] TRACE [ntex_connect::service:210] TCP connector - successfully connected to connecting to "google.com" - Some(64.233.161.102:443)
[2022-12-08 09:36:35.829][main] TRACE [ntex_connect::openssl:56] SSL Handshake start for: "google.com"
[2022-12-08 09:36:35.830][main] TRACE [ntex_tokio::io:347] flushed 517 bytes
[2022-12-08 09:36:35.964][main] TRACE [ntex_io::tasks:57] new 1 bytes available, wakeup dispatcher
[2022-12-08 09:36:35.964][main] TRACE [ntex_tokio::io:347] flushed 80 bytes
[2022-12-08 09:36:35.964][main] TRACE [ntex_connect::openssl:66] SSL Handshake success: "google.com"
Connected to ssl server
[2022-12-08 09:36:35.965][main] TRACE [ntex_tokio::io:347] flushed 104 bytes
Send result: ()
[2022-12-08 09:36:35.965][main] TRACE [ntex_io::io:531] waking up io read task
[2022-12-08 09:36:35.965][main] TRACE [ntex_io::io:571] not enough data to decode next frame
[2022-12-08 09:36:36.217][main] TRACE [ntex_io::io:571] not enough data to decode next frame
[2022-12-08 09:36:36.217][main] TRACE [ntex_tokio::io:83] tokio stream is disconnected
[2022-12-08 09:36:36.218][main] TRACE [ntex_io::tasks:57] new 927 bytes available, wakeup dispatcher
[2022-12-08 09:36:36.219][main] TRACE [ntex_tokio::io:204] write task is instructed to terminate
[2022-12-08 09:36:36.223][main] TRACE [mio::poll:663] deregistering event source from poller
Received: b"HTTP/1.1 301 Moved Permanently\r\nLocation: https://www.google.com/\r\nContent-Type: text/html; charset=UTF-8\r\nCross-Origin-Opener-Policy-Report-Only: same-origin-allow-popups; report-to=\"gws\"\r\nReport-To: {\"group\":\"gws\",\"max_age\":2592000,\"endpoints\":[{\"url\":\"https://csp.withgoogle.com/csp/report-to/gws/other\"}]}\r\nDate: Thu, 08 Dec 2022 08:36:36 GMT\r\nExpires: Sat, 07 Jan 2023 08:36:36 GMT\r\nCache-Control: public, max-age=2592000\r\nServer: gws\r\nContent-Length: 220\r\nX-XSS-Protection: 0\r\nX-Frame-Options: SAMEORIGIN\r\nAlt-Svc: h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"\r\nConnection: close\r\n\r\n<HTML><HEAD><meta http-equiv=\"content-type\" content=\"text/html;charset=utf-8\">\n<TITLE>301 Moved</TITLE></HEAD><BODY>\n<H1>301 Moved</H1>\nThe document has moved\n<A HREF=\"https://www.google.com/\">here</A>.\r\n</BODY></HTML>\r\n"
disconnecting
[2022-12-08 09:36:36.224][main] TRACE [ntex_io::io:706] io is dropped, force stopping io streams IO_STOPPED | IO_STOPPING | IO_STOPPING_FILTERS | RD_READY
[2022-12-08 09:36:36.224][main] TRACE [ntex_io::ioref:62] force close io stream object

from ntex.

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.