forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit8eda731
committed
Allow to use system CA pool for certificate verification
This adds a new option to libpq's sslrootcert, "system", which will loadthe system trusted CA roots for certificate verification. This is a moreconvenient way to achieve this than pointing to the system CA rootsmanually since the location can differ by installation and be locallyadjusted by env vars in OpenSSL.When sslrootcert is set to system, sslmode is forced to be verify-fullas weaker modes aren't providing much security for public CAs.Changing the location of the system roots by setting environment vars isnot supported by LibreSSL so the tests will use a heuristic to determineif the system being tested is LibreSSL or OpenSSL.The workaround in .cirrus.yml is required to handle a strange interactionbetween homebrew and the openssl@3 formula; hopefully this can be removedin the near future.The original patch was written by Thomas Habets, which was later revivedby Jacob Champion.Author: Jacob Champion <jchampion@timescale.com>Author: Thomas Habets <thomas@habets.se>Reviewed-by: Jelte Fennema <postgres@jeltef.nl>Reviewed-by: Andrew Dunstan <andrew@dunslane.net>Reviewed-by: Magnus Hagander <magnus@hagander.net>Discussion:https://www.postgresql.org/message-id/flat/CA%2BkHd%2BcJwCUxVb-Gj_0ptr3_KZPwi3%2B67vK6HnLFBK9MzuYrLA%40mail.gmail.com1 parent12f3867 commit8eda731
File tree
9 files changed
+247
-9
lines changed- doc/src/sgml
- src
- interfaces/libpq
- t
- test/ssl
- ssl
- t
9 files changed
+247
-9
lines changedLines changed: 13 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
477 | 477 |
| |
478 | 478 |
| |
479 | 479 |
| |
480 |
| - | |
| 480 | + | |
481 | 481 |
| |
482 | 482 |
| |
483 | 483 |
| |
484 | 484 |
| |
485 | 485 |
| |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
486 | 498 |
| |
487 | 499 |
| |
488 | 500 |
| |
|
Lines changed: 24 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1876 | 1876 |
| |
1877 | 1877 |
| |
1878 | 1878 |
| |
| 1879 | + | |
| 1880 | + | |
| 1881 | + | |
| 1882 | + | |
| 1883 | + | |
| 1884 | + | |
| 1885 | + | |
| 1886 | + | |
| 1887 | + | |
| 1888 | + | |
| 1889 | + | |
| 1890 | + | |
| 1891 | + | |
| 1892 | + | |
| 1893 | + | |
| 1894 | + | |
| 1895 | + | |
| 1896 | + | |
| 1897 | + | |
| 1898 | + | |
| 1899 | + | |
| 1900 | + | |
| 1901 | + | |
| 1902 | + | |
1879 | 1903 |
| |
1880 | 1904 |
| |
1881 | 1905 |
| |
|
Lines changed: 5 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2007 | 2007 |
| |
2008 | 2008 |
| |
2009 | 2009 |
| |
2010 |
| - | |
| 2010 | + | |
| 2011 | + | |
| 2012 | + | |
| 2013 | + | |
| 2014 | + | |
2011 | 2015 |
| |
2012 | 2016 |
| |
2013 | 2017 |
| |
|
Lines changed: 66 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1465 | 1465 |
| |
1466 | 1466 |
| |
1467 | 1467 |
| |
| 1468 | + | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
| 1472 | + | |
| 1473 | + | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
1468 | 1485 |
| |
1469 | 1486 |
| |
1470 | 1487 |
| |
| |||
1511 | 1528 |
| |
1512 | 1529 |
| |
1513 | 1530 |
| |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
| 1534 | + | |
| 1535 | + | |
| 1536 | + | |
| 1537 | + | |
| 1538 | + | |
| 1539 | + | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
| 1544 | + | |
| 1545 | + | |
| 1546 | + | |
1514 | 1547 |
| |
1515 | 1548 |
| |
1516 | 1549 |
| |
| |||
6236 | 6269 |
| |
6237 | 6270 |
| |
6238 | 6271 |
| |
| 6272 | + | |
| 6273 | + | |
6239 | 6274 |
| |
6240 | 6275 |
| |
6241 | 6276 |
| |
| |||
6252 | 6287 |
| |
6253 | 6288 |
| |
6254 | 6289 |
| |
| 6290 | + | |
| 6291 | + | |
| 6292 | + | |
6255 | 6293 |
| |
6256 | 6294 |
| |
6257 | 6295 |
| |
| |||
6294 | 6332 |
| |
6295 | 6333 |
| |
6296 | 6334 |
| |
| 6335 | + | |
| 6336 | + | |
| 6337 | + | |
| 6338 | + | |
| 6339 | + | |
| 6340 | + | |
| 6341 | + | |
6297 | 6342 |
| |
6298 | 6343 |
| |
6299 | 6344 |
| |
| |||
6326 | 6371 |
| |
6327 | 6372 |
| |
6328 | 6373 |
| |
| 6374 | + | |
| 6375 | + | |
| 6376 | + | |
| 6377 | + | |
| 6378 | + | |
| 6379 | + | |
| 6380 | + | |
| 6381 | + | |
| 6382 | + | |
| 6383 | + | |
| 6384 | + | |
| 6385 | + | |
| 6386 | + | |
| 6387 | + | |
| 6388 | + | |
| 6389 | + | |
| 6390 | + | |
| 6391 | + | |
| 6392 | + | |
| 6393 | + | |
| 6394 | + | |
6329 | 6395 |
| |
6330 | 6396 |
| |
6331 | 6397 |
| |
|
Lines changed: 25 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1060 | 1060 |
| |
1061 | 1061 |
| |
1062 | 1062 |
| |
1063 |
| - | |
1064 |
| - | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
1065 | 1086 |
| |
1066 | 1087 |
| |
1067 | 1088 |
| |
| |||
1122 | 1143 |
| |
1123 | 1144 |
| |
1124 | 1145 |
| |
1125 |
| - | |
| 1146 | + | |
1126 | 1147 |
| |
1127 | 1148 |
| |
1128 |
| - | |
| 1149 | + | |
1129 | 1150 |
| |
1130 | 1151 |
| |
1131 | 1152 |
| |
|
Lines changed: 28 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
12 | 14 |
| |
13 | 15 |
| |
14 | 16 |
| |
| |||
209 | 211 |
| |
210 | 212 |
| |
211 | 213 |
| |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
212 | 235 |
| |
213 | 236 |
| |
214 | 237 |
| |
215 | 238 |
| |
216 | 239 |
| |
217 | 240 |
| |
| 241 | + | |
218 | 242 |
| |
219 | 243 |
| |
220 | 244 |
| |
| 245 | + | |
221 | 246 |
| |
222 | 247 |
| |
223 |
| - | |
| 248 | + | |
224 | 249 |
| |
225 | 250 |
| |
| 251 | + | |
226 | 252 |
| |
227 | 253 |
| |
228 | 254 |
| |
|
Lines changed: 38 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + |
Lines changed: 5 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
61 | 61 |
| |
62 | 62 |
| |
63 | 63 |
| |
64 |
| - | |
| 64 | + | |
| 65 | + | |
65 | 66 |
| |
66 | 67 |
| |
67 | 68 |
| |
| |||
150 | 151 |
| |
151 | 152 |
| |
152 | 153 |
| |
| 154 | + | |
| 155 | + | |
| 156 | + | |
153 | 157 |
| |
154 | 158 |
| |
155 | 159 |
| |
|
Lines changed: 43 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
33 | 33 |
| |
34 | 34 |
| |
35 | 35 |
| |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
36 | 42 |
| |
37 | 43 |
| |
38 | 44 |
| |
| |||
461 | 467 |
| |
462 | 468 |
| |
463 | 469 |
| |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
464 | 507 |
| |
465 | 508 |
| |
466 | 509 |
| |
|
0 commit comments
Comments
(0)