有没有一种方法可以手动控制浏览器的证书选择弹出窗口?

编程入门 行业动态 更新时间:2024-10-24 11:12:38
本文介绍了有没有一种方法可以手动控制浏览器的证书选择弹出窗口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想手动控制证书弹出窗口。例如,如果用户想使用客户端证书登录,我会提示一个证书选择窗口;如果他想使用用户名/密码登录。系统让他进入而不检查其证书。

I'd like to control certificate popup windows manually. For example, if an user wanna login with client-side-certificate, I prompts a certificate selection window; If he wanna login with username/password. System let him in without checking his certificate.

推荐答案

没有标准的API(或者我所知道的非标准API) ),以使用JavaScript或类似工具进行控制。

There are no standard APIs (or non-standard that I'm aware of) for controlling this with JavaScript or something similar.

我唯一想到的解决方案是拥有两个Web服务器。

The only solution I can think of is to have two webservers.

  • 一个用于显示链接到登录表单或客户端证书的网页,并且该服务器还实现登录表单。
  • 要求用户指定客户端证书。

您可以为两个服务器使用相同的通配符证书并将它们放在不同的子服务器上来解决此问题。 -domains,以便您实际上可以由2个不同的服务器(IP地址)支持此设置。

You could solve this using the same wildcard certificate for both servers and having them on different sub-domains so that you can actually back this setup by 2 different servers (IP addresses).

您可以使用同一台实际的物理服务器,并进行虚拟主机调度

You can use the same actual physical server, and do "virtual host" dispatching based on the IP, and you can use the same wildcard SSL certificate for both.

您需要不同的服务器的原因是: SSL客户端证书的提示是在SSL握手级别触发的,因此您不能使用基于名称的虚拟主机,而是需要2台实际服务器来完成。

The reason you need different servers is that the prompt for an SSL client certificate is triggered at the SSL handshake level, so you can't use name based virtual hosts, you need 2 actual servers to do it.

更多推荐

有没有一种方法可以手动控制浏览器的证书选择弹出窗口?

本文发布于:2023-11-11 06:24:38,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1577620.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:弹出窗口   浏览器   证书   方法

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!