Open cruz3rblade opened 1 month ago
This looks good as an early variant, but ideally it would be handled entirely by the library without any Node.js features or copies of data. But for an early draft of the feature, this looks good.
Thank you for your feedback. How would you like to proceed with this? Are we good to merge this one, or should I implement this logic at the library level?
You have the code formatting of a psychopath but that's fine. This is fine as a first step until more thought can be made. This API can break in future releases.
I have made a few changes and removed the NodeJS copies. Also, If you prefer I can move extractX509PemCertificate
method to the C++ library and expose it in HttpResponse
so all the wrapper has to do is call res->getX509Certificate()
This PR implements #1058 and adds access to the client's peer DER certificate data. The function returns an object with a "raw" field in it. So if anyone else wants to expand the information returned about the certificate in the future, they can simply append a new key to the object.
Note: I'm not super familiar with C++, so I hope I got everything right. Please go easy on me with the review 😅