Commit 3e4d61a
authored
Fix X.509 version handling. (#1123)
Certificate versions go up to v3 (numeric value 2), CRLs go up to v2
(numeric value 1), and CSRs go up to v1 (numeric value 0). This CL fixes
the following issues:
- Add a missing check to the return value of X509_set_version
- Fix crlDataUnsupportedExtension which had an invalid CRL version.
- Switch TestX509.test_version to test valid versions, so it doesn't
prevent OpenSSL or an OpenSSL derivative from checking for invalid
versions.
- Make TestX509Req.test_version tolerate set_version(1) failing on CSRs.
Since there's nothing useful to test otherwise, I've made the test
work for either possible backend behavior.1 parent 8e9f0c2 commit 3e4d61a
2 files changed
+16
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1148 | 1148 | | |
1149 | 1149 | | |
1150 | 1150 | | |
1151 | | - | |
| 1151 | + | |
1152 | 1152 | | |
1153 | 1153 | | |
1154 | 1154 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
618 | 618 | | |
619 | 619 | | |
620 | 620 | | |
| 621 | + | |
621 | 622 | | |
622 | 623 | | |
623 | | - | |
| 624 | + | |
624 | 625 | | |
625 | 626 | | |
626 | 627 | | |
| |||
1598 | 1599 | | |
1599 | 1600 | | |
1600 | 1601 | | |
1601 | | - | |
| 1602 | + | |
| 1603 | + | |
1602 | 1604 | | |
1603 | 1605 | | |
1604 | 1606 | | |
1605 | | - | |
1606 | | - | |
1607 | | - | |
1608 | | - | |
| 1607 | + | |
| 1608 | + | |
| 1609 | + | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
| 1613 | + | |
| 1614 | + | |
| 1615 | + | |
1609 | 1616 | | |
1610 | 1617 | | |
1611 | 1618 | | |
| |||
1793 | 1800 | | |
1794 | 1801 | | |
1795 | 1802 | | |
1796 | | - | |
1797 | | - | |
| 1803 | + | |
| 1804 | + | |
1798 | 1805 | | |
1799 | 1806 | | |
1800 | 1807 | | |
| |||
0 commit comments