* the encoding used for UserNotice text, DisplayText.CONTENT_TYPE_BMPSTRING, CONTENT_TYPE_UTF8STRING, CONTENT_TYPE_IA5STRING or CONTENT_TYPE_VISIBLESTRING
*
* @return PolicyQualifierInfo
*/
private PolicyQualifierInfo getPolicyQualifierInformation(final CertificatePolicy policy, final int displayencoding) {
PolicyQualifierInfo pqi = null;
final String qualifierId = policy.getQualifierId();
if ((qualifierId != null) && !StringUtils.isEmpty(qualifierId.trim())) {
final String qualifier = policy.getQualifier();
if ( (qualifier != null) && !StringUtils.isEmpty(qualifier.trim()) ) {
if (qualifierId.equals(PolicyQualifierId.id_qt_cps.getId())) {
pqi = new PolicyQualifierInfo(qualifier);
} else if (qualifierId.equals(PolicyQualifierId.id_qt_unotice.getId())){
// Normally we would just use 'DisplayText(unotice)' here. IE has problems with UTF8 though, so lets stick with BMSSTRING to satisfy Bills sick needs.
final UserNotice un = new UserNotice(null, new DisplayText(displayencoding, qualifier));
pqi = new PolicyQualifierInfo(PolicyQualifierId.id_qt_unotice, un);
}
}
}
return pqi;
}