Skip to content

Commit

Permalink
Skip unnumbered sections
Browse files Browse the repository at this point in the history
  • Loading branch information
vanbroup committed Nov 28, 2024
1 parent 1536b63 commit 4fa37da
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 66 deletions.
33 changes: 0 additions & 33 deletions tests/expected/entrust-rfc3647-sections.txt
Original file line number Diff line number Diff line change
Expand Up @@ -347,36 +347,3 @@ RFC3647
+ Section 9.17.2 (fiduciary relationships) not found in sections dictionary
+ Section 9.17.3 (waiver) not found in sections dictionary
+ Section 9.17.4 (interpretation) not found in sections dictionary
+ Section Appendix (a - certificate profiles) not found in sections dictionary
! Section Root (level 1) does not match header level 2
+ Section Root (ca certificate) not found in sections dictionary
! Section Cross (level 1) does not match header level 2
+ Section Cross (certificate or subordinate ca certificate) not found in sections dictionary
! Section Technically (level 1) does not match header level 2
+ Section Technically (constrained subordinate ca certificate) not found in sections dictionary
! Section OV (level 1) does not match header level 2
+ Section OV (tls certificate) not found in sections dictionary
! Section EV (level 1) does not match header level 2
+ Section EV (tls certificate) not found in sections dictionary
! Section Client (level 1) does not match header level 2
+ Section Client (authentication certificate) not found in sections dictionary
! Section Code (level 1) does not match header level 2
+ Section Code (signing certificate) not found in sections dictionary
! Section EV (level 1) does not match header level 2
+ Section EV (code signing certificate) not found in sections dictionary
! Section S/MIME (level 1) does not match header level 2
+ Section S/MIME (class 1 certificate) not found in sections dictionary
! Section S/MIME (level 1) does not match header level 2
+ Section S/MIME (class 2 certificate) not found in sections dictionary
! Section Document (level 1) does not match header level 2
+ Section Document (signing certificate) not found in sections dictionary
! Section Time-Stamp (level 1) does not match header level 2
+ Section Time-Stamp (certificate) not found in sections dictionary
! Section Verified (level 1) does not match header level 2
+ Section Verified (mark certificate) not found in sections dictionary
! Section Government (level 1) does not match header level 2
+ Section Government (mark certificate) not found in sections dictionary
! Section Mark (level 1) does not match header level 2
+ Section Mark (certificate) not found in sections dictionary
+ Section Appendix (b - subordinate ca certificates) not found in sections dictionary
+ Section Appendix (c - vmc terms of use ("vmc terms")) not found in sections dictionary
34 changes: 1 addition & 33 deletions tests/expected/entrust-tlsbr-sections.txt
Original file line number Diff line number Diff line change
Expand Up @@ -347,39 +347,6 @@ TLSBR
+ Section 9.17.2 (fiduciary relationships) not found in sections dictionary
+ Section 9.17.3 (waiver) not found in sections dictionary
+ Section 9.17.4 (interpretation) not found in sections dictionary
+ Section Appendix (a - certificate profiles) not found in sections dictionary
! Section Root (level 1) does not match header level 2
+ Section Root (ca certificate) not found in sections dictionary
! Section Cross (level 1) does not match header level 2
+ Section Cross (certificate or subordinate ca certificate) not found in sections dictionary
! Section Technically (level 1) does not match header level 2
+ Section Technically (constrained subordinate ca certificate) not found in sections dictionary
! Section OV (level 1) does not match header level 2
+ Section OV (tls certificate) not found in sections dictionary
! Section EV (level 1) does not match header level 2
+ Section EV (tls certificate) not found in sections dictionary
! Section Client (level 1) does not match header level 2
+ Section Client (authentication certificate) not found in sections dictionary
! Section Code (level 1) does not match header level 2
+ Section Code (signing certificate) not found in sections dictionary
! Section EV (level 1) does not match header level 2
+ Section EV (code signing certificate) not found in sections dictionary
! Section S/MIME (level 1) does not match header level 2
+ Section S/MIME (class 1 certificate) not found in sections dictionary
! Section S/MIME (level 1) does not match header level 2
+ Section S/MIME (class 2 certificate) not found in sections dictionary
! Section Document (level 1) does not match header level 2
+ Section Document (signing certificate) not found in sections dictionary
! Section Time-Stamp (level 1) does not match header level 2
+ Section Time-Stamp (certificate) not found in sections dictionary
! Section Verified (level 1) does not match header level 2
+ Section Verified (mark certificate) not found in sections dictionary
! Section Government (level 1) does not match header level 2
+ Section Government (mark certificate) not found in sections dictionary
! Section Mark (level 1) does not match header level 2
+ Section Mark (certificate) not found in sections dictionary
+ Section Appendix (b - subordinate ca certificates) not found in sections dictionary
+ Section Appendix (c - vmc terms of use ("vmc terms")) not found in sections dictionary
- Section 1.2.2 (Relevant Dates) not found in the document
- Section 1.6.3 (References) not found in the document
- Section 1.6.4 (Conventions) not found in the document
Expand All @@ -396,6 +363,7 @@ TLSBR
- Section 7.1.2.2.3 (Cross-Certified Subordinate CA Extensions) not found in the document
- Section 7.1.2.2.4 (Cross-Certified Subordinate CA Extended Key Usage - Unrestricted) not found in the document
- Section 7.1.2.2.5 (Cross-Certified Subordinate CA Extended Key Usage - Restricted) not found in the document
- Section 7.1.2.2.6 (Cross-Certified Subordinate CA Certificate Certificate Policies) not found in the document
- Section 7.1.2.3.1 (Technically Constrained Non-TLS Subordinate CA Extensions) not found in the document
- Section 7.1.2.3.2 (Technically Constrained Non-TLS Subordinate CA Certificate Policies) not found in the document
- Section 7.1.2.3.3 (Technically Constrained Non-TLS Subordinate CA Extended Key Usage) not found in the document
Expand Down
5 changes: 5 additions & 0 deletions tools/check_sections.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,11 @@ def check_markdown_headers(file, sections, output):
parts = line.strip('#').strip().split(' ', 1)
if len(parts) == 2:
section_number, title = parts[0], parts[1].lower()

# Skip header if no section number is found
if not section_number.replace('.', '').isdigit():
continue

# Remove trailing periods from section numbers for consistency
section_number = section_number.rstrip('.')
found_sections.append(section_number)
Expand Down

0 comments on commit 4fa37da

Please sign in to comment.