else
{
genNames = new GeneralName[1];
try
{
genNames[0] = new GeneralName(new X509Name(
(ASN1Sequence)ASN1Sequence.fromByteArray(CertPathValidatorUtilities
.getEncodedIssuerPrincipal(cert).getEncoded())));
}
catch (IOException e)
{
throw new AnnotatedException("Could not read certificate issuer.", e);
}
}
for (int j = 0; j < genNames.length; j++)
{
Enumeration e = ASN1Sequence.getInstance(genNames[j].getName().getDERObject()).getObjects();
ASN1EncodableVector vec = new ASN1EncodableVector();
while (e.hasMoreElements())
{
vec.add((DEREncodable)e.nextElement());
}
vec.add(dpName.getName());
genNames[j] = new GeneralName(new X509Name(new DERSequence(vec)));
}
}
if (genNames != null)
{
for (int j = 0; j < genNames.length; j++)