• Michał Kępień's avatar
    Do not remove errors from the OpenSSL error queue in toresult() · 0d174c46
    Michał Kępień authored
    dst__openssl_toresult3() first calls toresult() and subsequently uses
    ERR_get_error_line_data() in a loop.  Given this, it is a mistake to use
    ERR_get_error() in toresult() because it causes the retrieved error to
    be removed from the OpenSSL error queue, thus preventing it from being
    retrieved by the subsequent ERR_get_error_line_data() calls.  Fix by
    using ERR_peek_error() instead of ERR_get_error() in toresult().
    
    (cherry picked from commit 36436268)
    0d174c46