tls: get the local certificate after tls handshake
Add an API to get the local certificate chosen during TLS handshake from the SSL context.
Fix: https://github.com/nodejs/node/issues/24095
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines