最近發現firefox已經支援cipher CHACHA20-POLY1305,
而且openssl 也需要upgrade一下,
就拿最新的nginx和oepnssl 1.1.x編譯一下,
因為openssl 1.0.x 似乎是沒有support chach20_poly1305,
所以是需要用openssl 1.1.x 的,
之前因為nginx對openssl 1.1.x 支援有問題,
所以上次是用 openssl 1.0.2,
而這次當然就升到 openssl 1.1.0 了.
./configure --with-openssl=/root/openssl-1.0.2h/ --with-http_ssl_module --with-http_v2_module --with-ipv6 --without-http_proxy_module --without-http_scgi_module --without-http_uwsgi_module
上次用configure,只要換一下openssl的目錄就可以用了.
剩下就是在nginx.conf加上
ssl_ciphers 'ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-CHACHA20-POLY1305:EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
ssl_prefer_server_ciphers on;
這樣就會優先使用CHACHA20-POLY1305,
只寫這兩個,是因為我都是用Firefox, 而Firefox目前只support這兩個. XD
或者你可以參考 https://wiki.mozilla.org/Security/Server_Side_TLS