Skip to content
New issue

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

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

Already on GitHub? # to your account

Wrong guard error checking result of verify_server_cert in ssl_start_client #72

Closed
Bascy opened this issue Apr 23, 2024 · 0 comments · Fixed by #73 or #76
Closed

Wrong guard error checking result of verify_server_cert in ssl_start_client #72

Bascy opened this issue Apr 23, 2024 · 0 comments · Fixed by #73 or #76

Comments

@Bascy
Copy link
Contributor

Bascy commented Apr 23, 2024

It looks like line 339 is testing on the wrong variable ret in stead if flags

// ssl__client.cpp
// starting at line 334 
// ....
ret = perform_ssl_handshake(ssl_client, cli_cert, cli_key); // Step 7 - Perform SSL/TLS handshake
if (ret != 0) {
    break;
}
int flags = verify_server_cert(ssl_client); // Step 8 - Verify the server certificate
if (ret != 0) {                                            // <====== Wrong guard??
  log_failed_cert(flags);
} else {
  log_v("Certificate verified.");
}
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant