X-Git-Url: https://code.wpia.club/?p=gigi.git;a=blobdiff_plain;f=src%2Forg%2Fcacert%2Fgigi%2Fpages%2Faccount%2Fcerts%2FCertificateRequest.java;h=bae43d589e6fae2dab514b3b925872e6289856cf;hp=ad915d7da370f4b0163ed456a38bc4539a9431fb;hb=15c3594cf26458503691dc1993bdd6b414cf83c6;hpb=b05ce94112d4aa98c6fe6eba0ceddf973d3f09b2 diff --git a/src/org/cacert/gigi/pages/account/certs/CertificateRequest.java b/src/org/cacert/gigi/pages/account/certs/CertificateRequest.java index ad915d7d..bae43d58 100644 --- a/src/org/cacert/gigi/pages/account/certs/CertificateRequest.java +++ b/src/org/cacert/gigi/pages/account/certs/CertificateRequest.java @@ -14,8 +14,6 @@ import java.util.LinkedHashSet; import java.util.Set; import java.util.TreeSet; -import javax.servlet.http.HttpServletRequest; - import org.cacert.gigi.GigiApiException; import org.cacert.gigi.crypto.SPKAC; import org.cacert.gigi.dbObjects.Certificate; @@ -300,7 +298,7 @@ public class CertificateRequest { return profile; } - public synchronized boolean update(String nameIn, String hashAlg, String profileStr, String newOrgStr, String ou, String SANsStr, PrintWriter out, HttpServletRequest req) throws GigiApiException { + public synchronized boolean update(String nameIn, String hashAlg, String profileStr, String newOrgStr, String ou, String SANsStr) throws GigiApiException { GigiApiException error = new GigiApiException(); this.name = nameIn; if (hashAlg != null) { @@ -365,7 +363,7 @@ public class CertificateRequest { } } error.mergeInto(new GigiApiException(SprintfCommand.createSimple(// - "The requested Subject alternate name \"{0}\" has been removed.", san.getType().toString().toLowerCase() + ":" + san.getName()))); + "The requested subject alternate name (SAN) \"{0}\" has been removed.", san.getType().toString().toLowerCase() + ":" + san.getName()))); } SANs = filteredSANs; } @@ -499,7 +497,7 @@ public class CertificateRequest { if (nullIsOK) { name = ""; } else if (realIsOK) { - name = u.getName().toString(); + name = u.getPreferredName().toString(); } } } else if (name == null || name.equals("")) { @@ -510,7 +508,7 @@ public class CertificateRequest { if (defaultIsOK) { name = DEFAULT_CN; } else if (realIsOK) { - name = u.getName().toString(); + name = u.getPreferredName().toString(); } } } else { @@ -543,12 +541,12 @@ public class CertificateRequest { verifiedCN = name; } else { if (nameTemp.isRequired()) { - error.mergeInto(new GigiApiException("The name entered, does not match the details in your account. You cannot issue certificates with this name. Enter a name that matches the one that has been assured in your account, because a name is required for this certificate type.")); + error.mergeInto(new GigiApiException("The name entered, does not match the details in your account. You cannot issue certificates with this name. Enter a name that matches the one that has been verified in your account, because a name is required for this certificate type.")); } else if (name.equals(DEFAULT_CN)) { verifiedCN = DEFAULT_CN; } else { name = DEFAULT_CN; - error.mergeInto(new GigiApiException("The name entered, does not match the details in your account. You cannot issue certificates with this name. Enter a name that matches the one that has been assured in your account or keep the default name.")); + error.mergeInto(new GigiApiException("The name entered, does not match the details in your account. You cannot issue certificates with this name. Enter a name that matches the one that has been verified in your account or keep the default name.")); } } } else {