Attribute attrUserFn = null;
Attribute attrUserKeyId = null;
// Add friendlyName (if present)
if ((user_fn != null) && !user_fn.equals("")) {
ASN1ObjectIdentifier fnOID = new ASN1ObjectIdentifier(FN_OID_);
attrUserFn = new Attribute(fnOID, new ASN1BMPString(user_fn));
}
// add localKeyId (if present)
if ((lk_id != null) && (lk_id.length > 0)) {
ASN1ObjectIdentifier lkOID = new ASN1ObjectIdentifier(LK_OID_);
attrUserKeyId = new Attribute(lkOID, new ASN1OctetString(lk_id));
}
// both present -> add both
if ((user_fn != null) && (lk_id != null)) {