Skip to content

Commit

Permalink
Merge pull request #685 from AMWA-TV/fix-denumbered-doc-links
Browse files Browse the repository at this point in the history
Fix doc links since numbering removed from filenames
  • Loading branch information
garethsb authored Jul 11, 2022
2 parents a8ea5e8 + 0c533a2 commit 7532329
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 36 deletions.
18 changes: 9 additions & 9 deletions nmostesting/suites/BCP00301Test.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def test_01(self, test):
elif report["id"] in ["TLS1_3"] and not report["finding"].startswith("offered"):
return test.OPTIONAL("Protocol {} should be offered".format(report["id"].replace("_", ".")),
"https://specs.amwa.tv/bcp-003-01/branches/{}"
"/docs/1.0._Secure_Communication.html#tls-versions"
"/docs/Secure_Communication.html#tls-versions"
.format(self.apis[SECURE_API_KEY]["spec_branch"]))
return test.PASS()

Expand Down Expand Up @@ -135,13 +135,13 @@ def test_02(self, test):
return test.OPTIONAL("Implementation of the following TLS 1.2 ciphers is recommended: {}"
.format(",".join(tls1_2_should)),
"https://specs.amwa.tv/bcp-003-01/branches/{}"
"/docs/1.0._Secure_Communication.html#tls-12-cipher-suites"
"/docs/Secure_Communication.html#tls-12-cipher-suites"
.format(self.apis[SECURE_API_KEY]["spec_branch"]))
elif tls1_3_supported and len(tls1_3_should) > 0:
return test.OPTIONAL("Implementation of the following TLS 1.3 ciphers is recommended: {}"
.format(",".join(tls1_3_should)),
"https://specs.amwa.tv/bcp-003-01/branches/{}"
"/docs/1.0._Secure_Communication.html#tls-13-cipher-suites"
"/docs/Secure_Communication.html#tls-13-cipher-suites"
.format(self.apis[SECURE_API_KEY]["spec_branch"]))
else:
return test.PASS()
Expand All @@ -161,7 +161,7 @@ def test_03(self, test):
ipaddress.ip_address(report["finding"])
return test.WARNING("CN is an IP address: {}".format(report["finding"]),
"https://specs.amwa.tv/bcp-003-01/branches/{}"
"/docs/1.0._Secure_Communication.html"
"/docs/Secure_Communication.html"
"#x509-certificates-and-certificate-authority"
.format(self.apis[SECURE_API_KEY]["spec_branch"]))
except ValueError:
Expand All @@ -170,23 +170,23 @@ def test_03(self, test):
if report["finding"].startswith("No SAN"):
return test.OPTIONAL("No SAN was found in the certificate",
"https://specs.amwa.tv/bcp-003-01/branches/{}"
"/docs/1.0._Secure_Communication.html"
"/docs/Secure_Communication.html"
"#x509-certificates-and-certificate-authority"
.format(self.apis[SECURE_API_KEY]["spec_branch"]))
else:
alt_names = report["finding"].split()
if common_name not in alt_names:
return test.OPTIONAL("CN {} was not found in the SANs".format(common_name),
"https://specs.amwa.tv/bcp-003-01/branches/{}"
"/docs/1.0._Secure_Communication.html"
"/docs/Secure_Communication.html"
"#x509-certificates-and-certificate-authority"
.format(self.apis[SECURE_API_KEY]["spec_branch"]))
for name in alt_names:
try:
ipaddress.ip_address(name)
return test.WARNING("SAN is an IP address: {}".format(name),
"https://specs.amwa.tv/bcp-003-01/branches/{}"
"/docs/1.0._Secure_Communication.html"
"/docs/Secure_Communication.html"
"#x509-certificates-and-certificate-authority"
.format(self.apis[SECURE_API_KEY]["spec_branch"]))
except ValueError:
Expand Down Expand Up @@ -216,7 +216,7 @@ def test_04(self, test):
elif hsts_supported is False:
return test.OPTIONAL("Strict Transport Security (HSTS) should be supported",
"https://specs.amwa.tv/bcp-003-01/branches/{}"
"/docs/1.0._Secure_Communication.html#http-server"
"/docs/Secure_Communication.html#http-server"
.format(self.apis[SECURE_API_KEY]["spec_branch"]))
else:
return test.FAIL("Error in HSTS header: {}".format(hsts_supported))
Expand Down Expand Up @@ -248,7 +248,7 @@ def test_06(self, test):
if report["finding"] == "not offered":
return test.OPTIONAL("OCSP stapling is not offered by this server",
"https://specs.amwa.tv/bcp-003-01/branches/{}"
"/docs/1.0._Secure_Communication.html"
"/docs/Secure_Communication.html"
"#x509-certificates-and-certificate-authority"
.format(self.apis[SECURE_API_KEY]["spec_branch"]))
elif report["id"].split()[0] == "cert_ocspURL":
Expand Down
Loading

0 comments on commit 7532329

Please sign in to comment.