return true;
}
private void getClientCertificate()
{
HttpServletRequestImpl request = getRequestFacade();
String cipher = getHeader("SSL_CIPHER");
if (cipher == null)
cipher = getHeader("HTTPS_CIPHER");
if (cipher != null)
request.setAttribute("javax.servlet.request.cipher_suite", cipher);
String keySize = getHeader("SSL_CIPHER_USEKEYSIZE");
if (keySize == null)
keySize = getHeader("SSL_SECRETKEYSIZE");
if (keySize != null)
request.setAttribute("javax.servlet.request.key_size", keySize);
if (_clientCert.size() == 0)
return;
try {
CertificateFactory cf = CertificateFactory.getInstance("X.509");
InputStream is = _clientCert.createInputStream();
X509Certificate cert = (X509Certificate) cf.generateCertificate(is);
is.close();
request.setAttribute("javax.servlet.request.X509Certificate",
new X509Certificate[]{cert});
request.setAttribute(com.caucho.security.AbstractLogin.LOGIN_USER_NAME,
((X509Certificate) cert).getSubjectDN());
} catch (Exception e) {
log.log(Level.FINE, e.toString(), e);
}
}