Skip to content

Fix unproven peer certificates reporting SSLError instead of SSLAuthFail - #133

Merged
SeanTAllen merged 1 commit into
mainfrom
fix-unproven-cert-auth-fail
Aug 1, 2026
Merged

Fix unproven peer certificates reporting SSLError instead of SSLAuthFail#133
SeanTAllen merged 1 commit into
mainfrom
fix-unproven-cert-auth-fail

Conversation

@SeanTAllen

Copy link
Copy Markdown
Member

The existing checks in _peer_auth_failed — chain verification result and error queue scan — miss the case where a peer presents a certificate it cannot prove it holds. The chain verifies (the certificate is genuine), no "no certificate" reason appears on the queue, and the error codes for the signature failure differ across OpenSSL and LibreSSL.

After the existing checks, a non-null peer certificate means the handshake failed after the peer's credentials were received. That is an authentication failure regardless of which error code the backend used.

A peer whose certificate will not parse remains SSLError — the failure happens before chain verification, so it is not distinguishable from one that had nothing to do with a certificate.

Closes #132

The existing checks in _peer_auth_failed — chain verification result and
error queue scan — miss the case where a peer presents a certificate it
cannot prove it holds. The chain verifies (the certificate is genuine),
no "no certificate" reason appears on the queue, and the error codes for
the signature failure differ across OpenSSL and LibreSSL.

After the existing checks, a non-null peer certificate means the
handshake failed after the peer's credentials were received. That is an
authentication failure regardless of which error code the backend used.

Closes #132
@SeanTAllen SeanTAllen added the changelog - fixed Automatically add "Fixed" CHANGELOG entry on merge label Aug 1, 2026
@ponylang-main ponylang-main added the discuss during sync Should be discussed during an upcoming sync label Aug 1, 2026
@SeanTAllen
SeanTAllen merged commit 622b552 into main Aug 1, 2026
16 checks passed
@SeanTAllen
SeanTAllen deleted the fix-unproven-cert-auth-fail branch August 1, 2026 22:11
@ponylang-main ponylang-main removed the discuss during sync Should be discussed during an upcoming sync label Aug 1, 2026
github-actions Bot pushed a commit that referenced this pull request Aug 1, 2026
github-actions Bot pushed a commit that referenced this pull request Aug 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog - fixed Automatically add "Fixed" CHANGELOG entry on merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A peer that cannot prove it holds its certificate reports SSLError, not SSLAuthFail

2 participants