EVALUATION
Technically, it isn't a bug, since VeriSign is sending an out-of-order TLS cert chain, however every browser I tested is able to fix the order, validate the chain, and make a secure connection, so we should do likewise.
|
|
|
SUGGESTED FIX
$ sccs diffs src/share/classes/sun/security/validator/PKIXValidator.java
------- PKIXValidator.java -------
4c4
< * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
---
> * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
121c121,123
< // check if chain contains trust anchor
---
> // check that chain is in correct order and check if chain contains
> // trust anchor
> X500Principal prevIssuer = null;
123c125,131
< if (trustedCerts.contains(chain[i])) {
---
> X509Certificate cert = chain[i];
> if (i != 0 &&
> !cert.getSubjectX500Principal().equals(prevIssuer)) {
> // chain is not ordered correctly, call builder instead
> return doBuild(chain, otherCerts);
> }
> if (trustedCerts.contains(cert)) {
131a140
> prevIssuer = cert.getIssuerX500Principal();225d233
225d233
<
|
|
|
|