Android11和Freeradius3的EAP-TLS失败
创始人
2024-08-20 10:30:17
0

最近在将应用程序更新到Android 11后,发现与Freeradius 3服务器的EAP-TLS身份验证失败。此外,通过日志可以看到以下错误消息“TLS alert read: fatal: protocol version”。

为了解决这个问题,我们需要在Freeradius 3服务器上启用TLS 1.3支持。这可以通过编辑该服务器上的Radius配置文件来完成。

在/etc/raddb/mods-enabled/eap中找到“ttls”和“tls”模块的配置文件。将ssl_version设置为“tlsv1.3”,如下所示:

tls { private_key_password = %{User-Password} private_key_file = ${certdir}/server.key certificate_file = ${certdir}/server.crt dh_file = ${certdir}/dh # 必要时可以使用 random_file = /dev/urandom cipher_list = TLSv1.3:!aNULL:!eNULL:!EXPORT:!SSLv2:!MD5:!DES:!LOW:!EXP:!DSS:!RC4:!SEED:!IDEA:@STRENGTH verify_peer = yes fail = no ca_path = ${cadir} tls_max_version = "TLSv1.3" tls_min_version = "TLSv1.3" }

ttls { # 这里也要设置为tlsv1.3 ssl_version = tlsv1.3 certificate_file = ${certdir}/server.crt private_key_file = ${certdir}/server.key ca_file = ${cadir}/ca.crt verify_depth = 10 cipher_list = "HIGH" }

让上述更改生效,必须重启Freeradius服务器。

如果您在使用自己签名的证书,则还必须在Android 11设备上安装该证书。以下是示例代码:

KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); keyStore.load(null, null); CertificateUtility certificateUtility = new CertificateUtility(context); List certificateList = certificateUtility.getCertificateChain(); for (X509Certificate certificate : certificateList) { String alias = certificate.getSubjectDN().getName(); keyStore.setCertificateEntry(alias, certificate); }

TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); trustManagerFactory.init(keyStore);

SSLContext sslContext = SSLContext.getInstance("TLS"); sslContext.init(null, trustManagerFactory.getTrustManagers(), null);

URLConnection urlConnection = url.openConnection(); if (urlConnection instanceof Https

相关内容

热门资讯

黑科技科技(wepoke智能a... 黑科技科技(wepoke智能ai)wepower使用说明书(wepOkE)素来是真的有挂(确实有挂)...
黑科技模拟器(wepoke智能... WePoker透视辅助工具核心要点解析‌,黑科技模拟器(wepoke智能ai)wepoke是机器发牌...
黑科技脚本(wepokeai代... 您好,这款游戏可以开挂的,确实是有挂的,需要了解加微【136704302】很多玩家在这款游戏中打牌都...
黑科技辅助挂(wepoke真的... 黑科技辅助挂(wepoke真的有挂)wepoke 软件(wEPOKE)固有真的有挂(有挂猫腻)-哔哩...
黑科技辅助挂(wepoke黑科... 黑科技辅助挂(wepoke黑科技)wepoke软件透明挂演示(wEpOke)一直真的有挂(真的有挂)...
黑科技app(wepoke真的... 此外,数据分析德州()辅助神器app还具备辅助透视行为开挂功能,通过对客户透明挂的深入研究,你可以了...
黑科技智能ai(wepoke辅... 黑科技智能ai(wepoke辅助插件)wepoke软件透明(WEPOke)先前是有挂(果真有挂)-哔...
黑科技模拟器(wepoke透明... 黑科技模拟器(wepoke透明黑科技)wepoke德州扑克用ai代打(WEPOKE)最初存在有挂(有...
黑科技插件(wepoke辅助插... 黑科技插件(wepoke辅助插件)wepoke软件透明(WEPOke)从来是真的有挂(有挂解惑)-哔...
黑科技美元局(wepoke智能... 黑科技美元局(wepoke智能ai)wepoke辅助真的假的(wepoKE)原先真的有挂(竟然有挂)...