summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorawnuk <awnuk@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2009-10-16 17:59:15 +0000
committerawnuk <awnuk@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2009-10-16 17:59:15 +0000
commitd5d1ba9b7c924e934af62f2f452fdba27f4d46b4 (patch)
tree776c4f66942ff3e0dd34f01ab4ac8fa253670aa1
parent4ff78eb97a4426175bd230cccd907fd05d7c31a7 (diff)
downloadpki-d5d1ba9b7c924e934af62f2f452fdba27f4d46b4.tar.gz
pki-d5d1ba9b7c924e934af62f2f452fdba27f4d46b4.tar.xz
pki-d5d1ba9b7c924e934af62f2f452fdba27f4d46b4.zip
Fixed bugzilla bug #529286.
Request attribute list extended with CN and UID. git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/trunk@800 c9f7a03b-bd48-0410-a16d-cbbf54688b0b
-rw-r--r--pki/base/common/src/com/netscape/cms/profile/common/EnrollProfile.java28
1 files changed, 28 insertions, 0 deletions
diff --git a/pki/base/common/src/com/netscape/cms/profile/common/EnrollProfile.java b/pki/base/common/src/com/netscape/cms/profile/common/EnrollProfile.java
index 064663583..d5e6d1299 100644
--- a/pki/base/common/src/com/netscape/cms/profile/common/EnrollProfile.java
+++ b/pki/base/common/src/com/netscape/cms/profile/common/EnrollProfile.java
@@ -819,6 +819,20 @@ public abstract class EnrollProfile extends BasicProfile
req.setExtData(REQUEST_SUBJECT_NAME,
new CertificateSubjectName(subject));
+ try {
+ String subjectCN = subject.getCommonName();
+ if (subjectCN == null) subjectCN = "";
+ req.setExtData(REQUEST_SUBJECT_NAME+".cn", subjectCN);
+ } catch (Exception ee) {
+ req.setExtData(REQUEST_SUBJECT_NAME+".cn", "");
+ }
+ try {
+ String subjectUID = subject.getUserID();
+ if (subjectUID == null) subjectUID = "";
+ req.setExtData(REQUEST_SUBJECT_NAME+".uid", subjectUID);
+ } catch (Exception ee) {
+ req.setExtData(REQUEST_SUBJECT_NAME+".uid", "");
+ }
}
// parse extensions
@@ -939,6 +953,20 @@ public abstract class EnrollProfile extends BasicProfile
req.setExtData(EnrollProfile.REQUEST_SUBJECT_NAME,
new CertificateSubjectName(pkcs10.getSubjectName()));
+ try {
+ String subjectCN = pkcs10.getSubjectName().getCommonName();
+ if (subjectCN == null) subjectCN = "";
+ req.setExtData(REQUEST_SUBJECT_NAME+".cn", subjectCN);
+ } catch (Exception ee) {
+ req.setExtData(REQUEST_SUBJECT_NAME+".cn", "");
+ }
+ try {
+ String subjectUID = pkcs10.getSubjectName().getUserID();
+ if (subjectUID == null) subjectUID = "";
+ req.setExtData(REQUEST_SUBJECT_NAME+".uid", subjectUID);
+ } catch (Exception ee) {
+ req.setExtData(REQUEST_SUBJECT_NAME+".uid", "");
+ }
info.set(X509CertInfo.KEY, certKey);