final DERObject obj = getExtensionValue(x509cert, X509Extensions.QCStatements.getId());
if (obj == null) {
return null;
}
final ASN1Sequence seq = (ASN1Sequence)obj;
SemanticsInformation si = null;
// Look through all the QCStatements and see if we have a standard RFC3739 pkixQCSyntax
for (int i = 0; i < seq.size(); i++) {
final QCStatement qc = QCStatement.getInstance(seq.getObjectAt(i));
final DERObjectIdentifier oid = qc.getStatementId();
if ((oid != null) && (oid.equals(RFC3739QCObjectIdentifiers.id_qcs_pkixQCSyntax_v1) || oid.equals(RFC3739QCObjectIdentifiers.id_qcs_pkixQCSyntax_v2))) {
// We MAY have a SemanticsInformation object here
final ASN1Encodable enc = qc.getStatementInfo();
if (enc != null) {
si = SemanticsInformation.getInstance(enc);
// We can break the loop now, we got it!
break;
}
}
}
if (si != null) {
final GeneralName[] gns = si.getNameRegistrationAuthorities();
if (gns == null) {
return null;
}
final StringBuilder strBuf = new StringBuilder();
for (int i = 0; i < gns.length; i++) {