简体   繁体   English

要求数字证书

[英]Asking for digital certificate

I think this has to be very easy, but I am a bit lost. 我认为这必须非常容易,但是我有点迷茫。

The issue is very simple, I have a web app that has to login using digital certificate. 问题非常简单,我有一个必须使用数字证书登录的Web应用程序。 I have never managed digital certificates before, so I tried to copy the way other apps we have do it. 我以前从未管理过数字证书,因此我尝试复制我们拥有的其他应用程序的方式。 In login controller: 在登录控制器中:

    NegocioException.assertTrue(request.getAttribute(ConpactConstantes.ATRIBUTO_CERTIFICADO) != null, "Para acceder al sistema ha de indicarse el certificado digital.");
    X509Certificate[] certificados = (X509Certificate[]) request.getAttribute(ConpactConstantes.ATRIBUTO_CERTIFICADO);
    X509Certificate certificado = certificados[0];

when we I press the login button, I have NO window asking for the certificate, as the other apps do, and when doing: request.getAttribute(ConpactConstantes.ATRIBUTO_CERTIFICADO) I obtain null. 当我按下登录按钮时,没有其他应用程序这样做的情况,也没有窗口要求证书;在这样做时: request.getAttribute(ConpactConstantes.ATRIBUTO_CERTIFICADO)我获得了null。

How can I trigger the window to select the certificate? 如何触发选择证书的窗口? Using weblogic 10.3.6 使用weblogic 10.3.6

The correct name of the attribute is javax.servlet.request.X509Certificate (Servlet Specification 3.0 #3.8). 该属性的正确名称是javax.servlet.request.X509Certificate (Servlet规范3.0#3.8)。 It is indeed supplied as an X509Certificate[] . 实际上,它作为X509Certificate[] You have to configure your servlet or J2EE container to request or require the client certificate. 您必须配置servlet或J2EE容器以请求或要求客户机证书。 If it isn't present it wasn't supplied. 如果不存在,则不提供。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM