This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

FYI: getP() for DSA keys and parameter-spec returned q


Hi,

Raif Naffah found an embarressing bug in all DSA*.getP() methods.
They returned q, not p.

2002-12-03  Raif Naffah  <raif@fl.net.au>

        * java/security/spec/DSAParameterSpec.java (getP): Return p, not q.
        * java/security/spec/DSAPrivateKeySpec.java (getP): Likewise.
        * java/security/spec/DSAPublicKeySpec.java (getP): Likewise.

Committed as obvious.

Cheers,

Mark
Index: java/security/spec/DSAParameterSpec.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/security/spec/DSAParameterSpec.java,v
retrieving revision 1.2
diff -u -r1.2 DSAParameterSpec.java
--- java/security/spec/DSAParameterSpec.java	22 Jan 2002 22:40:35 -0000	1.2
+++ java/security/spec/DSAParameterSpec.java	3 Dec 2002 18:45:46 -0000
@@ -74,7 +74,7 @@
   */
   public BigInteger getP() 
   {
-    return this.q;
+    return this.p;
   }
 
   /**
Index: java/security/spec/DSAPrivateKeySpec.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/security/spec/DSAPrivateKeySpec.java,v
retrieving revision 1.2
diff -u -r1.2 DSAPrivateKeySpec.java
--- java/security/spec/DSAPrivateKeySpec.java	22 Jan 2002 22:40:35 -0000	1.2
+++ java/security/spec/DSAPrivateKeySpec.java	3 Dec 2002 18:45:46 -0000
@@ -87,7 +87,7 @@
   */
   public BigInteger getP() 
   {
-    return this.q;
+    return this.p;
   }
 
   /**
Index: java/security/spec/DSAPublicKeySpec.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/security/spec/DSAPublicKeySpec.java,v
retrieving revision 1.2
diff -u -r1.2 DSAPublicKeySpec.java
--- java/security/spec/DSAPublicKeySpec.java	22 Jan 2002 22:40:35 -0000	1.2
+++ java/security/spec/DSAPublicKeySpec.java	3 Dec 2002 18:45:46 -0000
@@ -87,7 +87,7 @@
   */
   public BigInteger getP() 
   {
-    return this.q;
+    return this.p;
   }
 
   /**

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]