Nginx : TLS 1.2 support
Couple of days back I was toying with this website https://www.ssllabs.com/ssltest/ to see how good is my website SSL strength. Unfortunately, from the report.... got a B grade. The reason given is that TLS 1.2 is not supported.
To enable TLS 1.2 support in Nginx, do the following
Check if your OpenSSL version is up to date with openssl version -a
command and you should see output like :
OpenSSL 1.0.1i 6 Aug 2014
built on: Thu Aug 7 09:43:31 UTC 2014
platform: linux-x86_64
options: bn(64,64) rc4(16x,int) des(idx,cisc,16,int) idea(int) blowfish(idx)
compiler: gcc -DOPENSSLTHREADS -DREENTRANT -DDSODLFCN -DHAVEDLFCNH -Wa,--noexecstack -m64 -DLENDIAN -DTERMIO -O3 -Wall -
DOPENSSLIA32SSE2 -DOPENSSLBNASMMONT -DOPENSSLBNASMMONT5 -DOPENSSLBNASMGF2m -DSHA1ASM -DSHA256_ASM -
DSHA512ASM -DMD5ASM -DAESASM -DVPAESASM -DBSAESASM -DWHIRLPOOLASM -DGHASH_ASM
OPENSSLDIR: "/usr/local/ssl"
At minimum get openssl version 1.0.1 and above
Next step is go to nginx configuration directory. In my case, it is located at /usr/local/nginx/conf
and modify nginx.conf file.
search for the ssl_protocols
config line such as
ssl_protocols SSLv2 SSLv3 TLSv1;
and change the line by adding TLSv1.2 and TLSv1.1
ssl_protocols SSLv2 SSLv3 TLSv1.2 TLSv1.1 TLSv1;
Note : Depending on your nginx.conf file, the configuration may be slightly different. However, the ssl_protocols
line should be under the server block listening to port 443.
Restart nginx and run the SSL query again at https://www.ssllabs.com/ssltest/ for your website. TLS 1.2 support should be enabled by now.
By Adam Ng
IF you gain some knowledge or the information here solved your programming problem. Please consider donating to the less fortunate or some charities that you like. Apart from donation, planting trees, volunteering or reducing your carbon footprint will be great too.
Advertisement
Tutorials
+11.3k Golang : Change date format to yyyy-mm-dd
+11.7k Golang : Convert decimal number(integer) to IPv4 address
+15.3k Chrome : ERR_INSECURE_RESPONSE and allow Chrome browser to load insecure content
+6.1k Golang : Test input string for unicode example
+8.1k Your page has meta tags in the body instead of the head
+6.2k PHP : Proper way to get UTF-8 character or string length
+13.5k Golang : Get dimension(width and height) of image file
+17.8k Golang : Check if a directory exist or not
+9.8k Golang : Find and replace data in all files recursively
+15.1k Golang : ROT47 (Caesar cipher by 47 characters) example
+8k Golang : Metaprogramming example of wrapping a function