Skip to content

Commit

Permalink
Do not print certificate end tag without a starting tag
Browse files Browse the repository at this point in the history
The printf_xml is simply outside of the if block that generates the
start tag (when x509Cert != NULL).
  • Loading branch information
mbarbero committed Oct 12, 2022
1 parent 649a9ca commit 1711d26
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sslscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -2362,14 +2362,14 @@ int checkCertificate(struct sslCheckOptions *options, const SSL_METHOD *sslMetho
X509_free(x509Cert);
// This is abusing status a bit, but means that we'll only get the cert once
status = false;

printf_xml(" </certificate>\n");
}

else {
printf(" Unable to parse certificate\n");
}

printf_xml(" </certificate>\n");

// Free BIO
BIO_free(stdoutBIO);
if (options->xmlOutput)
Expand Down

0 comments on commit 1711d26

Please sign in to comment.