forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd39a49c
committed
Support TLS handshake directly without SSLRequest negotiation
By skipping SSLRequest, you can eliminate one round-trip whenestablishing a TLS connection. It is also more friendly to generic TLSproxies that don't understand the PostgreSQL protocol.This is disabled by default in libpq, because the direct TLS handshakewill fail with old server versions. It can be enabled with thesslnegotation=direct option. It will still fall back to the negotiatedTLS handshake if the server rejects the direct attempt, either becauseit is an older version or the server doesn't support TLS at all, butthe fallback can be disabled with the sslnegotiation=requiredirectoption.Author: Greg Stark, Heikki LinnakangasReviewed-by: Matthias van de Meent, Jacob Champion1 parent05fd30c commitd39a49c
File tree
12 files changed
+609
-167
lines changed- doc/src/sgml
- src
- backend
- libpq
- tcop
- include/libpq
- interfaces/libpq
- test/libpq_encryption/t
12 files changed
+609
-167
lines changedLines changed: 80 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1740 | 1740 |
| |
1741 | 1741 |
| |
1742 | 1742 |
| |
1743 |
| - | |
1744 |
| - | |
| 1743 | + | |
| 1744 | + | |
1745 | 1745 |
| |
1746 | 1746 |
| |
1747 | 1747 |
| |
| |||
1768 | 1768 |
| |
1769 | 1769 |
| |
1770 | 1770 |
| |
| 1771 | + | |
| 1772 | + | |
| 1773 | + | |
| 1774 | + | |
| 1775 | + | |
| 1776 | + | |
| 1777 | + | |
| 1778 | + | |
| 1779 | + | |
| 1780 | + | |
| 1781 | + | |
| 1782 | + | |
| 1783 | + | |
| 1784 | + | |
| 1785 | + | |
| 1786 | + | |
| 1787 | + | |
| 1788 | + | |
| 1789 | + | |
| 1790 | + | |
| 1791 | + | |
| 1792 | + | |
| 1793 | + | |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
| 1797 | + | |
| 1798 | + | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
| 1802 | + | |
| 1803 | + | |
| 1804 | + | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
| 1808 | + | |
| 1809 | + | |
| 1810 | + | |
| 1811 | + | |
| 1812 | + | |
| 1813 | + | |
| 1814 | + | |
| 1815 | + | |
| 1816 | + | |
| 1817 | + | |
| 1818 | + | |
| 1819 | + | |
| 1820 | + | |
| 1821 | + | |
| 1822 | + | |
| 1823 | + | |
| 1824 | + | |
| 1825 | + | |
| 1826 | + | |
| 1827 | + | |
| 1828 | + | |
| 1829 | + | |
| 1830 | + | |
| 1831 | + | |
1771 | 1832 |
| |
1772 | 1833 |
| |
1773 | 1834 |
| |
| |||
2001 | 2062 |
| |
2002 | 2063 |
| |
2003 | 2064 |
| |
2004 |
| - | |
2005 |
| - | |
2006 |
| - | |
2007 |
| - | |
2008 |
| - | |
| 2065 | + | |
| 2066 | + | |
| 2067 | + | |
| 2068 | + | |
| 2069 | + | |
| 2070 | + | |
| 2071 | + | |
2009 | 2072 |
| |
2010 | 2073 |
| |
2011 | 2074 |
| |
| |||
8676 | 8739 |
| |
8677 | 8740 |
| |
8678 | 8741 |
| |
| 8742 | + | |
| 8743 | + | |
| 8744 | + | |
| 8745 | + | |
| 8746 | + | |
| 8747 | + | |
| 8748 | + | |
| 8749 | + | |
| 8750 | + | |
| 8751 | + | |
8679 | 8752 |
| |
8680 | 8753 |
| |
8681 | 8754 |
| |
|
Lines changed: 36 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1529 | 1529 |
| |
1530 | 1530 |
| |
1531 | 1531 |
| |
| 1532 | + | |
| 1533 | + | |
| 1534 | + | |
| 1535 | + | |
| 1536 | + | |
| 1537 | + | |
| 1538 | + | |
| 1539 | + | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
| 1544 | + | |
1532 | 1545 |
| |
1533 | 1546 |
| |
1534 | 1547 |
| |
1535 | 1548 |
| |
1536 | 1549 |
| |
| 1550 | + | |
| 1551 | + | |
| 1552 | + | |
| 1553 | + | |
| 1554 | + | |
| 1555 | + | |
| 1556 | + | |
| 1557 | + | |
| 1558 | + | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
| 1569 | + | |
| 1570 | + | |
| 1571 | + | |
| 1572 | + | |
1537 | 1573 |
| |
1538 | 1574 |
| |
1539 | 1575 |
| |
|
Lines changed: 49 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
109 | 109 |
| |
110 | 110 |
| |
111 | 111 |
| |
| 112 | + | |
112 | 113 |
| |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
113 | 131 |
| |
114 |
| - | |
115 | 132 |
| |
116 | 133 |
| |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
117 | 149 |
| |
118 | 150 |
| |
119 | 151 |
| |
120 | 152 |
| |
121 |
| - | |
122 |
| - | |
123 | 153 |
| |
| 154 | + | |
| 155 | + | |
| 156 | + | |
124 | 157 |
| |
125 | 158 |
| |
126 | 159 |
| |
| |||
232 | 265 |
| |
233 | 266 |
| |
234 | 267 |
| |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
235 | 281 |
| |
236 | 282 |
| |
237 | 283 |
| |
|
Lines changed: 7 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1116 | 1116 |
| |
1117 | 1117 |
| |
1118 | 1118 |
| |
1119 |
| - | |
| 1119 | + | |
1120 | 1120 |
| |
1121 |
| - | |
| 1121 | + | |
| 1122 | + | |
1122 | 1123 |
| |
1123 | 1124 |
| |
1124 |
| - | |
1125 |
| - | |
| 1125 | + | |
| 1126 | + | |
1126 | 1127 |
| |
1127 |
| - | |
| 1128 | + | |
| 1129 | + | |
1128 | 1130 |
| |
1129 | 1131 |
| |
1130 | 1132 |
| |
|
0 commit comments
Comments
(0)