Commit c95d215
committed
Fix fallback behavior when server sends an ERROR early at startup
With sslmode=prefer, the desired behavior is to completely fail the
connection attempt, *not* fall back to a plaintext connection, if the
server responds to the SSLRequest with an error ('E') response instead
of rejecting SSL with an 'N' response. This was broken in commit
05fd30c.
Reported-by: Jacob Champion
Reviewed-by: Michael Paquier
Discussion: https://www.postgresql.org/message-id/CAOYmi%2Bnwvu21mJ4DYKUa98HdfM_KZJi7B1MhyXtnsyOO-PB6Ww%40mail.gmail.com
Backpatch-through: 171 parent 284c030 commit c95d215
1 file changed
+17
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3521 | 3521 | | |
3522 | 3522 | | |
3523 | 3523 | | |
| 3524 | + | |
| 3525 | + | |
| 3526 | + | |
| 3527 | + | |
| 3528 | + | |
| 3529 | + | |
3524 | 3530 | | |
3525 | 3531 | | |
3526 | 3532 | | |
| |||
3612 | 3618 | | |
3613 | 3619 | | |
3614 | 3620 | | |
| 3621 | + | |
| 3622 | + | |
| 3623 | + | |
| 3624 | + | |
| 3625 | + | |
| 3626 | + | |
| 3627 | + | |
3615 | 3628 | | |
3616 | 3629 | | |
3617 | 3630 | | |
| |||
3659 | 3672 | | |
3660 | 3673 | | |
3661 | 3674 | | |
| 3675 | + | |
| 3676 | + | |
| 3677 | + | |
| 3678 | + | |
3662 | 3679 | | |
3663 | 3680 | | |
3664 | 3681 | | |
| |||
0 commit comments