subtrees.addSubtree(subtree);
// start the checking for each alt. name corresponding
// to current name_constraints[i]
boolean check_matching = true;
for (int j=0; j<alternative_names[i].length; j++) {
GeneralNames alt_names_extension = new GeneralNames();
if (alternative_names[i][j] == null) {
// double trick: turn the switch and check that the
// restrictions apply only when the specified name
// form is presented. If no name of the type is in the
// certificate, the certificate is acceptable.
check_matching = false;
} else {
alt_names_extension.addName(alternative_names[i][j]);
}
TestCert certificate = new TestCert(alt_names_extension);
certificate.setSubject(x500Subject);
certificate.setEncoding(getCertEncoding(nameSubject,
alt_names_extension));