joyent/node — pull request #2996 by shigeki (2012-03-23 06:57:11+00:00)
Title: Add doc and test of cleartextStream.getCipher() and fix cipher names in doc in tls

cleartextStream.getCipher() is a good method to see the cipher name and the SSL/TLS protocol version of the current connection but it is not documented yet.
I added a doc and a test to check if it works fine.

The test also includes {honorCipherOrder: true} in its option to see the cipher order but #2844 indicates to use openssl command. Is there any specific reason to invoke openssl? If not, I can add more tests for the cipher order.

Another commit was added in this PR to fix the mistakes of cipher names, ECDHE-RSA-AES256-SHA384 and AES256-SHA256, in the doc. The proper names where openssl supports have no number in the end as

````
> openssl ciphers -v | grep -e ^ECDHE-RSA-AES256 -e ^AES256-SHA
ECDHE-RSA-AES256-SHA SSLv3 Kx=ECDH Au=RSA Enc=AES(256) Mac=SHA1
AES256-SHA SSLv3 Kx=RSA Au=RSA Enc=AES(256) Mac=SHA1
````