joyent/node — pull request #6016 by kode4food (2013-08-08 11:54:44+00:00)
Title: Explicitly check for RSA keys, connection reset can occur otherwise

I'm not entirely sure why, but if you provide a cert containing an ECC key for SSL Client Authentication and call getPeerCertificate() against it, the SSL connection will reset in some cases upon attempting to send data. This fix does an explicit check for an RSA key before performing the EVP_PKEY_get1_RSA() call. That corrects the problem.