joyent/node — pull request #6584 by bnoordhuis (2013-11-25 14:18:49+00:00)
Title: tls: add serialNumber to getPeerCertificate()

Add a 'serialNumber' property to the object that is returned by
tls.CryptoStream#getPeerCertificate(). Contains the certificate's
serial number encoded as a hex string. The format is identical to
`openssl x509 -serial -in path/to/certificate`.

Fixes #6583.

Suggested reviewer: @indutny. It's kind of sad that the 'valid_from' and 'valid_to' fields are called like that. I couldn't bring myself to name it 'serial_number' though, even more so because subjectAltName is still subjectAltName.