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

Clear OpenSSL error queue after SSL_shutdown #11736

Closed
wants to merge 1 commit into from

Commits on Aug 26, 2023

  1. Clear OpenSSL error queue after SSL_shutdown

    We've seen errors left in the OpenSSL error queue (specifically,
    "shutdown while in init") by adding some logging it revealed that the
    source was this file.
    
    Since we call SSL_read and SSL_shutdown here, but don't check the return
    code for an error, we should clear the OpenSSL error queue in case one
    was raised.
    
    This didn't affect curl because we call ERR_clear_error before every
    write operation (a0dd9df), but when
    libcurl is used in a process with other OpenSSL users, they may detect
    an OpenSSL error pushed by libcurl's SSL_shutdown as if it was their
    own.
    
    Co-authored-by: Satana de Sant'Ana <[email protected]>
    jhawthorn and pudiva committed Aug 26, 2023
    Configuration menu
    Copy the full SHA
    46b0edd View commit details
    Browse the repository at this point in the history