-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
feat: extra TLS data #210
feat: extra TLS data #210
Conversation
@@ -391,6 +401,11 @@ export class HttpCommand implements CommandInterface<HttpOptions> { | |||
...cert.subject, | |||
alt: cert.subjectaltname, | |||
}, | |||
serialNumber: cert.serialNumber.match(/.{2}/g)!.join(':'), | |||
fingerprint256: cert.fingerprint256, | |||
keyType: cert.asn1Curve || cert.nistCurve ? 'EC' : cert.modulus || cert.exponent ? 'RSA' : null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alexey-yarmosh just fyi, getX509Certificate()
is indeed for server certificates, but there's also getPeerX509Certificate()
which does work for our case. But it returns some other fields in a form that we would have to additionally parse, so I decided to keep your approach. RSA and EC are the only two types we should encounter on the web so it should be fine.
I removed sha1 and sha512 fingerprints as they all do the same thing, and:
We can add later if needed, but just one of these should be enough. On the other hand, I added the certificate fingerprint and key size fields. |
🎉 This PR is included in version 0.30.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Part of jsdelivr/globalping#500