一、需求
iOS9中新增App Transport Security(简称ATS)特性, 主要使到原来请求的时候用到的HTTP,都转向TLS1.2协议进行传输。这也意味着所有的HTTP协议都强制使用了HTTPS协议进行传输。因此移动api需要配置为https并且要支持tls 1.2
二、项目情况
服务器端:公司的服务器的采用的操作系统是centos,开发语言php,web容器采用的nginx。
客户端:ios android
客户端和服务的通信采用http和json
app内的部分功能通过webbiew加载h5完成。
三、最终配置成功
nginx.conf中的相关配置如下:
server
{
server_name mobileapi.xx.com;
index index.html index.htm index.php default.html default.htm default.php;
root /home/wwwroot/mobileapi.xx.com/web;
listen 443 ssl;
ssl on;
ssl_certificate /home/wwwroot/ssl.xx.com/xx.crt;
ssl_certificate_key /home/wwwroot/ssl.xx.com/xx.key;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers AESGCM:ALL:!DH:!EXPORT:!RC4:+HIGH:!MEDIUM:!LOW:!aNULL:!eNULL;
ssl_prefer_server_ciphers on;
include none.conf;
location ~ .*\.(php|php5)?$
{
try_files $uri =404;
#fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_pass unix:/dev/shm/php-cgi.sock;
fastcgi_index index.php;
include fcgi.conf;
}
location /{
if (!-e $request_filename){
rewrite ^/(.*) /index.php last;
}
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
access_log off;
}
四、关键软件的版本
nginx 1.11.7
openssl 1.0.1e-fips
contos 6.3
五、nginx和openssl安装
openssl安装yum install openssl
从官网下载nginx 1.11.7
nginx安装命令:./configure --prefix=/usr/local/nginx1_11_7 --with-http_ssl_module
六、测试方法
nscurl --ats-diagnostics https://mobileapi.xx.com
如果全部pass 证明配置成功
七、遇到的坑
nginx当时是1.4.4版本太低,不支持tls 1.2
openssl版本太低,当时是0.9.8e
CentOS 如果是5.x的,升级openssl要手工,没法用yum
七、参考资料
https://my.oschina.net/vimfung/blog/494687
https://zhidao.baidu.com/question/1114939951869020059.html
http://blog.sina.com.cn/s/blog_4e11d20b0102vmne.html
http://bguncle.blog.51cto.com/3184079/1392870/
http://www.cnblogs.com/hitwtx/archive/2012/02/13/2349742.html
https://my.oschina.net/u/1423896/blog/267511
分享到:
相关推荐
前言 2017年1月1日起App Store上的所有App应用将强制开启ATS功能。 苹果的ATS(App ...在网上找了一大堆各种配置证书服务的文章,在ios端运行的时候总是直接报错,很是费解,后来注意到必须是TLS1.2或者更高的版
本资源包含一个 openssl 工具安装包 Win32OpenSSL-...关于tomcat 进行配置 ssl 证书、完全 TLS v1.2、完全正向加密的具体步骤可以参考博客《为通过 ATS 检测 Tomcat 完全 TLS v1.2、完全正向加密及其结果检验》,地址:...
设置完成后,使用这个工具,可以在线检测网站的SSL证书是否安全,是否存在漏洞,是否达到ssL行业标准,符合苹果ATS规范,能否通过微信小程序安全要求。同时提供证书格式转换,CSR,证书链,SSL配置生成等。
双模蓝牙芯片数据手册 Low Power Solution for portable & wireless audio applications Bluetooth V4.2 104MHz MIPS32 + 180M CEVA DSP
一、环境: CentOS 6.8 nginx 1.6.0 ...二、背景 最近开发一个小程序,而小程序对后台接口...2017年1月1日起,苹果强制所有 app 满足 HTTPS,即 iOS9 推出的 App Transport Security (ATS) 特性。 访问 https://www.q
主要介绍了iOS10 ATS 配置详细介绍的相关资料,这里举例说明该如何配置,需要的朋友可以参考下
- 需要配置符合 PFS 规范的加密套餐,目前推荐配置:- 需要在服务端 TLS 协议中启用 TLS1.2,目前推荐配置:Nginx 证书配置更新 Nginx
通过IOS-ATS检测版本apatch配置,解压开 安装https openssl 把对应的so放入到mouad里面去 然后根据配置文件进行 操作
IOS 9 App Transport Security 详解。
基于ATS单片机交通灯控制新版系统的设计.doc
基于ATS单片机的温湿度检验专业系统设计.doc
基于ATS的玩具电子琴设计.docx
基于ats和电子时钟的设计.docx
基于ATS单片机的简易频率计设计(完整资料).doc
基于ATS单片机的教室灯光智能控制新版专业系统设计.docx
TWS蓝牙耳机,低延时
基于ATS单片机的教室灯光智能控制系统设计(完整资料).doc
基于ATS单片机智能超声波避障PPT学习教案.pptx
基于ATS的电烤箱温控制系统PPT学习教案.pptx