Skip to content

ERR_clear_error needs to be called to avoid breaking other random things #110

@wiebeytec

Description

@wiebeytec

Because ERR_clear_error() is not run, any error like verification error lingers and propagates into the rest of the app.

I have a a Qt app that tries JWT verification with various keys in order (so always some failures), and I've had the weirdest socket errors being thrown by the Qt app, like error:0200008A:rsa routines::invalid padding. When I run ERR_clear_error() after all JWT operations, this is fixed.

BTW, for my app I made a small class that calls ERR_clear_error() in the constructor and destructor. This allows simple instantiation of that thing in any function to ensure the error is cleared, before and after the operation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions