Commit faf80c0
committed
Reject duplicate certificatePolicies extension in WOLFSSL_CERT_EXT builds
DecodeExtensionType() guarded the certificatePolicies duplicate check
(VERIFY_AND_SET_OID) under WOLFSSL_SEP only, because the extCertPolicySet
tracking bit was SEP-only. In a WOLFSSL_CERT_EXT-without-WOLFSSL_SEP build a
cert with two certificatePolicies extensions was accepted and the second
silently overwrote the first (RFC 5280 4.2 forbids repeats). Make the bit and
the guard available under WOLFSSL_CERT_EXT too, matching every other
non-repeatable extension.
Add test_DecodeCertExtensions_dup_certpol (DecodeExtensionType now
WOLFSSL_TEST_VIS).1 parent fedd3ad commit faf80c0
4 files changed
Lines changed: 55 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1495 | 1495 | | |
1496 | 1496 | | |
1497 | 1497 | | |
| 1498 | + | |
| 1499 | + | |
| 1500 | + | |
| 1501 | + | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
| 1506 | + | |
| 1507 | + | |
| 1508 | + | |
| 1509 | + | |
| 1510 | + | |
| 1511 | + | |
| 1512 | + | |
| 1513 | + | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + | |
| 1530 | + | |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
| 1534 | + | |
| 1535 | + | |
| 1536 | + | |
1498 | 1537 | | |
1499 | 1538 | | |
1500 | 1539 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| 58 | + | |
57 | 59 | | |
58 | 60 | | |
59 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21036 | 21036 | | |
21037 | 21037 | | |
21038 | 21038 | | |
21039 | | - | |
21040 | | - | |
| 21039 | + | |
| 21040 | + | |
| 21041 | + | |
21041 | 21042 | | |
21042 | 21043 | | |
21043 | 21044 | | |
| |||
21137 | 21138 | | |
21138 | 21139 | | |
21139 | 21140 | | |
21140 | | - | |
| 21141 | + | |
| 21142 | + | |
| 21143 | + | |
| 21144 | + | |
| 21145 | + | |
21141 | 21146 | | |
| 21147 | + | |
21142 | 21148 | | |
21143 | 21149 | | |
21144 | | - | |
21145 | 21150 | | |
21146 | 21151 | | |
21147 | 21152 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2089 | 2089 | | |
2090 | 2090 | | |
2091 | 2091 | | |
2092 | | - | |
| 2092 | + | |
2093 | 2093 | | |
2094 | 2094 | | |
2095 | 2095 | | |
| |||
2369 | 2369 | | |
2370 | 2370 | | |
2371 | 2371 | | |
| 2372 | + | |
2372 | 2373 | | |
2373 | 2374 | | |
2374 | 2375 | | |
| |||
2412 | 2413 | | |
2413 | 2414 | | |
2414 | 2415 | | |
2415 | | - | |
2416 | | - | |
2417 | | - | |
| 2416 | + | |
| 2417 | + | |
| 2418 | + | |
2418 | 2419 | | |
2419 | 2420 | | |
2420 | 2421 | | |
| |||
0 commit comments