- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit0b5d1fb
committed
Fix errormessage for missing system CA in OpenSSL 3.1
The error message for a missing or invalid system CA when usingsslrootcert=system differs based on the OpenSSL version used.In OpenSSL 1.0.1-3.0 it is reported as SSL Error, with varyingdegrees of helpfulness in the error message. With OpenSSL 3.1 itis reported as an SSL SYSCALL error with "Undefined error" asthe error message. This fix pulls out the particular error inOpenSSL 3.1 as a certificate verify error in order to help theuser better figure out what happened, and to keep the ssl testworking. While there is no evidence that extracing the errorswill clobber errno, this adds a guard against that regardlessto also make the consistent with how we handle OpenSSL errorselsewhere. It also memorizes the output from OpenSSL 3.0 inthe test in cases where the system CA isn't responding.Reported-by: Peter Eisentraut <peter.eisentraut@enterprisedb.com>Discussion:https://postgr.es/m/c39be3c5-c1a5-1e33-1024-16f527e251a4@enterprisedb.com1 parent77dedeb commit0b5d1fb
File tree
2 files changed
+24
-4
lines changed- src
- interfaces/libpq
- test/ssl/t
2 files changed
+24
-4
lines changedLines changed: 21 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1489 | 1489 |
| |
1490 | 1490 |
| |
1491 | 1491 |
| |
| 1492 | + | |
1492 | 1493 |
| |
1493 | 1494 |
| |
1494 | 1495 |
| |
1495 | 1496 |
| |
| 1497 | + | |
1496 | 1498 |
| |
1497 | 1499 |
| |
1498 | 1500 |
| |
| |||
1508 | 1510 |
| |
1509 | 1511 |
| |
1510 | 1512 |
| |
1511 |
| - | |
1512 |
| - | |
| 1513 | + | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + | |
| 1530 | + | |
1513 | 1531 |
| |
1514 |
| - | |
| 1532 | + | |
1515 | 1533 |
| |
1516 | 1534 |
| |
1517 | 1535 |
| |
|
Lines changed: 3 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
476 | 476 |
| |
477 | 477 |
| |
478 | 478 |
| |
| 479 | + | |
| 480 | + | |
479 | 481 |
| |
480 | 482 |
| |
481 | 483 |
| |
482 |
| - | |
| 484 | + | |
483 | 485 |
| |
484 | 486 |
| |
485 | 487 |
| |
|
0 commit comments
Comments
(0)