Android SSL固定访问特定的URL而无需固定,而其他端点被固定

发布于 2025-02-13 09:33:44 字数 480 浏览 0 评论 0原文

所以我有一个问题。是否可以以 network_security_config.xml 可以访问域中的单个特定端点 不固定 ,而域中的每个单个 强制执行固定

示例:example.com/access_without_pin and example.com/*(其他每个端点)

我希望应用程序能够访问example.com/access.com/access_without_pin,即使没有固定在其他端点的位置(example.com/getuser等)被强制固定。

So I have a question. Is it possible to configure network_security_config.xml in a manner that a single specific endpoint in the domain can be accessed without pinning while every single other endpoint in the domain is enforced pinning.

Example: example.com/access_without_pin and example.com/* (every other single endpoint)

I want the application to be able to access example.com/access_without_pin even without pinning where as the other endpoints (example.com/getUser etc.) are enforced to be pinned.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

少女七分熟 2025-02-20 09:33:44

网络安全配置不可能。固定基于主机建立TLS连接时,端点只有在建立连接并满足固定要求时才很晚。

没有网络_security_config是可行的。例如,假设一个典型的OKHTTP+Retrofit堆栈,您可以设置一个带固定的堆栈实例,而另一个无需固定,然后在与端点通信时使用适当的堆栈。

It's not possible with network security config. Pinning is based on host when establishing TLS connection, the endpoint only matters much later when the connection has been established and pinning requirements are met.

Without network_security_config is doable. For example, assuming a typical okhttp+retrofit stack, you could set up one instance of the stack with pinning and another without pinning, and then use the appropriate stack when communicating with your endpoints.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文