Android 7不允许我的LetsEncrypt SSL证书 [英] Android 7 doesn't allow my LetsEncrypt SSL certificate
本文介绍了Android 7不允许我的LetsEncrypt SSL证书的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在自己的SSL证书链中使用了nginx,但是android 7出现了问题. 我不理解此解决方案.>
我的nginx配置是:
server {
listen 443 ssl;
listen [::]:443 ssl;
ssl_certificate /etc/letsencrypt/live/server.mydomain.cloud/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/server.mydomain.com/privkey.pem;
include snippets/ssl-params.conf;
我该怎么办?谢谢!
解决方案
我的解决方案,现在可以正常工作:
ConnectionSpec spec = new ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS)
.tlsVersions(TlsVersion.TLS_1_2)
.cipherSuites(
CipherSuite.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, //aws ssl
CipherSuite.TLS_DHE_RSA_WITH_AES_256_CBC_SHA) //letsencrypt
.build();
OkHttpClient.Builder builder = new OkHttpClient.Builder()
.connectionSpecs(Collections.singletonList(spec))
.addInterceptor(new HttpLoggingInterceptor().setLevel(HttpLoggingInterceptor.Level.BODY));
Parse.initialize(new Parse.Configuration.Builder(getApplicationContext())
.clientBuilder(builder)
.applicationId("")
.clientKey("")
.server("")
.build());
Im using nginx with my own SSL certificate chain but I'm getting a problem with android 7. I dont understand this solution.
My nginx configuration is:
server {
listen 443 ssl;
listen [::]:443 ssl;
ssl_certificate /etc/letsencrypt/live/server.mydomain.cloud/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/server.mydomain.com/privkey.pem;
include snippets/ssl-params.conf;
What should I do? Thanks!
解决方案
My solution, now its working:
ConnectionSpec spec = new ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS)
.tlsVersions(TlsVersion.TLS_1_2)
.cipherSuites(
CipherSuite.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, //aws ssl
CipherSuite.TLS_DHE_RSA_WITH_AES_256_CBC_SHA) //letsencrypt
.build();
OkHttpClient.Builder builder = new OkHttpClient.Builder()
.connectionSpecs(Collections.singletonList(spec))
.addInterceptor(new HttpLoggingInterceptor().setLevel(HttpLoggingInterceptor.Level.BODY));
Parse.initialize(new Parse.Configuration.Builder(getApplicationContext())
.clientBuilder(builder)
.applicationId("")
.clientKey("")
.server("")
.build());
这篇关于Android 7不允许我的LetsEncrypt SSL证书的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文