# Logging which SSL cipher a client is using

**URL:** <https://www.ruby-forum.com/t/logging-which-ssl-cipher-a-client-is-using/191020>\
**Category:** NGINX\
**Created:** [July 2, 2010, 7:22pm UTC](https://www.ruby-forum.com/t/logging-which-ssl-cipher-a-client-is-using/191020 "2010-07-02T19:22:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Calomel\_Org](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/59ef9b/32.png) [@Calomel\_Org](https://www.ruby-forum.com/u/Calomel_Org)\
**Post date:** [July 2, 2010, 7:22pm UTC](https://www.ruby-forum.com/t/logging-which-ssl-cipher-a-client-is-using/191020/1 "2010-07-02T19:22:48Z")

</div>

Does anyone know of a way to log which SSL cipher a remote client  
connects with?

For example, if a Firefox v3.6.x client connects and uses AES256 with  
Diffie-Hellman then I could log the cipher string  
“DHE-RSA-AES256-SHA”.

The Googlebot does not use AES or DH so they would connect using 3TDES  
and log the cipher as DES-CBC3-SHA.

It would be good to know which ciphers client use and which they do  
not. Then a web server admin would be able to get rid of unused and  
possibly weak cipher suites.

Any ideas are welcome.

–  
Calomel @ [https://calomel.org](https://calomel.org)  
Open Source Research and Reference

---

<div class="post-metadata">

**Author:** ![Calomel\_Org](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/59ef9b/32.png) [@Calomel\_Org](https://www.ruby-forum.com/u/Calomel_Org)\
**Post date:** [July 2, 2010, 8:07pm UTC](https://www.ruby-forum.com/t/logging-which-ssl-cipher-a-client-is-using/191020/2 "2010-07-02T20:07:17Z")

</div>

On Fri, Jul 02, 2010 at 01:21:42PM -0400, Calomel Org wrote:

> It would be good to know which ciphers client use and which they do  
> not. Then a web server admin would be able to get rid of unused and  
> possibly weak cipher suites.
> 
> Any ideas are welcome.

$ssl\_cipher

–  
Igor S.

> **[Igor Sysoev](http://sysoev.ru/en/)**

---

<div class="post-metadata">

**Author:** ![Calomel\_Org](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/59ef9b/32.png) [@Calomel\_Org](https://www.ruby-forum.com/u/Calomel_Org)\
**Post date:** [July 2, 2010, 8:23pm UTC](https://www.ruby-forum.com/t/logging-which-ssl-cipher-a-client-is-using/191020/3 "2010-07-02T20:23:40Z")

</div>

Igor,

Thanks again. I see now that the variables in the ngx\_http\_ssl\_module  
can be used in logging. Works perfectly.

[http://wiki.nginx.org/NginxHttpSslModule#Built-in\_variables](http://wiki.nginx.org/NginxHttpSslModule#Built-in_variables)

–  
Calomel @ [https://calomel.org](https://calomel.org)  
Open Source Research and Reference
