List of usage examples for org.bouncycastle.asn1.x500 AttributeTypeAndValue AttributeTypeAndValue
public AttributeTypeAndValue(ASN1ObjectIdentifier type, ASN1Encodable value)
From source file:org.kse.gui.dnchooser.RdnPanelList.java
License:Open Source License
public List<RDN> getRdns(boolean noEmptyRdns) { List<RDN> rdns = new ArrayList<RDN>(); for (RdnPanel rdnPanel : entries) { ASN1ObjectIdentifier attrType = OidDisplayNameMapping.getOidForDisplayName(rdnPanel.getAttributeName()); if (noEmptyRdns && StringUtils.trimAndConvertEmptyToNull(rdnPanel.getAttributeValue()) == null) { continue; }/*from www. j a va 2 s . c o m*/ ASN1Encodable attrValue = KseX500NameStyle.INSTANCE.stringToValue(attrType, rdnPanel.getAttributeValue()); rdns.add(new RDN(new AttributeTypeAndValue(attrType, attrValue))); } return rdns; }