+ StringBuffer subject = new StringBuffer();
+ if (profile.getKeyName().equals("server") && pDNS != null) {
+ subject.append("/commonName=");
+ subject.append(pDNS);
+ } else {
+ subject.append("/commonName=");
+ subject.append(CN);
+ }
+ if (profile.getKeyName().equals("mail") && pMail != null) {
+ subject.append("/emailAddress=");
+ subject.append(pMail);
+ }