Skip to content

Handle exceptions in set_tlsext_servername_callback callbacks#1478

Merged
reaperhulk merged 1 commit intomainfrom
claude/fix-tls-callback-exceptions-RTlZm
Feb 17, 2026
Merged

Handle exceptions in set_tlsext_servername_callback callbacks#1478
reaperhulk merged 1 commit intomainfrom
claude/fix-tls-callback-exceptions-RTlZm

Conversation

@alex
Copy link
Copy Markdown
Member

@alex alex commented Feb 16, 2026

When the servername callback raises an exception, call sys.excepthook with the exception info and return SSL_TLSEXT_ERR_ALERT_FATAL to abort the handshake. Previously, exceptions would propagate uncaught through the CFFI callback boundary.

https://claude.ai/code/session_01P7y1XmWkdtC5UcmZwGDvGi

When the servername callback raises an exception, call sys.excepthook
with the exception info and return SSL_TLSEXT_ERR_ALERT_FATAL to abort
the handshake. Previously, exceptions would propagate uncaught through
the CFFI callback boundary.

https://claude.ai/code/session_01P7y1XmWkdtC5UcmZwGDvGi
@reaperhulk reaperhulk merged commit d41a814 into main Feb 17, 2026
79 checks passed
@alex alex deleted the claude/fix-tls-callback-exceptions-RTlZm branch February 17, 2026 02:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants