AndroidN有一个networksecurityconfiguration用于证书固定、自签名证书支持(包括仅调试变体)等的系统。它非常漂亮。我一直在尝试向后移植它,以防谷歌不这样做,因为在Android6.0和更旧的设备上使用其中的一些功能会很好。Thesourcecodeforthenetworksecurityconfigurationsupport很容易找到,该链接指向android-n-preview-3标签。该来源指的是concrypt,describedoh-so-helpfully作为“使用OpenSSL的Java安全提供程序”。但是,带有android-n-pre