Bug 238779 - ERROR on migrate CA's Internal DB
Summary: ERROR on migrate CA's Internal DB
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Certificate System
Classification: Red Hat
Component: Migrate Tool (Show other bugs)
(Show other bugs)
Version: 7.2
Hardware: All Linux
high
high
Target Milestone: rc
: ---
Assignee: Bob Lord
QA Contact: Chandrasekar Kannan
URL:
Whiteboard:
Keywords:
Depends On: 1265731
Blocks: 443788
TreeView+ depends on / blocked
 
Reported: 2007-05-02 21:38 UTC by Issue Tracker
Modified: 2017-04-10 14:21 UTC (History)
3 users (show)

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


Attachments (Terms of Use)

Description Issue Tracker 2007-05-02 21:38:41 UTC
Escalated to Bugzilla from IssueTracker

Comment 2 Thomas Kwan 2007-05-02 23:33:51 UTC
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 23:41:43 UTC
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 15:31:23 UTC
User nkwan@redhat.com's account has been closed

Comment 7 Chandrasekar Kannan 2008-08-27 00:02:12 UTC
Bug already MODIFIED. setting target CS8.0 and marking screened+

Comment 8 Asha Akkiangady 2009-07-13 20:53:59 UTC
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.