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: Classpath java.security resync


Hi,

I am committing the following changes from Classpath to get us back in
sync with the Classpath java.security classes:

2002-10-04  C. Scott Ananian <cananian@lesser-magoo.lcs.mit.edu>
	
    * java/lang/ProtectionDomain.java (linesep): Remove field.
    (toString): Use System.getProperty("line.separator").

2002-10-02  Michael Koch  <konqueror@gmx.de>

    * java/security/Identity.java: Added serialVersionUID.
    * java/security/KeyPair.java: Added serialVersionUID.
    * java/security/Provider.java: Added serialVersionUID.
    * java/security/SecureRandom.java: Added serialVersionUID.
    * java/security/SecureRandomSpi.java: Added serialVersionUID.
    * java/security/SignedObject.java: Added serialVersionUID.
    * java/security/cert/Certificate.java: Added serialVersionUID.

2002-10-04  Mark Wielaard <mark@klomp.org>

    * java/security/Security.java: Use java.home or gnu.classpath.home
    to load providers.
    (loadProviders): Extra dir argument.
    (getProvider): Return null when not found.

That last one does not actually fix PR libgcj/7416, but probably does
make it a little easier to fix.

I am working with Raif Naffah the gnu.crypto maintainer to get some
other security fixes in to get gnu.crypto working out of the box with
libgcj. Hopefully we can finish that work before the gcc 3.3 branch on
October 15.

Cheers,

Mark
-- 
No.
> Should I include quotations after my reply?
Index: java/security/Identity.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/security/Identity.java,v
retrieving revision 1.2
diff -u -r1.2 Identity.java
--- java/security/Identity.java	22 Jan 2002 22:40:30 -0000	1.2
+++ java/security/Identity.java	4 Oct 2002 20:12:35 -0000
@@ -64,6 +64,8 @@
  */
 public abstract class Identity implements Principal, Serializable
 {
+  static final long serialVersionUID = 3609922007826600659L;
+
   private String name;
   private IdentityScope scope;
   private PublicKey publicKey;
Index: java/security/KeyPair.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/security/KeyPair.java,v
retrieving revision 1.4
diff -u -r1.4 KeyPair.java
--- java/security/KeyPair.java	22 Jan 2002 22:40:30 -0000	1.4
+++ java/security/KeyPair.java	4 Oct 2002 20:12:35 -0000
@@ -48,6 +48,8 @@
  */
 public final class KeyPair implements Serializable
 {
+  static final long serialVersionUID = -7565189502268009837L;
+
   private PublicKey publicKey;
   private PrivateKey privateKey;
 
Index: java/security/ProtectionDomain.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/security/ProtectionDomain.java,v
retrieving revision 1.3
diff -u -r1.3 ProtectionDomain.java
--- java/security/ProtectionDomain.java	24 May 2002 11:57:22 -0000	1.3
+++ java/security/ProtectionDomain.java	4 Oct 2002 20:12:35 -0000
@@ -53,8 +53,6 @@
  */
 public class ProtectionDomain
 {
-  private static final String linesep = System.getProperty("line.separator");
-
   /**
    * This is the <code>CodeSource</code> for this protection domain
    */
@@ -131,6 +129,7 @@
    */
   public String toString()
   {
+    String linesep = System.getProperty("line.separator");
     StringBuffer sb = new StringBuffer("");
     sb.append("ProtectionDomain (" + linesep);
     if (code_source == null)
Index: java/security/Provider.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/security/Provider.java,v
retrieving revision 1.5
diff -u -r1.5 Provider.java
--- java/security/Provider.java	22 Jan 2002 22:40:30 -0000	1.5
+++ java/security/Provider.java	4 Oct 2002 20:12:35 -0000
@@ -56,6 +56,8 @@
  */
 public abstract class Provider extends Properties implements Serializable
 {
+  static final long serialVersionUID = -4298000515446427739L;
+
   /**
    * This is a textual description of the provider
    */
Index: java/security/SecureRandom.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/security/SecureRandom.java,v
retrieving revision 1.5
diff -u -r1.5 SecureRandom.java
--- java/security/SecureRandom.java	22 Jan 2002 22:40:30 -0000	1.5
+++ java/security/SecureRandom.java	4 Oct 2002 20:12:35 -0000
@@ -49,6 +49,8 @@
  */
 public class SecureRandom extends Random
 {
+  static final long serialVersionUID = 4940670005562187L;
+
   //Serialized Field
   long counter = 0;		//Serialized
   MessageDigest digest = null;
Index: java/security/SecureRandomSpi.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/security/SecureRandomSpi.java,v
retrieving revision 1.2
diff -u -r1.2 SecureRandomSpi.java
--- java/security/SecureRandomSpi.java	22 Jan 2002 22:40:30 -0000	1.2
+++ java/security/SecureRandomSpi.java	4 Oct 2002 20:12:35 -0000
@@ -50,6 +50,8 @@
  */
 public abstract class SecureRandomSpi implements Serializable
 {
+  static final long serialVersionUID = -2991854161009191830L;
+
   /**
      Default Constructor for SecureRandomSpi
    */
Index: java/security/Security.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/security/Security.java,v
retrieving revision 1.7
diff -u -r1.7 Security.java
--- java/security/Security.java	22 Jan 2002 22:40:30 -0000	1.7
+++ java/security/Security.java	4 Oct 2002 20:12:35 -0000
@@ -59,8 +59,9 @@
 
   static
   {
-    loadProviders(System.getProperty("java.vm.name"));
-    loadProviders("classpath");
+    loadProviders(System.getProperty("java.home"),
+		  System.getProperty("java.vm.name"));
+    loadProviders(System.getProperty("gnu.classpath.home"), "classpath");
   }
 
   // This class can't be instantiated.
@@ -68,13 +69,13 @@
   {
   }
 
-  private static void loadProviders(String vendor)
+  private static void loadProviders(String dir, String vendor)
   {
-    if (vendor == null)
+    if (dir == null || vendor == null)
       return;
 
     String separator = System.getProperty("file.separator");
-    String secfilestr = (System.getProperty("java.home") +
+    String secfilestr = (dir +
 			 separator + "lib" +
 			 separator + "security" +
 			 separator + vendor + ".security");
@@ -263,15 +264,15 @@
    */
   public static Provider getProvider(String name)
   {
-    Provider p = null;
+    Provider p;
     int max = providers.size ();
     for (int i = 0; i < max; i++)
       {
 	p = (Provider) providers.elementAt(i);
 	if (p.getName() == name)
-	  break;
+	  return p;
       }
-    return p;
+    return null;
   }
 
   /**
Index: java/security/SignedObject.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/security/SignedObject.java,v
retrieving revision 1.3
diff -u -r1.3 SignedObject.java
--- java/security/SignedObject.java	22 Jan 2002 22:40:30 -0000	1.3
+++ java/security/SignedObject.java	4 Oct 2002 20:12:35 -0000
@@ -79,6 +79,8 @@
  */
 public final class SignedObject implements Serializable
 {
+  static final long serialVersionUID = 720502720485447167L;
+
   private byte[] content;
   private byte[] signature;
   private String thealgorithm;
Index: java/security/cert/Certificate.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/security/cert/Certificate.java,v
retrieving revision 1.2
diff -u -r1.2 Certificate.java
--- java/security/cert/Certificate.java	22 Jan 2002 22:40:33 -0000	1.2
+++ java/security/cert/Certificate.java	4 Oct 2002 20:12:35 -0000
@@ -69,7 +69,8 @@
 */
 public abstract class Certificate
 {
-
+  static final long serialVersionUID = -6751606818319535583L;
+	
   private String type;
   /**
      Constructs a new certificate of the specified type. An example

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