Bug 238779 - ERROR on migrate CA's Internal DB
ERROR on migrate CA's Internal DB
Status: CLOSED ERRATA
Product: Red Hat Certificate System
Classification: Red Hat
Component: Migrate Tool (Show other bugs)
7.2
All Linux
high Severity high
: rc
: ---
Assigned To: Bob Lord
Chandrasekar Kannan
:
Depends On: 1265731
Blocks: 443788
  Show dependency treegraph
 
Reported: 2007-05-02 17:38 EDT by Issue Tracker
Modified: 2017-04-10 10 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-07-22 19:24:44 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Issue Tracker 2007-05-02 17:38:41 EDT
Escalated to Bugzilla from IssueTracker
Comment 2 Thomas Kwan 2007-05-02 19:33:51 EDT
71ToTxt does not have the logic to handle BigInteger array (i.e. BigInteger[]).
Added code to the trunk to do this.

[nkwan@water pkimigrate]$ svn diff
Index: 71ToTxt/src/Main.java
===================================================================
--- 71ToTxt/src/Main.java       (revision 14601)
+++ 71ToTxt/src/Main.java       (working copy)
@@ -30,6 +30,7 @@
 //

 import java.io.*;
+import java.math.*;
 import java.util.*;
 import sun.misc.*;
 import org.mozilla.jss.*;               // CMS 4.5 and later
@@ -389,6 +390,11 @@
                        for (int i = 0; i < in.length; i++) {
                                System.out.println(" " + key + ":Integer[" +
in.length + "," + i + "]="+ in[i]);
                        }
+               } else if (obj instanceof BigInteger[]) {
+                       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
netscape.security.x509.CertificateAlgorithmId) {
                        netscape.security.x509.CertificateAlgorithmId o =
                        (netscape.security.x509.CertificateAlgorithmId)obj;
Index: 71ToTxt/classes/Main.class
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: 71ToTxt/classes/CMS71LdifParser.class
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: TxtTo71/src/Main.java
===================================================================
--- TxtTo71/src/Main.java       (revision 14601)
+++ TxtTo71/src/Main.java       (working copy)
@@ -472,6 +472,15 @@
                           table.put(name, objs);
                        }
                        objs[index] = new Integer(value);
+               } else if (type.startsWith("java.math.BigInteger[")) {
+                       int size =
Integer.parseInt(type.substring(type.indexOf('[')+ 1, type.indexOf(',')));
+                       int index =
Integer.parseInt(type.substring(type.indexOf(',')+1, type.indexOf(']')));
+                       java.math.BigInteger objs[] =
(java.math.BigInteger[])table.get(name);
+                       if (objs == null) {
+                          objs = new java.math.BigInteger[size];
+                          table.put(name, objs);
+                       }
+                       objs[index] = new java.math.BigInteger(value);
                } else if (type.startsWith("byte[")) {
                                // byte array
                        BASE64Decoder decoder = new BASE64Decoder();
Index: TxtTo71/classes/Main.class
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: TxtTo71/classes/CMS71LdifParser.class
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: TxtTo71/classes/DummyAuthManager.class
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: 72ToTxt/src/Main.java
===================================================================
--- 72ToTxt/src/Main.java       (revision 14601)
+++ 72ToTxt/src/Main.java       (working copy)
@@ -30,6 +30,7 @@
 //

 import java.io.*;
+import java.math.*;
 import java.util.*;
 import sun.misc.*;
 import org.mozilla.jss.*;               // CMS 4.5 and later
@@ -391,6 +392,11 @@
                        for (int i = 0; i < in.length; i++) {
                                System.out.println(" " + key + ":Integer[" +
in.length + "," + i + "]="+ in[i]);
                        }
+        } else if (obj instanceof BigInteger[]) {
+            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
netscape.security.x509.CertificateAlgorithmId) {
                        netscape.security.x509.CertificateAlgorithmId o =
                        (netscape.security.x509.CertificateAlgorithmId)obj;
Index: 72ToTxt/classes/Main.class
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: 72ToTxt/classes/CMS72LdifParser.class
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: TxtTo72/src/Main.java
===================================================================
--- TxtTo72/src/Main.java       (revision 14601)
+++ TxtTo72/src/Main.java       (working copy)
@@ -476,6 +476,15 @@
                           table.put(name, objs);
                        }
                        objs[index] = new Integer(value);
+        } else if (type.startsWith("java.math.BigInteger[")) {
+            int size = Integer.parseInt(type.substring(type.indexOf('[')+ 1,
type.indexOf(',')));
+            int index = Integer.parseInt(type.substring(type.indexOf(',')+1,
type.indexOf(']')));
+            java.math.BigInteger objs[] = (java.math.BigInteger[])table.get(name);
+            if (objs == null) {
+               objs = new java.math.BigInteger[size];
+               table.put(name, objs);
+            }
+            objs[index] = new java.math.BigInteger(value);
                } else if (type.startsWith("byte[")) {
                                // byte array
                        BASE64Decoder decoder = new BASE64Decoder();
Index: TxtTo72/classes/Main.class
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: TxtTo72/classes/CMS72LdifParser.class
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: TxtTo72/classes/DummyAuthManager.class
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: 73ToTxt/src/Main.java
===================================================================
--- 73ToTxt/src/Main.java       (revision 14601)
+++ 73ToTxt/src/Main.java       (working copy)
@@ -29,6 +29,7 @@
 //      diff 70ToTxt/src/Main.java 71ToTxt/src/Main.java
 //

+import java.math.*;
 import java.io.*;
 import java.util.*;
 import sun.misc.*;
@@ -391,6 +392,11 @@
                        for (int i = 0; i < in.length; i++) {
                                System.out.println(" " + key + ":Integer[" +
in.length + "," + i + "]="+ in[i]);
                        }
+        } else if (obj instanceof BigInteger[]) {
+            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
netscape.security.x509.CertificateAlgorithmId) {
                        netscape.security.x509.CertificateAlgorithmId o =
                        (netscape.security.x509.CertificateAlgorithmId)obj;
Index: 73ToTxt/classes/Main.class
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: 73ToTxt/classes/CMS73LdifParser.class
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: TxtTo73/src/Main.java
===================================================================
--- TxtTo73/src/Main.java       (revision 14601)
+++ TxtTo73/src/Main.java       (working copy)
@@ -476,6 +476,15 @@
                           table.put(name, objs);
                        }
                        objs[index] = new Integer(value);
+        } else if (type.startsWith("java.math.BigInteger[")) {
+            int size = Integer.parseInt(type.substring(type.indexOf('[')+ 1,
type.indexOf(',')));
+            int index = Integer.parseInt(type.substring(type.indexOf(',')+1,
type.indexOf(']')));
+            java.math.BigInteger objs[] = (java.math.BigInteger[])table.get(name);
+            if (objs == null) {
+               objs = new java.math.BigInteger[size];
+               table.put(name, objs);
+            }
+            objs[index] = new java.math.BigInteger(value);
                } else if (type.startsWith("byte[")) {
                                // byte array
                        BASE64Decoder decoder = new BASE64Decoder();
Index: TxtTo73/classes/Main.class
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: TxtTo73/classes/CMS73LdifParser.class
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: TxtTo73/classes/DummyAuthManager.class
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
[nkwan@water pkimigrate]$

Comment 3 Thomas Kwan 2007-05-02 19:41:43 EDT
Ben, can you try my new migration binaries out? They are in

/home/nkwan/support/bugzilla/238779/usr/share/rhpki/migrate
Comment 6 Red Hat Bugzilla 2007-10-27 11:31:23 EDT
User nkwan@redhat.com's account has been closed
Comment 7 Chandrasekar Kannan 2008-08-26 20:02:12 EDT
Bug already MODIFIED. setting target CS8.0 and marking screened+
Comment 8 Asha Akkiangady 2009-07-13 16:53:59 EDT
Verified.

This issue is not seen during Ldap database migration from CS 7.1 to 8.0 following the instructions in  https://bugzilla.redhat.com/attachment.cgi?id=351188, hence putting the bug to verified status.

Note You need to log in before you can comment on or make changes to this bug.