tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cory Hubert" <clhub...@invertica.com>
Subject X509Certificate problem.
Date Thu, 01 Mar 2001 14:00:13 GMT

	Hello.  I am having trouble receive the client side certificate.   The bit
of code below always is a 0 length array.   HTTPS is setup correctly.   And
to double check to see if I have everything setup on the client side
correctly I went too
https://jnix.penguinpowered.com/x509authservletajpv11/SuperSnoop which
successfully retrieved my client side certificate.

	Any clues as of why my servlet would be always returning 0 client side
certificates?

-------------
			// Just to see all the attributes in the request
			System.out.println("Attributes");
			Enumeration n = request.getAttributeNames();

			while (n.hasMoreElements())
			{
				String name = (String)n.nextElement();
				System.out.println(name);
				System.out.println(request.getAttribute(name));
			}

	// Getting the client certificate

	X509Certificate[] b =
(X509Certificate[])request.getAttribute("javax.servlet.request.X509Certifica
te");
	System.out.println("How Many? " + b.length);

	for (int i =0; i < b.length; i++)
	{
		b[i].toString();
		System.out.println(b[i].getSigAlgName());
	}

------------

Outputs

------------

Attributes
javax.servlet.request.X509Certificate
[Ljava.security.cert.X509Certificate;@5d616e
org.apache.tomcat.servlet.resolved
/com.invertica.core.net.HTTPSTransport

How Many? 0

------------------

  Invertica
 :Cory L Hubert
 :Senior Software Engineer
 :[p]646-792-6588
 :[f]212-571-3588

Mime
View raw message