diff options
author | Mark Wielaard <mark@gcc.gnu.org> | 2002-10-04 20:17:26 +0000 |
---|---|---|
committer | Mark Wielaard <mark@gcc.gnu.org> | 2002-10-04 20:17:26 +0000 |
commit | 7992cddd91882927fc26eaf1dfcd2b05576be55e (patch) | |
tree | 1d7c0ee9f68e8e1a25d9e721792bc5848d0ccdc1 /libjava/java | |
parent | c5d3d49b5856362ad2e49175147c44afac354c1b (diff) | |
download | gcc-7992cddd91882927fc26eaf1dfcd2b05576be55e.zip gcc-7992cddd91882927fc26eaf1dfcd2b05576be55e.tar.gz gcc-7992cddd91882927fc26eaf1dfcd2b05576be55e.tar.bz2 |
[multiple changes]
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-04 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.
From-SVN: r57827
Diffstat (limited to 'libjava/java')
-rw-r--r-- | libjava/java/security/Identity.java | 2 | ||||
-rw-r--r-- | libjava/java/security/KeyPair.java | 2 | ||||
-rw-r--r-- | libjava/java/security/ProtectionDomain.java | 3 | ||||
-rw-r--r-- | libjava/java/security/Provider.java | 2 | ||||
-rw-r--r-- | libjava/java/security/SecureRandom.java | 2 | ||||
-rw-r--r-- | libjava/java/security/SecureRandomSpi.java | 2 | ||||
-rw-r--r-- | libjava/java/security/Security.java | 17 | ||||
-rw-r--r-- | libjava/java/security/SignedObject.java | 2 | ||||
-rw-r--r-- | libjava/java/security/cert/Certificate.java | 3 |
9 files changed, 24 insertions, 11 deletions
diff --git a/libjava/java/security/Identity.java b/libjava/java/security/Identity.java index 4230eb0..a1af112 100644 --- a/libjava/java/security/Identity.java +++ b/libjava/java/security/Identity.java @@ -64,6 +64,8 @@ import java.util.Vector; */ public abstract class Identity implements Principal, Serializable { + static final long serialVersionUID = 3609922007826600659L; + private String name; private IdentityScope scope; private PublicKey publicKey; diff --git a/libjava/java/security/KeyPair.java b/libjava/java/security/KeyPair.java index c6ba61d..c502add 100644 --- a/libjava/java/security/KeyPair.java +++ b/libjava/java/security/KeyPair.java @@ -48,6 +48,8 @@ import java.io.Serializable; */ public final class KeyPair implements Serializable { + static final long serialVersionUID = -7565189502268009837L; + private PublicKey publicKey; private PrivateKey privateKey; diff --git a/libjava/java/security/ProtectionDomain.java b/libjava/java/security/ProtectionDomain.java index 35d6d73..e8ead46 100644 --- a/libjava/java/security/ProtectionDomain.java +++ b/libjava/java/security/ProtectionDomain.java @@ -53,8 +53,6 @@ package java.security; */ 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 class ProtectionDomain */ public String toString() { + String linesep = System.getProperty("line.separator"); StringBuffer sb = new StringBuffer(""); sb.append("ProtectionDomain (" + linesep); if (code_source == null) diff --git a/libjava/java/security/Provider.java b/libjava/java/security/Provider.java index a1a9654..d3e3581 100644 --- a/libjava/java/security/Provider.java +++ b/libjava/java/security/Provider.java @@ -56,6 +56,8 @@ import java.util.Properties; */ public abstract class Provider extends Properties implements Serializable { + static final long serialVersionUID = -4298000515446427739L; + /** * This is a textual description of the provider */ diff --git a/libjava/java/security/SecureRandom.java b/libjava/java/security/SecureRandom.java index 063c6c1..31701cb 100644 --- a/libjava/java/security/SecureRandom.java +++ b/libjava/java/security/SecureRandom.java @@ -49,6 +49,8 @@ import java.util.Enumeration; */ public class SecureRandom extends Random { + static final long serialVersionUID = 4940670005562187L; + //Serialized Field long counter = 0; //Serialized MessageDigest digest = null; diff --git a/libjava/java/security/SecureRandomSpi.java b/libjava/java/security/SecureRandomSpi.java index a311b8f..1586994 100644 --- a/libjava/java/security/SecureRandomSpi.java +++ b/libjava/java/security/SecureRandomSpi.java @@ -50,6 +50,8 @@ import java.io.Serializable; */ public abstract class SecureRandomSpi implements Serializable { + static final long serialVersionUID = -2991854161009191830L; + /** Default Constructor for SecureRandomSpi */ diff --git a/libjava/java/security/Security.java b/libjava/java/security/Security.java index 2c73da6..9ae90ba 100644 --- a/libjava/java/security/Security.java +++ b/libjava/java/security/Security.java @@ -59,8 +59,9 @@ public final class Security extends Object 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 @@ public final class Security extends Object { } - 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 final class Security extends Object */ 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; } /** diff --git a/libjava/java/security/SignedObject.java b/libjava/java/security/SignedObject.java index 93a99e5..78684e5 100644 --- a/libjava/java/security/SignedObject.java +++ b/libjava/java/security/SignedObject.java @@ -79,6 +79,8 @@ import java.io.Serializable; */ public final class SignedObject implements Serializable { + static final long serialVersionUID = 720502720485447167L; + private byte[] content; private byte[] signature; private String thealgorithm; diff --git a/libjava/java/security/cert/Certificate.java b/libjava/java/security/cert/Certificate.java index 221b2d7..25e8aad 100644 --- a/libjava/java/security/cert/Certificate.java +++ b/libjava/java/security/cert/Certificate.java @@ -69,7 +69,8 @@ import java.io.ObjectStreamException; */ public abstract class Certificate { - + static final long serialVersionUID = -6751606818319535583L; + private String type; /** Constructs a new certificate of the specified type. An example |