Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSL mode not handshake happening #2894

Closed
EkbalCode opened this issue Jun 28, 2024 · 1 comment
Closed

SSL mode not handshake happening #2894

EkbalCode opened this issue Jun 28, 2024 · 1 comment

Comments

@EkbalCode
Copy link

I am using example/http/client/async-ssl/http_client_async_ssl.cpp

// The SSL context is required, and holds certificates
ssl::context ctx{ssl::context::tlsv12_client};

// This holds the root certificate used for verification
load_root_certificates(ctx);

// Verify the remote server's certificate
ctx.set_verify_mode(ssl::verify_peer);

This code execution not making handshake so in turn I am getting 404 status code .

Kindly help

@ashtum
Copy link
Collaborator

ashtum commented Jul 1, 2024

This code execution not making handshake.

The handshake happens in the following line. What is the error message on failure?

        // Perform the SSL handshake
        stream_.async_handshake(
            ssl::stream_base::client,
            beast::bind_front_handler(
                &session::on_handshake,
                shared_from_this()));

so in turn I am getting 404 status code .

Do you mean an HTTP 404 error? This shouldn't be related to the handshake process because if the connection fails to perform the handshake correctly, it can't make any request at all.

@ashtum ashtum closed this as completed Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants