Skip to content

Ensure BoringSSL error queue is cleared#252

Open
YATIN072007 wants to merge 1 commit intogoogle:masterfrom
YATIN072007:fix/issue-63-thread-local-errors
Open

Ensure BoringSSL error queue is cleared#252
YATIN072007 wants to merge 1 commit intogoogle:masterfrom
YATIN072007:fix/issue-63-thread-local-errors

Conversation

@YATIN072007
Copy link
Contributor

This PR enforces strict clearing of the BoringSSL thread-local error queue after every operation. By ensuring ERR_clear_error is called unconditionally on every exit from FFI scopes and check helpers, This ensures that no errors are left behind to affect future operations.

Fixes google#63. This change updates the FFI implementation to ensure that the BoringSSL thread-local error queue is always cleared after operations, regardless of success or failure. This prevents stale errors from contaminating subsequent cryptographic operations or leaking across asynchronous boundaries.

Also adds test/thread_local_error_test.dart to verify this behavior.
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

Successfully merging this pull request may close these issues.

1 participant