Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #8077

Re: validation certificate agains cacert

From Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: validation certificate agains cacert
Date 2011-09-16 15:57 +0200
Organization A noiseless patient Spider
Message-ID <j4vksd$e4h$1@dont-email.me> (permalink)
References <47a06322-6497-421f-9572-705ae5bcb367@d2g2000vbk.googlegroups.com>

Show all headers | View raw


On 16/09/2011 08:50, Stone allegedly wrote:
> Dear programmers,
> 
> I would like to ask you if there is any way how to compare certificate
> against cacerts file.
> I have already loaded certificate in keystore like:
> 
> <snip />

Funny you should want to validate against the cacerts file in an
X509TrustManager, for, if I'm not mistaken, that is precisely what the
default TrustManager does. You might want to look for its source code
online (for instance here:
<http://www.docjar.com/docs/api/sun/security/ssl/package-index.html>).

Anyway, the task isn't complicated, although the code is somewhat
convoluted. You'll have to establish a chain (of certificates) from the
certificate you're trying to validate to one of the root certificates in
the trust store.

A quick search turned up this guide:
<http://download.oracle.com/javase/7/docs/technotes/guides/security/certpath/CertPathProgGuide.html>

-- 
DF.
Determinism trumps correctness.

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Find similar


Thread

validation certificate agains cacert Stone <phracek2@gmail.com> - 2011-09-15 23:50 -0700
  Re: validation certificate agains cacert Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2011-09-16 15:57 +0200

csiph-web