Skip to content

Missing certificate chain and invalid JSON is produced with a dangling comma #58

@manuelbua

Description

@manuelbua

I encountered an error while parsing the JSON produced by tls-scan and pinpointed it to a case where the certificate chain is missing from the JSON output and a dangling comma is left before closing the JSON object.

{ "host": "18.236.255.249", "ip": "18.236.255.249", "port": 443, "elapsedTime": 571, "tlsVersion": "TLSv1.2", "cipher": "ADH-AES256-SHA          SSLv3 Kx=DH       Au=None Enc=AES(256)  Mac=SHA1", "tempPublicKeyAlg": "DH", "tempPublicKeySize": 2048, "secureRenego": true, "compression": "NONE", "expansion": "NONE", "sessionLifetimeHint": 300, "x509ChainDepth": -1, "verifyCertResult": true, "verifyHostResult": false, "ocspStapled": false, }

To reproduce what i'm seeing you can try the following:

echo '18.236.255.249' | tls-scan | jq
parse error: Expected another key-value pair at line 1, column 441

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions