-
Notifications
You must be signed in to change notification settings - Fork 268
支持Https
Tamic (码小白) edited this page Jul 18, 2017
·
7 revisions
skipSSLSocketFactory(true)
如何快速支持Https
novate.addSSLSocketFactory(NovateHttpsFactroy.creatSSLSocketFactory(getApplicationContext(), "file.cer"));
test.cer放在assert文件夹下面。
int[] certificates = {R.raw.myssl1, R.raw.myssl2,......}
int[] hosts = {"https:// you hosturl2", "https:// you hosturl2",......}
novate.addSSL(hosts, certificates)
certificates
是你的ssl证书文件,在raw文件下的的id数组,项目中请放到raw资源文件夹下。