我将 nginx 与我自己的 SSL 证书链一起使用,但我在 android 7 上遇到了问题。
我不明白这个解决方案 https://community.letsencrypt.org/t/android-doesnt-trust-the-certificate/16498/16.
我的 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());
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)