summaryrefslogtreecommitdiffstats
path: root/pki/base/migrate/72ToTxt/src/Main.java
diff options
context:
space:
mode:
authormharmsen <mharmsen@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2009-06-10 16:15:54 +0000
committermharmsen <mharmsen@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2009-06-10 16:15:54 +0000
commit896d10e3af28ac280684f802eb192c1ab25d8d02 (patch)
treeb2270868e405f13f5bc26c164a3ef1b056b3e6d0 /pki/base/migrate/72ToTxt/src/Main.java
parent7433e539c115c641849ddb3c8cda507e3042a579 (diff)
downloadpki-896d10e3af28ac280684f802eb192c1ab25d8d02.tar.gz
pki-896d10e3af28ac280684f802eb192c1ab25d8d02.tar.xz
pki-896d10e3af28ac280684f802eb192c1ab25d8d02.zip
Bugzilla Bug #504420 - Make certain that Array Types are processed prior to
non-Array types . . . Bugzilla Bug #483519 - rhcs73 migration tool misses iplanet case ERROR type - iplanet.security.x509.X509CertImpl[1,0] Bugzilla Bug #483373 - rhpki-migrate-7.3.0-9.el4 - TxtTo73/run.sh CLASSPATH uses TxtTo72 classes path Bugzilla Bug #451304 - 42ToTxt - Need to add i18n.jar to classpath for KRA LDIF conversion Bugzilla Bug #225031 - migrate/47ToTxt/run.sh against this sample ldif gives AuthToken=certSerialNo:[Ljava.math.BigInteger.... error. Bugzilla Bug #224972 - Migration / Upgrade script problems.... Bugzilla Bug #224801 - Upgrade script needs to change to drop those cert request which were created by old jars (iplanet) files Bugzilla Bug #224800 - txt to cms 62 upgrade script fails on some of the request. Bugzilla Bug #224763 - Migration scripts do not currently handle array of strings properly Bugzilla Bug #223360 - Upgrade tools does not currently handle some of the parameters. git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/trunk@573 c9f7a03b-bd48-0410-a16d-cbbf54688b0b
Diffstat (limited to 'pki/base/migrate/72ToTxt/src/Main.java')
-rw-r--r--pki/base/migrate/72ToTxt/src/Main.java38
1 files changed, 38 insertions, 0 deletions
diff --git a/pki/base/migrate/72ToTxt/src/Main.java b/pki/base/migrate/72ToTxt/src/Main.java
index 856e4209f..3bd1a333a 100644
--- a/pki/base/migrate/72ToTxt/src/Main.java
+++ b/pki/base/migrate/72ToTxt/src/Main.java
@@ -376,7 +376,23 @@ class CMS72LdifParser
System.out.println(" " +
key + ":" + o.getClass().getName() + "=" +
k + ":" + ob.getClass().getName() + "=" + ((java.util.Date)ob).getTime());
+ } else if (ob instanceof java.math.BigInteger[]) {
+ // Bugzilla Bug #225031 (a.k.a. - Raidzilla Bug #58356)
+ java.math.BigInteger in[] = (java.math.BigInteger[])ob;
+ String numbers = "";
+ for (int i = 0; i < in.length; i++) {
+ if (numbers.equals("")) {
+ numbers = in[i].toString();
+ } else {
+ numbers = numbers + "," + in[i].toString();
+ }
+ }
+ System.out.println(" " +
+ key + ":" + "com.netscape.certsrv.authentication.AuthToken" + "=" +
+ k + ":java.lang.String=" + numbers);
} else if (ob instanceof String[]) {
+ // Bugzilla Bug #224763 (a.k.a. - Raidzilla Bug #57949)
+ // Bugzilla Bug #252240
String str[] = (String[])ob;
String v = "";
if (str != null) {
@@ -406,10 +422,17 @@ class CMS72LdifParser
System.out.println(" " + key + ":Integer[" + in.length + "," + i + "]="+ in[i]);
}
} else if (obj instanceof BigInteger[]) {
+ // Bugzilla Bug #238779
BigInteger in[] = (BigInteger[])obj;
for (int i = 0; i < in.length; i++) {
System.out.println(" " + key + ":java.math.BigInteger[" + in.length + "," + i + "]="+ in[i]);
}
+ } else if (obj instanceof String[]) {
+ // Bugzilla Bug #223360 (a.k.a - Raidzilla Bug #58086)
+ String str[] = (String[])obj;
+ for (int i = 0; i < str.length; i++) {
+ System.out.println(" " + key + ":java.lang.String[" + str.length + "," + i + "]="+ str[i]);
+ }
} else if (obj instanceof netscape.security.x509.CertificateAlgorithmId) {
netscape.security.x509.CertificateAlgorithmId o =
(netscape.security.x509.CertificateAlgorithmId)obj;
@@ -437,6 +460,21 @@ class CMS72LdifParser
System.out.println(" " + key +
":byte[]="+
encoder.encode((byte[])obj));
+ } else if (obj instanceof java.util.Hashtable) {
+ // Bugzilla Bug #224800 (a.k.a - Raidzilla Bug #56953)
+ //
+ // Example: fingerprints:java.util.Hashtable=
+ // {SHA1=[B@52513a, MD5=[B@52c4d9, MD2=[B@799ff5}
+ //
+ java.util.Hashtable o = (java.util.Hashtable)obj;
+ BASE64Encoder encoder = new BASE64Encoder();
+ Enumeration e = o.elements();
+ while (e.hasMoreElements()) {
+ String k = (String)e.nextElement();
+ System.out.println(" " +
+ key + ":" + o.getClass().getName() + "=" +
+ k + "=" + encoder.encode((byte[])o.get(k)));
+ }
} else {
System.out.println(" " +
key + ":" + obj.getClass().getName() + "=" +