export client certificate CN?

export client certificate CN?

am 22.08.2005 18:17:59 von August West

I am currently using mod_ssl to verify client certs.
are issued by trusted CAs (e.g. SSLVerifyClient
require), but then using username/password for
application identification/authorization, passing this
to Oracle via Tomcat using JAVA. However, I'd like to
be able to use client certs. for I/A by exporting the
CN (or perhaps serial number) when verifying. I have
tried to add "SSLOptions +ExportCertData", but I am
not sure where this data is being exported too! This
seemed like the appropriate SSL Option to be able to
parse the cert data, but please correct me if I am
wrong. Does anyone have any implementation
suggestions exporting the CN from client certs,
particularly for retrieving this information with
JAVA?
TIA!

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around=20
http://mail.yahoo.com=20
____________________________________________________________ __________
Apache Interface to OpenSSL (mod_ssl) www.modssl.org
User Support Mailing List modssl-users@modssl.org
Automated List Manager majordomo@modssl.org

Re: export client certificate CN?

am 22.08.2005 19:46:04 von Andrew Musselman

I am trying to use mod_auth_ldap with apache2, and I am having trouble
figuring out how to generate a trusted Certificate Authority
certificate. I tried using the Netscape certificate database file as
the apache docs suggest, but I'm still getting a complaint from LDAP
that "LDAP: ssl connections not supported".

Can I use openssl to make a DER_FILE or a BASE64_FILE? Has anyone here
had experience getting this to work?

Thanks for your time.

Best,
Andrew

I am totally lost on this. I appreciate any help
>>> junglist2000@YAHOO.com 8/22/2005 9:17 AM >>>
I am currently using mod_ssl to verify client certs.
are issued by trusted CAs (e.g. SSLVerifyClient
require), but then using username/password for
application identification/authorization, passing this
to Oracle via Tomcat using JAVA. However, I'd like to
be able to use client certs. for I/A by exporting the
CN (or perhaps serial number) when verifying. I have
tried to add "SSLOptions +ExportCertData", but I am
not sure where this data is being exported too! This
seemed like the appropriate SSL Option to be able to
parse the cert data, but please correct me if I am
wrong. Does anyone have any implementation
suggestions exporting the CN from client certs,
particularly for retrieving this information with
JAVA?
TIA!

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
____________________________________________________________ __________
Apache Interface to OpenSSL (mod_ssl) www.modssl.org

User Support Mailing List modssl-users@modssl.org

Automated List Manager majordomo@modssl.org

Andrew Musselman
andrew@cwu.edu
____________________________________________________________ __________
Apache Interface to OpenSSL (mod_ssl) www.modssl.org
User Support Mailing List modssl-users@modssl.org
Automated List Manager majordomo@modssl.org

RE: export client certificate CN?

am 22.08.2005 20:20:31 von GaydoshA

>I am trying to use mod_auth_ldap with apache2, and I am having=20
>trouble figuring out how to generate a trusted Certificate=20
>Authority certificate. I tried using the Netscape certificate=20
>database file as the apache docs suggest, but I'm still=20
>getting a complaint from LDAP that "LDAP: ssl connections not=20
>supported".

Not sure but this sounds like you haven't enabled SSL, not that it cant
negotiate the session.=20

>Can I use openssl to make a DER_FILE or a BASE64_FILE? Has=20
>anyone here had experience getting this to work?

Here's how I've generated server cert requests (PKCS #10 which works
fine with Netscape):
openssl req -config openssl.cnf -new -out hostname.csr
openssl rsa -in privkey.pem -out hostname.key

Then you'll need to tell point apache to the right certs:
SSLCertificateFile /server.crt
SSLCertificateKeyFile /server.key
SLCACertificateFile /CA.crt

If you want to generate the certs yourself rather then submit the CSRs
to a CA:
openssl x509 -in hostname.csr -out hostname.crt -req -signkey
hostname.key -days 365
____________________________________________________________ __________
Apache Interface to OpenSSL (mod_ssl) www.modssl.org
User Support Mailing List modssl-users@modssl.org
Automated List Manager majordomo@modssl.org

RE: export client certificate CN?

am 23.08.2005 15:56:50 von Hoda Nadeem

This is a multi-part message in MIME format.

------_=_NextPart_001_01C5A7EA.93BCB2EF
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Add the following line to you httpd configuration:=20

JkEnvVar SSL_CLIENT_S_DN none

JkEnvVar SSL_CLIENT_CERT none

This will make the client cert and distinguished name available through =
Apache enviroment variables.

Then in Java (within a JSP/servlet):

String DN =3D (String) request.getAttribute("SSL_CLIENT_S_DN"); // can =
also get the whole cert: SSL_CLIENT_CERT

And parse out the common name.

Nadeem


________________________________

From: owner-modssl-users@modssl.org on behalf of August West
Sent: Mon 8/22/2005 12:17 PM
To: modssl-users@modssl.org
Subject: export client certificate CN?



I am currently using mod_ssl to verify client certs.
are issued by trusted CAs (e.g. SSLVerifyClient
require), but then using username/password for
application identification/authorization, passing this
to Oracle via Tomcat using JAVA. However, I'd like to
be able to use client certs. for I/A by exporting the
CN (or perhaps serial number) when verifying. I have
tried to add "SSLOptions +ExportCertData", but I am
not sure where this data is being exported too! This
seemed like the appropriate SSL Option to be able to
parse the cert data, but please correct me if I am
wrong. Does anyone have any implementation
suggestions exporting the CN from client certs,
particularly for retrieving this information with
JAVA?
TIA!

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
____________________________________________________________ __________
Apache Interface to OpenSSL (mod_ssl) www.modssl.org
User Support Mailing List modssl-users@modssl.org
Automated List Manager majordomo@modssl.org



------_=_NextPart_001_01C5A7EA.93BCB2EF
Content-Type: application/ms-tnef;
name="winmail.dat"
Content-Transfer-Encoding: base64

eJ8+IhQNAQaQCAAEAAAAAAABAAEAAQeQBgAIAAAA5AQAAAAAAADoAAEIgAcA GAAAAElQTS5NaWNy
b3NvZnQgTWFpbC5Ob3RlADEIAQ2ABAACAAAAAgACAAEEgAEAIgAAAFJFOiBl eHBvcnQgY2xpZW50
IGNlcnRpZmljYXRlIENOPwDFCwEFgAMADgAAANUHCAAXAAkAOAAyAAIAcAEB IIADAA4AAADVBwgA
FwAJADkAEwACAFIBAQmAAQAhAAAAMzRCMTY4QzY4NDUyOTk0RTk1NEExMTIz MTFCRjZGNTkA/QYB
A5AGADATAAA4AAAAAwA2AAAAAABAADkAZ4KeguqnxQEeAD0AAQAAAAUAAABS RTogAAAAAAIBRwAB
AAAAPAAAAGM9VVM7YT0gO3A9Qm9veiBBbGxlbiBIYW1pbDtsPU1DTE5FWFZT MDctMDUwODIzMTM1
NzE5Wi0xOTc5AB4ASQABAAAAHgAAAGV4cG9ydCBjbGllbnQgY2VydGlmaWNh dGUgQ04/A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M2MDhGMTZFNzcyODM2QE1D TE5FWFZTMDcucmVz
b3VyY2UuZHMuYmFoLmNvbT4Amuk=

------_=_NextPart_001_01C5A7EA.93BCB2EF--
____________________________________________________________ __________
Apache Interface to OpenSSL (mod_ssl) www.modssl.org
User Support Mailing List modssl-users@modssl.org
Automated List Manager majordomo@modssl.org