Skip to content

Fix #89: Clarify SignatureAndHash ambiguity in report output #138

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,9 @@ private void appendCurves(ServerReport report, ListContainer container) {

private void appendSignatureAndHashAlgorithms(ServerReport report, ListContainer container) {
if (report.getSupportedSignatureAndHashAlgorithms() != null) {
container.add(new HeadlineContainer("Supported Signature and Hash Algorithms"));
container.add(
new HeadlineContainer(
"Supported Handshake Signature Algorithms (Server Key Exchange)"));
if (!report.getSupportedSignatureAndHashAlgorithms().isEmpty()) {
for (SignatureAndHashAlgorithm algorithm :
report.getSupportedSignatureAndHashAlgorithms()) {
Expand All @@ -268,6 +270,19 @@ private void appendSignatureAndHashAlgorithms(ServerReport report, ListContainer
container.add(createDefaultTextContainer("none"));
}
}

if (report.getSupportedSignatureAndHashAlgorithmsTls13() != null) {
container.add(
new HeadlineContainer("Supported Handshake Signature Algorithms TLS 1.3"));
if (!report.getSupportedSignatureAndHashAlgorithmsTls13().isEmpty()) {
for (SignatureAndHashAlgorithm algorithm :
report.getSupportedSignatureAndHashAlgorithmsTls13()) {
container.add(createDefaultTextContainer(algorithm.toString()));
}
} else {
container.add(createDefaultTextContainer("none"));
}
}
}

private ReportContainer createEcPointFormatsContainer(ServerReport report) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2914,7 +2914,8 @@ public StringBuilder appendSignatureAndHashAlgorithms(StringBuilder builder) {
List<SignatureAndHashAlgorithm> algorithms =
report.getSupportedSignatureAndHashAlgorithms();
if (algorithms != null) {
prettyAppendHeading(builder, "Supported Signature and Hash Algorithms");
prettyAppendHeading(
builder, "Supported Handshake Signature Algorithms (Server Key Exchange)");
if (report.getSupportedSignatureAndHashAlgorithms().size() > 0) {
for (SignatureAndHashAlgorithm algorithm :
report.getSupportedSignatureAndHashAlgorithms()) {
Expand All @@ -2932,7 +2933,7 @@ public StringBuilder appendSignatureAndHashAlgorithms(StringBuilder builder) {
List<SignatureAndHashAlgorithm> algorithmsTls13 =
report.getSupportedSignatureAndHashAlgorithmsTls13();
if (algorithmsTls13 != null) {
prettyAppendHeading(builder, "Supported Signature and Hash Algorithms TLS 1.3");
prettyAppendHeading(builder, "Supported Handshake Signature Algorithms TLS 1.3");
if (report.getSupportedSignatureAndHashAlgorithmsTls13().size() > 0) {
for (SignatureAndHashAlgorithm algorithm :
report.getSupportedSignatureAndHashAlgorithmsTls13()) {
Expand Down