Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Determine cipher being used in https connection

Using php (under Apache) or JavaScript is there any way to determine the Cipher Suite or Cipher Spec being used for the current SSL (https) connection (i.e. rsa_aes_256_sha)?

like image 687
Donald Chisholm Avatar asked Aug 05 '26 16:08

Donald Chisholm


1 Answers

On the server side, in PHP, you should be able to access mod_ssl's SSL_CIPHER environment variable using PHP's $_SERVER variable. You'll also need to use SSLOptions +StdEnvVars in your Apache configuration.

like image 158
Bruno Avatar answered Aug 07 '26 07:08

Bruno