或许有人会问我为啥那么久不更新 其实站点一直有在维护 但是呢優子秉承不发重复 不转帖 不伪原创。因此不会发不是自己倒腾过的东西出来的
今晚睡得晚 错过了睡点 于是直接失眠了QAQ。就想着折腾点啥打发时间 看着谷歌的SSL就有了自己折腾一个和谷歌一样前卫的HTTPS的想法
闲话到此为止
支持新版本TLS协议和ECDHE_RSA加密需要最低openssl1.0.1 而CentOS6通过默认源yum安装的openssl版本只有1.0.0 是不支持新版本TLS协议和ECDHE_RSA密钥交换方式的
一开始本想自己编译openssl 后来一想 自己编译会跟系统的openssl脱节 从而产生一些问题。谷歌是最好的老师 搜到了一个自定义源 里面有已经编译好的新版本openssl
导入源【请注意 此源仅支持64位系统。32位系统的抱歉了 暂时无法找到合适的源】
CentOS5 x64:
rpm -ivh --nosignature http://rpm.axivo.com/redhat/axivo-release-5-1.noarch.rpm
CentOS6 x64:
rpm -ivh --nosignature http://rpm.axivo.com/redhat/axivo-release-6-1.noarch.rpm
通过源升级安装最新版openssl1.0.1e
yum –enablerepo=axivo update openssl
不出意外的话 确认按一次y 导入KEY按一次y 即可完成安装
此时再输入openssl查看version的话 应该会显示【OpenSSL 1.0.1e 11 Feb 2013】
重新编译nginx
印象中这步是必须的 因为似乎编译时引用了openssl的头文档 需要重新编译
即使不是不是必须的 升级到1.4.1支持spdy协议还是不错的
由于我采用的是lnmp一键包 可以直接使用一键包中的upgrade_nginx.sh升级或者重新编译。如果不是使用一键包的 大致步骤如下:
wget http://nginx.org/download/nginx-1.4.1.tar.gz
tar zxvf nginx-1.4.1.tar.gz
cd nginx-1.4.1
./configure –user=www –group=www –prefix=/usr/local/nginx【注:此处填你自己nginx安装目录 按照原先的编译参数 如果原先就没有 prefix直接去掉】 –with-http_stub_status_module –with-http_ssl_module –with-http_gzip_static_module –with-http_spdy_module【注:使用一键包的也需要修改一键包的编译参数 此处加上红色字段】 –with-ipv6
make
mv /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx.old【移除+备份老nginx的可执行文件 具体路径是看你的安装方式】
cp objs/nginx /usr/local/nginx/sbin/nginx【复制新的可执行文件进去 具体路径也是看你的安装方式】
/usr/local/nginx/sbin/nginx -t【执行新的可执行文件 测试是否配置文件有问题 具体路径同上】
make upgrade
修改nginx配置文件
需要修改的部分很多 不能像以前两三行解决了
首先
listen 你的ip:443 spdy;#新增spdy协议
SSL部分:
ssl on;
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;#新增TLSv1.1 TLSv1.2
ssl_session_cache builtin:1000 shared:SSL:10m;
ssl_session_timeout 5m;#新增SSL session支持 此处和上面的是设置超时和设置cache大小 减轻负载
ssl_stapling on;
ssl_stapling_verify on;#
ssl_certificate 你的公钥.crt;
ssl_certificate_key 你的私钥.key;
ssl_prefer_server_ciphers on;#设置由服务端决定加密方式 避免不安全问题
ssl_ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-RC4-SHA:ECDHE-RSA-RC4-SHA:ECDH-ECDSA-RC4-SHA:ECDH-RSA-RC4-SHA:ECDHE-RSA-AES256-SHA:RC4-SHA:HIGH:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!CBC:!EDH:!kEDH:!PSK:!SRP:!kECDH;#去除所有不安全加密方式。确保不会遭受BEAST攻击。设置ECDHE_RSA正向密钥交换方式
注:红字是新增部分 蓝字可能是以前就有 如果以前有就需要加入红字部分 没有就直接添加。黑字是开启SSL加密所必需的
设置完毕后 reload nginx即可。
此时可以关闭浏览器重新访问你的SSL连接 你会发现你也变成了使用ECDHE_RSA的高级用户了
你同时可以使用SSL在线测试工具:https://www.ssllabs.com/ssltest/analyze.html。不出意外的话你应该是会得A了
这是本站的评分:https://www.ssllabs.com/ssltest/analyze.html?d=tucao.org
至于RC4的问题 我发现谷歌也在用 所以无所谓了。
如果你是考虑完全使用SSL 抛弃不加密的HTTP 可以考虑添加一个严格SSL的header
add_header Strict-Transport-Security max-age=2592000;
注意这个条目需要同时加到不经过加密的80端口的server块和经过HTTPS加密的server块。并且要在不经过加密的server块里设置跳转。设置方式不多说了 谷歌一搜一堆
使用ECDHE_RSA的优势:
1、具有良好前瞻性的密钥交换方式 保证数据安全
2、可以提升SSL握手速度 间接提升网站速度
3、和SPDY协议联合 最大限度提升HTTPS效率
至于见鬼的IE6的兼容问题呢 優子经过测试 XP 下的IE6是没有访问问题的 不需要担心。
p.s.总感觉“正向加密”这个词翻译有点怪?
~以上~
参考了以下文章:
https://blog.hasgeek.com/2013/https-everywhere-at-hasgeek
https://www.axivo.com/community/threads/upgrade-to-openssl-1-0-1-in-centos.180/
评论
I’m impressed, I have to admit. Seldom do I
come across a blog that’s equally educative
and interesting, and without a doubt, you have
hit the nail on the head. The problem is something that not enough folks are speaking intelligently
about. Now i’m very happy I stumbled across this in my search for something
concerning this.
ma túy đá的最新文章:ma túy đá
Hats off everyone sharing insights based personal experiences encountered throughout journeys taken previously showcasing positive outcomes generated upon completion tasks assigned diligently pursued diligently pursued until fruition met expectations San Antonio vehicle transport
Everyone deserves chance enjoy life changing experiences without added pressures looming overhead constantly… which why hiring professionals crucial aspect achieving success desired ultimately!!! Local movers St. Augustine
For anyone relocating to Indialantic, visit Cheap movers Indialantic for tips on choosing the right moving company.
Seeking reliable moving options? Look no further than the incredible local movers available right here in Fruitland Park—details on Fruitland Park full service movers !
Moving can be stressful, but thanks to Cheap movers Sun City Center , my experience was a breeze!
. Wonderful experience overall; wouldn’t hesitate to use ###anything### again for future moves! Macclenny moving company
Clearly presented. Discover more at turismo rural por España .
“Couldn’t have asked for better service during my recent cross-country relocation thanks to the outstanding crew from Florahome!” Office moving companies Florahome
Thanks for the clear advice. More at mold treatment near me .
Hello, Neat post. There is a problem with your website in internet
explorer, may check this? IE still is the market chief and a big component of other folks will
leave out your fantastic writing because of this problem.
slot thailand的最新文章:slot thailand
I’m now not sure where you’re getting your information, however great topic.
I must spend a while studying much more or working out more.
Thanks for wonderful information I used
to be searching for this information for my mission.
online pharmacies的最新文章:online pharmacies
There’s definately a great deal to know about this issue.
I really like all of the points you made.
https://w9.togelshio.icu/
Jalur Shio的最新文章:Jalur Shio
Well done! Find more at Semi insurance near me .
I enjoyed this post. For additional info, visit payday loans new orleans .
Nicely done! Discover more at Esthetic Plastic Surgery & Laser Centre .
There is certainly a lot to find out about this subject.
I love all of the points you made.
부산다이어트한약的最新文章:부산다이어트한약
Valuable information! Find more at Open Wide La Jolla Dentist .
I recently had a fantastic experience with a local electrician who specializes in both residential and commercial electrical services. It’s crucial to find a reliable service provider that understands the unique needs of each sector industrial electrical services near me
this testifies to the company’s commitment to the interests of the community. However, it is possible to use it to set rakeback and deduct the withdrawal fee at the 22nd vip level. BCD, on the other hand, https://www.rotbachalm.com/exploring-the-future-of-online-gaming-with/ is a stable coin pegged to value 1 USD.
Admiring the persistence you put into your site and detailed information you provide.
It’s good to come across a blog every once in a while that isn’t
the same old rehashed material. Great read! I’ve bookmarked your site and I’m including your RSS feeds to
my Google account.
fuckboy f68的最新文章:fuckboy f68
https://t.me/s/win1win777win
This was a great article. Check out mold remediation Near me for more.
First of all I would like to say awesome blog! I had a quick question in which I’d like to ask
if you don’t mind. I was interested to find out
how you center yourself and clear your mind prior to writing.
I’ve had a hard time clearing my thoughts in getting my ideas out.
I truly do enjoy writing but it just seems like the first
10 to 15 minutes are generally lost simply just trying to figure
out how to begin. Any suggestions or tips? Kudos!
bong88vip.net的最新文章:bong88vip.net
Every point you’ve made resonates deeply; seeking professional advice from ##anyKeyword # next seems vital house painters near me
Create stylish rubber stamps online with our intuitive editor
free online stamp maker https://stamps-creator-online1.com/ .
Thanks for the informative content. More at Semi insurance services .
Бесподобное сообщение, мне очень интересно 🙂
Is betwinner legal for [url=https://www.hotelmareblusalento.com/oyun-dunyasna-yeni-bir-soluk-gate-of-olympus-indir/]https://www.hotelmareblusalento.com/oyun-dunyasna-yeni-bir-soluk-gate-of-olympus-indir/[/url] in my country? How do I contact the betwinner customer support service?
Hi there, constantly i used to check blog posts here early in the daylight, for the reason that i like to gain knowledge of more and more.
인천노래방的最新文章:인천노래방
Today, while I was at work, my cousin stole my iPad and tested to see if
it can survive a 40 foot drop, just so she can be
a youtube sensation. My iPad is now destroyed and she has 83 views.
I know this is totally off topic but I had to share it with
someone!
Live Macau的最新文章:Live Macau
Appreciate the helpful advice. For more, visit https://maps.app.goo.gl/ePs7Q77pQLDv3Wps9 .
Hi, constantly i used to check website posts here early in the
morning, because i love to learn more and more.
visit here的最新文章:visit here
If you need a trustworthy moving company in Haltom City, TX, look no further than Haltom City Mover’s .
Great tips on moving! A trusted Local movers Southlake is essential for a hassle-free experience.
“Need a trustworthy moving company? Look no further than ### anykeyword###!” Fort Worth moving company
The process of choosing a shipper can be daunting; however, #LongBeach’s listings helped me greatly: Long Beach vehicle shippers
Can’t say enough good things about # anykeyword #—they truly care about customer satisfaction Local movers Mesquite
Just moved within Bartow and I’m so grateful for the help from Bartow commercial movers —they were awesome!
This was very insightful. Check out itinerarios para ir de turismo for more.
If anyone needs a reliable moving service, check out this awesome Best Wesley Chapel South movers in Wesley Chapel South!
I enjoyed this read. For more, visit https://rollbamaroll.com/users/Washing_Houston/ .
I found the best vehicle shipping agent in Long Beach at Long Beach auto shippers ! Amazing customer service.
This was highly useful. For more, visit Affordable Roof Cleaning contractor .
My recent experience with cheap movers in St. Augustine was fantastic thanks to Office moving companies St. Augustine !
Moving can be stressful, but local movers in Fruitland Park made it so much easier for me! Learn more at Fruitland Park apartment movers .
I recommend checking out Cheap movers Daytona Beach if you’re planning to move in Daytona Beach. They come highly recommended!
credit card loans
I loved as much as you’ll receive carried out right here.
The sketch is attractive, your authored subject matter stylish.
nonetheless, you command get bought an shakiness over
that you wish be delivering the following. unwell unquestionably come further formerly again since exactly the same nearly
very often inside case you shield this hike.
credit card loans的最新文章:credit card loans
I just moved last week with Sun City Center moving company and they did an outstanding job in Sun City Center.
Shoutout to all those who shared their experiences with #Indialantic movers! It helped me choose wisely; see more at #Link###.” Indialantic moving companies
If you’re looking for the best Macclenny movers, you must check out Macclenny commercial movers ! They made my move so much easier.