Hi, How do we perform the X509Certificate authentication in java? Say I have the sender certificate(which contains its public key), the singed data, and its signature. How do i verify this against the root trusted CA in cacerts to make sure that this certificate was actually given by a CA that we trusted? Thanks for any advise/recommend. Pen.
Joined: Oct 25, 2004
Hi, you need the SenderCert as x509certificateobject and the public key of the CA (or better the whole cert:-)). Than use the following:
This returns true if the sendercert is valid. Bye Mark
Joined: Feb 07, 2005
I did the verify against all certificate in cacerts file, but receive the error: Public key presented not for certificate signature eventhought my test sendercert was issued from Thawte and i did import thawte root in to cacerts as trustedcert. Thanks for any advise.
Joined: Jul 11, 2001
Moving to Security...
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus