aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/security
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/java/security')
-rw-r--r--libjava/java/security/AccessControlException.java4
-rw-r--r--libjava/java/security/AlgorithmParameterGenerator.java2
-rw-r--r--libjava/java/security/AlgorithmParameters.java2
-rw-r--r--libjava/java/security/AllPermission.java114
-rw-r--r--libjava/java/security/BasicPermission.java203
-rw-r--r--libjava/java/security/DigestException.java4
-rw-r--r--libjava/java/security/DigestInputStream.java4
-rw-r--r--libjava/java/security/DigestOutputStream.java4
-rw-r--r--libjava/java/security/GeneralSecurityException.java4
-rw-r--r--libjava/java/security/Guard.java4
-rw-r--r--libjava/java/security/GuardedObject.java4
-rw-r--r--libjava/java/security/InvalidAlgorithmParameterException.java4
-rw-r--r--libjava/java/security/InvalidKeyException.java2
-rw-r--r--libjava/java/security/InvalidParameterException.java2
-rw-r--r--libjava/java/security/Key.java4
-rw-r--r--libjava/java/security/KeyException.java4
-rw-r--r--libjava/java/security/KeyFactory.java2
-rw-r--r--libjava/java/security/KeyManagementException.java4
-rw-r--r--libjava/java/security/KeyStore.java2
-rw-r--r--libjava/java/security/KeyStoreException.java4
-rw-r--r--libjava/java/security/MessageDigestSpi.java4
-rw-r--r--libjava/java/security/NoSuchAlgorithmException.java4
-rw-r--r--libjava/java/security/NoSuchProviderException.java4
-rw-r--r--libjava/java/security/Permission.java4
-rw-r--r--libjava/java/security/PermissionCollection.java6
-rw-r--r--libjava/java/security/Permissions.java113
-rw-r--r--libjava/java/security/Principal.java4
-rw-r--r--libjava/java/security/PrivateKey.java4
-rw-r--r--libjava/java/security/PrivilegedActionException.java6
-rw-r--r--libjava/java/security/ProviderException.java4
-rw-r--r--libjava/java/security/PublicKey.java4
-rw-r--r--libjava/java/security/SecureClassLoader.java26
-rw-r--r--libjava/java/security/SecureRandom.java10
-rw-r--r--libjava/java/security/SecureRandomSpi.java4
-rw-r--r--libjava/java/security/SignatureException.java4
-rw-r--r--libjava/java/security/SignatureSpi.java2
-rw-r--r--libjava/java/security/SignedObject.java2
-rw-r--r--libjava/java/security/Signer.java2
-rw-r--r--libjava/java/security/UnrecoverableKeyException.java4
-rw-r--r--libjava/java/security/UnresolvedPermission.java4
-rw-r--r--libjava/java/security/acl/AclNotFoundException.java4
-rw-r--r--libjava/java/security/acl/LastOwnerException.java4
-rw-r--r--libjava/java/security/acl/NotOwnerException.java4
-rw-r--r--libjava/java/security/cert/CertPath.java6
-rw-r--r--libjava/java/security/cert/CertPathBuilderException.java4
-rw-r--r--libjava/java/security/cert/CertPathValidatorException.java4
-rw-r--r--libjava/java/security/cert/CertStoreException.java4
-rw-r--r--libjava/java/security/cert/CertificateFactory.java2
-rw-r--r--libjava/java/security/interfaces/DSAPrivateKey.java5
-rw-r--r--libjava/java/security/interfaces/DSAPublicKey.java5
-rw-r--r--libjava/java/security/interfaces/RSAMultiPrimePrivateCrtKey.java1
-rw-r--r--libjava/java/security/interfaces/RSAPrivateCrtKey.java2
-rw-r--r--libjava/java/security/interfaces/RSAPrivateKey.java2
-rw-r--r--libjava/java/security/interfaces/RSAPublicKey.java2
54 files changed, 346 insertions, 295 deletions
diff --git a/libjava/java/security/AccessControlException.java b/libjava/java/security/AccessControlException.java
index ff8b5a93fb3..d7b1f2926a4 100644
--- a/libjava/java/security/AccessControlException.java
+++ b/libjava/java/security/AccessControlException.java
@@ -1,5 +1,5 @@
/* AccessControlException.java -- Permission is denied
- Copyright (C) 1998, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -42,7 +42,7 @@ package java.security;
* an attempt to perform an operation. This often keeps track of the
* permission that was not granted.
*
- * @author Aaron M. Renn <arenn@urbanophile.com>
+ * @author Aaron M. Renn (arenn@urbanophile.com)
* @see AccessController
* @status updated to 1.4
*/
diff --git a/libjava/java/security/AlgorithmParameterGenerator.java b/libjava/java/security/AlgorithmParameterGenerator.java
index cf245da5a62..ed2f344010b 100644
--- a/libjava/java/security/AlgorithmParameterGenerator.java
+++ b/libjava/java/security/AlgorithmParameterGenerator.java
@@ -174,7 +174,7 @@ public class AlgorithmParameterGenerator
Provider p = Security.getProvider(provider);
if (p == null)
- throw new NoSuchProviderException();
+ throw new NoSuchProviderException(provider);
return getInstance(algorithm, p);
}
diff --git a/libjava/java/security/AlgorithmParameters.java b/libjava/java/security/AlgorithmParameters.java
index afeb843a97e..8ccd40a317c 100644
--- a/libjava/java/security/AlgorithmParameters.java
+++ b/libjava/java/security/AlgorithmParameters.java
@@ -178,7 +178,7 @@ public class AlgorithmParameters
Provider p = Security.getProvider(provider);
if (p == null)
- throw new NoSuchProviderException();
+ throw new NoSuchProviderException(provider);
return getInstance(algorithm, p);
}
diff --git a/libjava/java/security/AllPermission.java b/libjava/java/security/AllPermission.java
index 32d0b45f57c..e7f316917c2 100644
--- a/libjava/java/security/AllPermission.java
+++ b/libjava/java/security/AllPermission.java
@@ -1,5 +1,5 @@
/* AllPermission.java -- Permission to do anything
- Copyright (C) 1998, 2001, 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2001, 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -135,64 +135,64 @@ public final class AllPermission extends Permission
{
return new AllPermissionCollection();
}
-} // class AllPermission
-
-/**
- * Implements AllPermission.newPermissionCollection, and obeys serialization
- * of JDK.
- *
- * @author Eric Blake <ebb9@email.byu.edu>
- */
-final class AllPermissionCollection extends PermissionCollection
-{
- /**
- * Compatible with JDK 1.1+.
- */
- private static final long serialVersionUID = -4023755556366636806L;
-
- /**
- * Whether an AllPermission has been added to the collection.
- *
- * @serial if all permission is in the collection yet
- */
- private boolean all_allowed;
-
- /**
- * Add an AllPermission.
- *
- * @param perm the permission to add
- * @throws IllegalArgumentException if perm is not an AllPermission
- * @throws SecurityException if the collection is read-only
- */
- public void add(Permission perm)
- {
- if (isReadOnly())
- throw new SecurityException();
- if (! (perm instanceof AllPermission))
- throw new IllegalArgumentException();
- all_allowed = true;
- }
-
- /**
- * Returns true if this collection implies a permission.
- *
- * @param perm the permission to check
- * @return true if this collection contains an AllPermission
- */
- public boolean implies(Permission perm)
- {
- return all_allowed;
- }
/**
- * Returns an enumeration of the elements in the collection.
+ * Implements AllPermission.newPermissionCollection, and obeys serialization
+ * of JDK.
*
- * @return the elements in the collection
+ * @author Eric Blake (ebb9@email.byu.edu)
*/
- public Enumeration elements()
+ private static final class AllPermissionCollection extends PermissionCollection
{
- return all_allowed
- ? Collections.enumeration(Collections.singleton(new AllPermission()))
- : EmptyEnumeration.getInstance();
- }
-} // class AllPermissionCollection
+ /**
+ * Compatible with JDK 1.1+.
+ */
+ private static final long serialVersionUID = -4023755556366636806L;
+
+ /**
+ * Whether an AllPermission has been added to the collection.
+ *
+ * @serial if all permission is in the collection yet
+ */
+ private boolean all_allowed;
+
+ /**
+ * Add an AllPermission.
+ *
+ * @param perm the permission to add
+ * @throws IllegalArgumentException if perm is not an AllPermission
+ * @throws SecurityException if the collection is read-only
+ */
+ public void add(Permission perm)
+ {
+ if (isReadOnly())
+ throw new SecurityException();
+ if (! (perm instanceof AllPermission))
+ throw new IllegalArgumentException();
+ all_allowed = true;
+ }
+
+ /**
+ * Returns true if this collection implies a permission.
+ *
+ * @param perm the permission to check
+ * @return true if this collection contains an AllPermission
+ */
+ public boolean implies(Permission perm)
+ {
+ return all_allowed;
+ }
+
+ /**
+ * Returns an enumeration of the elements in the collection.
+ *
+ * @return the elements in the collection
+ */
+ public Enumeration elements()
+ {
+ return all_allowed
+ ? Collections.enumeration(Collections.singleton(new AllPermission()))
+ : EmptyEnumeration.getInstance();
+ }
+ } // class AllPermissionCollection
+} // class AllPermission
diff --git a/libjava/java/security/BasicPermission.java b/libjava/java/security/BasicPermission.java
index fef0b87a8ad..741f2b02464 100644
--- a/libjava/java/security/BasicPermission.java
+++ b/libjava/java/security/BasicPermission.java
@@ -1,5 +1,5 @@
/* BasicPermission.java -- implements a simple named permission
- Copyright (C) 1998, 1999, 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -58,8 +58,8 @@ import java.util.Hashtable;
* <p>This class ignores the action list. Subclasses can choose to implement
* actions on top of this class if desired.
*
- * @author Aaron M. Renn <arenn@urbanophile.com>
- * @author Eric Blake <ebb9@email.byu.edu>
+ * @author Aaron M. Renn (arenn@urbanophile.com)
+ * @author Eric Blake (ebb9@email.byu.edu)
* @see Permission
* @see Permissions
* @see PermissionCollection
@@ -72,8 +72,9 @@ import java.util.Hashtable;
* @since 1.1
* @status updated to 1.4
*/
-public abstract class BasicPermission extends Permission
+public abstract class BasicPermission extends java.security.Permission
implements Serializable
+ // FIXME extends with fully qualified classname as workaround for gcj 3.3.
{
/**
* Compatible with JDK 1.1+.
@@ -197,111 +198,111 @@ public abstract class BasicPermission extends Permission
{
return new BasicPermissionCollection(getClass());
}
-} // class BasicPermission
-/**
- * Implements AllPermission.newPermissionCollection, and obeys serialization
- * of JDK.
- *
- * @author Eric Blake <ebb9@email.byu.edu>
- */
-final class BasicPermissionCollection extends PermissionCollection
-{
/**
- * Compatible with JDK 1.1+.
- */
- private static final long serialVersionUID = 739301742472979399L;
-
- /**
- * The permissions in the collection.
+ * Implements AllPermission.newPermissionCollection, and obeys serialization
+ * of JDK.
*
- * @serial a hash mapping name to permissions, all of type permClass
+ * @author Eric Blake (ebb9@email.byu.edu)
*/
- private final Hashtable permissions = new Hashtable();
+ private static final class BasicPermissionCollection extends PermissionCollection
+ {
+ /**
+ * Compatible with JDK 1.1+.
+ */
+ private static final long serialVersionUID = 739301742472979399L;
- /**
- * If "*" is in the collection.
- *
- * @serial true if a permission named "*" is in the collection
- */
- private boolean all_allowed;
+ /**
+ * The permissions in the collection.
+ *
+ * @serial a hash mapping name to permissions, all of type permClass
+ */
+ private final Hashtable permissions = new Hashtable();
- /**
- * The runtime class which all entries in the table must belong to.
- *
- * @serial the limiting subclass of this collection
- */
- private final Class permClass;
+ /**
+ * If "*" is in the collection.
+ *
+ * @serial true if a permission named "*" is in the collection
+ */
+ private boolean all_allowed;
- /**
- * Construct a collection over the given runtime class.
- *
- * @param c the class
- */
- BasicPermissionCollection(Class c)
- {
- permClass = c;
- }
+ /**
+ * The runtime class which all entries in the table must belong to.
+ *
+ * @serial the limiting subclass of this collection
+ */
+ private final Class permClass;
- /**
- * Add a Permission. It must be of the same type as the permission which
- * created this collection.
- *
- * @param perm the permission to add
- * @throws IllegalArgumentException if perm is not the correct type
- * @throws SecurityException if the collection is read-only
- */
- public void add(Permission perm)
- {
- if (isReadOnly())
- throw new SecurityException("readonly");
- if (! permClass.isInstance(perm))
- throw new IllegalArgumentException("Expecting instance of " + permClass);
- BasicPermission bp = (BasicPermission) perm;
- String name = bp.getName();
- if (name.equals("*"))
- all_allowed = true;
- permissions.put(name, bp);
- }
+ /**
+ * Construct a collection over the given runtime class.
+ *
+ * @param c the class
+ */
+ BasicPermissionCollection(Class c)
+ {
+ permClass = c;
+ }
- /**
- * Returns true if this collection implies the given permission.
- *
- * @param permission the permission to check
- * @return true if it is implied by this
- */
- public boolean implies(Permission permission)
- {
- if (! permClass.isInstance(permission))
- return false;
- if (all_allowed)
- return true;
- BasicPermission toImply = (BasicPermission) permission;
- String name = toImply.getName();
- if (name.equals("*"))
- return false;
- int prefixLength = name.length();
- if (name.endsWith("*"))
- prefixLength -= 2;
+ /**
+ * Add a Permission. It must be of the same type as the permission which
+ * created this collection.
+ *
+ * @param perm the permission to add
+ * @throws IllegalArgumentException if perm is not the correct type
+ * @throws SecurityException if the collection is read-only
+ */
+ public void add(Permission perm)
+ {
+ if (isReadOnly())
+ throw new SecurityException("readonly");
+ if (! permClass.isInstance(perm))
+ throw new IllegalArgumentException("Expecting instance of " + permClass);
+ BasicPermission bp = (BasicPermission) perm;
+ String name = bp.getName();
+ if (name.equals("*"))
+ all_allowed = true;
+ permissions.put(name, bp);
+ }
- while (true)
- {
- if (permissions.get(name) != null)
- return true;
- prefixLength = name.lastIndexOf('.', prefixLength);
- if (prefixLength < 0)
- return false;
- name = name.substring(0, prefixLength + 1) + '*';
- }
- }
+ /**
+ * Returns true if this collection implies the given permission.
+ *
+ * @param permission the permission to check
+ * @return true if it is implied by this
+ */
+ public boolean implies(Permission permission)
+ {
+ if (! permClass.isInstance(permission))
+ return false;
+ if (all_allowed)
+ return true;
+ BasicPermission toImply = (BasicPermission) permission;
+ String name = toImply.getName();
+ if (name.equals("*"))
+ return false;
+ int prefixLength = name.length();
+ if (name.endsWith("*"))
+ prefixLength -= 2;
- /**
- * Enumerate over the collection.
- *
- * @return an enumeration of the collection contents
- */
- public Enumeration elements()
- {
- return permissions.elements();
- }
-} // class BasicPermissionCollection
+ while (true)
+ {
+ if (permissions.get(name) != null)
+ return true;
+ prefixLength = name.lastIndexOf('.', prefixLength);
+ if (prefixLength < 0)
+ return false;
+ name = name.substring(0, prefixLength + 1) + '*';
+ }
+ }
+
+ /**
+ * Enumerate over the collection.
+ *
+ * @return an enumeration of the collection contents
+ */
+ public Enumeration elements()
+ {
+ return permissions.elements();
+ }
+ } // class BasicPermissionCollection
+} // class BasicPermission
diff --git a/libjava/java/security/DigestException.java b/libjava/java/security/DigestException.java
index f5c8d627de6..bc672420207 100644
--- a/libjava/java/security/DigestException.java
+++ b/libjava/java/security/DigestException.java
@@ -1,5 +1,5 @@
/* DigestException.java -- A generic message digest exception
- Copyright (C) 1998, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -41,7 +41,7 @@ package java.security;
* This exception indicates that a generic message digest exception has
* occurred.
*
- * @author Aaron M. Renn <arenn@urbanophile.com>
+ * @author Aaron M. Renn (arenn@urbanophile.com)
* @status updated to 1.4
*/
public class DigestException extends GeneralSecurityException
diff --git a/libjava/java/security/DigestInputStream.java b/libjava/java/security/DigestInputStream.java
index 2ca9d1b3956..e8d2b63fdfc 100644
--- a/libjava/java/security/DigestInputStream.java
+++ b/libjava/java/security/DigestInputStream.java
@@ -1,5 +1,5 @@
/* DigestInputStream.java --- An Input stream tied to a message digest
- Copyright (C) 1999, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -52,7 +52,7 @@ import java.io.InputStream;
* in the message digest.
*
* @version 0.0
- * @author Mark Benvenuto <ivymccough@worldnet.att.net>
+ * @author Mark Benvenuto (ivymccough@worldnet.att.net)
*/
public class DigestInputStream extends FilterInputStream
{
diff --git a/libjava/java/security/DigestOutputStream.java b/libjava/java/security/DigestOutputStream.java
index caf059bf40e..d95533c97cc 100644
--- a/libjava/java/security/DigestOutputStream.java
+++ b/libjava/java/security/DigestOutputStream.java
@@ -1,5 +1,5 @@
/* DigestOutputStream.java --- An output stream tied to a message digest
- Copyright (C) 1999, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -52,7 +52,7 @@ import java.io.OutputStream;
* message digest.
*
* @version 0.0
- * @author Mark Benvenuto <ivymccough@worldnet.att.net>
+ * @author Mark Benvenuto (ivymccough@worldnet.att.net)
*/
public class DigestOutputStream extends FilterOutputStream
{
diff --git a/libjava/java/security/GeneralSecurityException.java b/libjava/java/security/GeneralSecurityException.java
index d1db3c5d6fb..8a26e85cd50 100644
--- a/libjava/java/security/GeneralSecurityException.java
+++ b/libjava/java/security/GeneralSecurityException.java
@@ -1,5 +1,5 @@
/* GeneralSecurityException.java -- Common superclass of security exceptions
- Copyright (C) 1998, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -46,7 +46,7 @@ package java.security;
* (<code>RuntimeException</code>), and <code>InvalidParamterException</code>
* (<code>IllegalArgumentException</code>).
*
- * @author Aaron M. Renn <arenn@urbanophile.com>
+ * @author Aaron M. Renn (arenn@urbanophile.com)
* @status updated to 1.4
*/
public class GeneralSecurityException extends Exception
diff --git a/libjava/java/security/Guard.java b/libjava/java/security/Guard.java
index 2654ba70c04..8a2ab0f0f5f 100644
--- a/libjava/java/security/Guard.java
+++ b/libjava/java/security/Guard.java
@@ -1,5 +1,5 @@
/* Guard.java -- Check access to a guarded object
- Copyright (C) 1998, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -41,7 +41,7 @@ package java.security;
* This interface specifies a mechanism for querying whether or not
* access is allowed to a guarded object.
*
- * @author Aaron M. Renn <arenn@urbanophile.com>
+ * @author Aaron M. Renn (arenn@urbanophile.com)
* @see GuardedObject
* @since 1.1
* @status updated to 1.4
diff --git a/libjava/java/security/GuardedObject.java b/libjava/java/security/GuardedObject.java
index a4cdf74bd3e..5aeaf91e385 100644
--- a/libjava/java/security/GuardedObject.java
+++ b/libjava/java/security/GuardedObject.java
@@ -1,5 +1,5 @@
/* GuardedObject.java -- An object protected by a Guard
- Copyright (C) 1998, 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -50,7 +50,7 @@ import java.io.Serializable;
* <code>Guard</code>. If the <code>Guard</code> disallows access, an
* exception will be thrown.
*
- * @author Aaron M. Renn <arenn@urbanophile.com>
+ * @author Aaron M. Renn (arenn@urbanophile.com)
* @since 1.1
* @status updated to 1.4
*/
diff --git a/libjava/java/security/InvalidAlgorithmParameterException.java b/libjava/java/security/InvalidAlgorithmParameterException.java
index 40f953079be..5b2ada1bfb9 100644
--- a/libjava/java/security/InvalidAlgorithmParameterException.java
+++ b/libjava/java/security/InvalidAlgorithmParameterException.java
@@ -1,6 +1,6 @@
/* InvalidAlgorithmParameterException.java -- an invalid parameter to a
security algorithm
- Copyright (C) 2000, 2002 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -41,7 +41,7 @@ package java.security;
/**
* Thrown for an invalid security algorithm parameter.
*
- * @author Warren Levy <warrenl@cygnus.com>
+ * @author Warren Levy (warrenl@cygnus.com)
* @since 1.2
* @status updated to 1.4
*/
diff --git a/libjava/java/security/InvalidKeyException.java b/libjava/java/security/InvalidKeyException.java
index 373e8625a68..ce6b8e5cd54 100644
--- a/libjava/java/security/InvalidKeyException.java
+++ b/libjava/java/security/InvalidKeyException.java
@@ -40,7 +40,7 @@ package java.security;
/**
* Thrown for an invalid key.
*
- * @author Warren Levy <warrenl@cygnus.com>
+ * @author Warren Levy (warrenl@cygnus.com)
* @status updated to 1.4
*/
public class InvalidKeyException extends KeyException
diff --git a/libjava/java/security/InvalidParameterException.java b/libjava/java/security/InvalidParameterException.java
index 220899197fa..f54d819de81 100644
--- a/libjava/java/security/InvalidParameterException.java
+++ b/libjava/java/security/InvalidParameterException.java
@@ -41,7 +41,7 @@ package java.security;
* Thrown when an invalid parameter is passed to a method of the JCA/JCE
* engine classes.
*
- * @author Warren Levy <warrenl@cygnus.com>
+ * @author Warren Levy (warrenl@cygnus.com)
* @status updated to 1.4
*/
public class InvalidParameterException extends IllegalArgumentException
diff --git a/libjava/java/security/Key.java b/libjava/java/security/Key.java
index 195e50bb527..5e74be9da9a 100644
--- a/libjava/java/security/Key.java
+++ b/libjava/java/security/Key.java
@@ -1,5 +1,5 @@
/* Key.java -- A abstract representation of a digital key
- Copyright (C) 1998, 2000, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2000, 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -47,7 +47,7 @@ import java.io.Serializable;
* keys may be serialized. Keys are generally obtained through key generators,
* including {@link KeyFactory}.
*
- * @author Aaron M. Renn <arenn@urbanophile.com>
+ * @author Aaron M. Renn (arenn@urbanophile.com)
* @see PublicKey
* @see PrivateKey
* @see KeyPair
diff --git a/libjava/java/security/KeyException.java b/libjava/java/security/KeyException.java
index 3b7d3886e15..8d69a569318 100644
--- a/libjava/java/security/KeyException.java
+++ b/libjava/java/security/KeyException.java
@@ -1,5 +1,5 @@
/* KeyException.java -- Thrown when there is a problem with a key
- Copyright (C) 1998, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -40,7 +40,7 @@ package java.security;
/**
* This exception is thrown when there is a problem with a key.
*
- * @author Aaron M. Renn <arenn@urbanophile.com>
+ * @author Aaron M. Renn (arenn@urbanophile.com)
* @see Key
* @status updated to 1.4
*/
diff --git a/libjava/java/security/KeyFactory.java b/libjava/java/security/KeyFactory.java
index 27171f50966..02709f4c8f3 100644
--- a/libjava/java/security/KeyFactory.java
+++ b/libjava/java/security/KeyFactory.java
@@ -163,7 +163,7 @@ public class KeyFactory
Provider p = Security.getProvider(provider);
if (p == null)
- throw new NoSuchProviderException();
+ throw new NoSuchProviderException(provider);
return getInstance(algorithm, p);
}
diff --git a/libjava/java/security/KeyManagementException.java b/libjava/java/security/KeyManagementException.java
index 52c2786294f..ca642ba3422 100644
--- a/libjava/java/security/KeyManagementException.java
+++ b/libjava/java/security/KeyManagementException.java
@@ -1,5 +1,5 @@
/* KeyManagementException.java -- an exception in key management
- Copyright (C) 1998, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -41,7 +41,7 @@ package java.security;
* This exception is thrown whenever a problem related to the management of
* security keys is encountered.
*
- * @author Aaron M. Renn <arenn@urbanophile.com>
+ * @author Aaron M. Renn (arenn@urbanophile.com)
* @see Key
* @status updated to 1.4
*/
diff --git a/libjava/java/security/KeyStore.java b/libjava/java/security/KeyStore.java
index 99aaed3f123..f1e874786f5 100644
--- a/libjava/java/security/KeyStore.java
+++ b/libjava/java/security/KeyStore.java
@@ -164,7 +164,7 @@ public class KeyStore
Provider p = Security.getProvider(provider);
if (p == null)
- throw new NoSuchProviderException();
+ throw new NoSuchProviderException(provider);
return getInstance(type, p);
}
diff --git a/libjava/java/security/KeyStoreException.java b/libjava/java/security/KeyStoreException.java
index 369587a5984..8f45a555c52 100644
--- a/libjava/java/security/KeyStoreException.java
+++ b/libjava/java/security/KeyStoreException.java
@@ -1,5 +1,5 @@
/* KeyStoreException.java -- Indicates a problem with the key store
- Copyright (C) 1998, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -40,7 +40,7 @@ package java.security;
/**
* Indicates a problem with the key store.
*
- * @author Aaron M. Renn <arenn@urbanophile.com>
+ * @author Aaron M. Renn (arenn@urbanophile.com)
* @since 1.2
* @status updated to 1.4
*/
diff --git a/libjava/java/security/MessageDigestSpi.java b/libjava/java/security/MessageDigestSpi.java
index f2447f17d86..036392ea928 100644
--- a/libjava/java/security/MessageDigestSpi.java
+++ b/libjava/java/security/MessageDigestSpi.java
@@ -1,5 +1,5 @@
/* MessageDigestSpi.java --- The message digest service provider interface.
- Copyright (C) 1999 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -53,7 +53,7 @@ package java.security;
@version 0.0
- @author Mark Benvenuto <ivymccough@worldnet.att.net>
+ @author Mark Benvenuto (ivymccough@worldnet.att.net)
*/
public abstract class MessageDigestSpi
{
diff --git a/libjava/java/security/NoSuchAlgorithmException.java b/libjava/java/security/NoSuchAlgorithmException.java
index 31e00537a50..7d167dd0e8f 100644
--- a/libjava/java/security/NoSuchAlgorithmException.java
+++ b/libjava/java/security/NoSuchAlgorithmException.java
@@ -1,5 +1,5 @@
/* NoSuchAlgorithmException.java -- an algorithm was not available
- Copyright (C) 1998, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -41,7 +41,7 @@ package java.security;
* This exception is thrown when the requested security algorithm is
* not available
*
- * @author Aaron M. Renn <arenn@urbanophile.com>
+ * @author Aaron M. Renn (arenn@urbanophile.com)
* @status updated to 1.4
*/
public class NoSuchAlgorithmException extends GeneralSecurityException
diff --git a/libjava/java/security/NoSuchProviderException.java b/libjava/java/security/NoSuchProviderException.java
index 546b2dc6190..e676046aefd 100644
--- a/libjava/java/security/NoSuchProviderException.java
+++ b/libjava/java/security/NoSuchProviderException.java
@@ -1,5 +1,5 @@
/* NoSuchProviderException.java -- thrown when a provider is not found
- Copyright (C) 1998, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -41,7 +41,7 @@ package java.security;
* This exception is thrown when the requested security provider is
* not available.
*
- * @author Aaron M. Renn <arenn@urbanophile.com>
+ * @author Aaron M. Renn (arenn@urbanophile.com)
* @status updated to 1.4
*/
public class NoSuchProviderException extends GeneralSecurityException
diff --git a/libjava/java/security/Permission.java b/libjava/java/security/Permission.java
index 58702da2c0c..4310500ca45 100644
--- a/libjava/java/security/Permission.java
+++ b/libjava/java/security/Permission.java
@@ -1,5 +1,5 @@
/* Permission.java -- The superclass for all permission objects
- Copyright (C) 1998, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2001, 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -61,7 +61,7 @@ import java.io.Serializable;
* <p><code>Permission</code>'s must be immutable - do not change their
* state after creation.
*
- * @author Aaron M. Renn <arenn@urbanophile.com>
+ * @author Aaron M. Renn (arenn@urbanophile.com)
* @see Permissions
* @see PermissionCollection
* @since 1.1
diff --git a/libjava/java/security/PermissionCollection.java b/libjava/java/security/PermissionCollection.java
index 703767ed9a9..337a8fca937 100644
--- a/libjava/java/security/PermissionCollection.java
+++ b/libjava/java/security/PermissionCollection.java
@@ -1,5 +1,5 @@
/* PermissionCollection.java -- A collection of permission objects
- Copyright (C) 1998, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2001, 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -67,8 +67,8 @@ import java.util.Enumeration;
* in any type of collection unless it overrides that method to create its
* own collection type.
*
- * @author Aaron M. Renn <arenn@urbanophile.com>
- * @author Eric Blake <ebb9@email.byu.edu>
+ * @author Aaron M. Renn (arenn@urbanophile.com)
+ * @author Eric Blake (ebb9@email.byu.edu)
* @see Permission
* @see Permissions
* @since 1.1
diff --git a/libjava/java/security/Permissions.java b/libjava/java/security/Permissions.java
index d44341c947a..b603dedcf86 100644
--- a/libjava/java/security/Permissions.java
+++ b/libjava/java/security/Permissions.java
@@ -1,5 +1,5 @@
/* Permissions.java -- a collection of permission collections
- Copyright (C) 1998, 2001, 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2001, 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -53,8 +53,8 @@ import java.util.NoSuchElementException;
* collection type which stores its permissions in a hash table will be
* used.
*
- * @author Aaron M. Renn <arenn@urbanophile.com>
- * @author Eric Blake <ebb9@email.byu.edu>
+ * @author Aaron M. Renn (arenn@urbanophile.com)
+ * @author Eric Blake (ebb9@email.byu.edu)
* @since 1.1
*/
public final class Permissions extends PermissionCollection
@@ -188,58 +188,67 @@ public final class Permissions extends PermissionCollection
}
};
}
-} // class Permissions
-
-/**
- * Implements the permission collection for all permissions without one of
- * their own, and obeys serialization of JDK.
- *
- * @author Eric Blake <ebb9@email.byu.edu>
- */
-class PermissionsHash extends PermissionCollection
-{
- /**
- * Compatible with JDK 1.1+.
- */
- private static final long serialVersionUID = -8491988220802933440L;
-
- /**
- * Hashtable where we store permissions.
- *
- * @serial the stored permissions, both as key and value
- */
- private final Hashtable perms = new Hashtable();
-
- /**
- * Add a permission. We don't need to check for read-only, as this
- * collection is never exposed outside of Permissions, which has already
- * done that check.
- *
- * @param perm the permission to add
- */
- public void add(Permission perm)
- {
- perms.put(perm, perm);
- }
-
- /**
- * Returns true if perm is in the collection.
- *
- * @param perm the permission to check
- * @return true if it is implied
- */
- public boolean implies(Permission perm)
- {
- return perms.get(perm) != null;
- }
/**
- * Return the elements.
+ * Implements the permission collection for all permissions without one of
+ * their own, and obeys serialization of JDK.
*
- * @return the elements
+ * @author Eric Blake (ebb9@email.byu.edu)
*/
- public Enumeration elements()
+ private static final class PermissionsHash extends PermissionCollection
{
- return perms.elements();
- }
+ /**
+ * Compatible with JDK 1.1+.
+ */
+ private static final long serialVersionUID = -8491988220802933440L;
+
+ /**
+ * Hashtable where we store permissions.
+ *
+ * @serial the stored permissions, both as key and value
+ */
+ private final Hashtable perms = new Hashtable();
+
+ /**
+ * Add a permission. We don't need to check for read-only, as this
+ * collection is never exposed outside of Permissions, which has already
+ * done that check.
+ *
+ * @param perm the permission to add
+ */
+ public void add(Permission perm)
+ {
+ perms.put(perm, perm);
+ }
+
+ /**
+ * Returns true if perm is in the collection.
+ *
+ * @param perm the permission to check
+ * @return true if it is implied
+ */
+ // FIXME: Should this method be synchronized?
+ public boolean implies(Permission perm)
+ {
+ Enumeration elements = elements();
+
+ while (elements.hasMoreElements())
+ {
+ Permission p = (Permission)elements.nextElement();
+ if (p.implies(perm))
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Return the elements.
+ *
+ * @return the elements
+ */
+ public Enumeration elements()
+ {
+ return perms.elements();
+ }
+ } // class PermissionsHash
} // class Permissions
diff --git a/libjava/java/security/Principal.java b/libjava/java/security/Principal.java
index 2ac69b2c563..69990b8f8a7 100644
--- a/libjava/java/security/Principal.java
+++ b/libjava/java/security/Principal.java
@@ -1,5 +1,5 @@
/* Principal.java -- A security entity
- Copyright (C) 1998, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -42,7 +42,7 @@ package java.security;
* This interface models an entity (such as a user or a certificate authority)
* for the purposes of applying the Java security model.
*
- * @author Aaron M. Renn <arenn@urbanophile.com>
+ * @author Aaron M. Renn (arenn@urbanophile.com)
* @see X509Certificate
* @since 1.1
* @status updated to 1.4
diff --git a/libjava/java/security/PrivateKey.java b/libjava/java/security/PrivateKey.java
index 40b97f58b9a..c4a628c4279 100644
--- a/libjava/java/security/PrivateKey.java
+++ b/libjava/java/security/PrivateKey.java
@@ -1,5 +1,5 @@
/* PrivateKey.java -- tagging interface for all private keys
- Copyright (C) 1998, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2001, 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -42,7 +42,7 @@ package java.security;
* This interface specified no methods. In simply provides a common
* super-interface for all algorithm specific private key values.
*
- * @author Aaron M. Renn <arenn@urbanophile.com>
+ * @author Aaron M. Renn (arenn@urbanophile.com)
* @see Key
* @see PublicKey
* @see Certificate
diff --git a/libjava/java/security/PrivilegedActionException.java b/libjava/java/security/PrivilegedActionException.java
index 633a872cfe5..d699abd8766 100644
--- a/libjava/java/security/PrivilegedActionException.java
+++ b/libjava/java/security/PrivilegedActionException.java
@@ -1,5 +1,5 @@
/* PrivilegedActionException.java -- wrap an exception in a privileged action
- Copyright (C) 1998, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -43,8 +43,8 @@ package java.security;
* <code>AccessController.doPrivileged()</code> method. It wraps the
* actual exception thrown in the privileged code.
*
- * @author Aaron M. Renn <arenn@urbanophile.com>
- * @author Eric Blake <ebb9@email.byu.edu>
+ * @author Aaron M. Renn (arenn@urbanophile.com)
+ * @author Eric Blake (ebb9@email.byu.edu)
* @see PrivilegedExceptionAction
* @see AccessController#doPrivileged(PrivilegedExceptionAction)
* @see AccessController#doPrivileged(PrivilegedExceptionAction, AccessControlContext)
diff --git a/libjava/java/security/ProviderException.java b/libjava/java/security/ProviderException.java
index eac3eb064c8..5b0e86e9b8e 100644
--- a/libjava/java/security/ProviderException.java
+++ b/libjava/java/security/ProviderException.java
@@ -1,5 +1,5 @@
/* ProviderException.java -- Generic security provider runtime exception
- Copyright (C) 1998, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -41,7 +41,7 @@ package java.security;
* This exception indicates that a runtime problem was encounterd with
* a security provider.
*
- * @author Aaron M. Renn <arenn@urbanophile.com>
+ * @author Aaron M. Renn (arenn@urbanophile.com)
* @status updated to 1.4
*/
public class ProviderException extends RuntimeException
diff --git a/libjava/java/security/PublicKey.java b/libjava/java/security/PublicKey.java
index 81ab764615f..f2a331e6862 100644
--- a/libjava/java/security/PublicKey.java
+++ b/libjava/java/security/PublicKey.java
@@ -1,5 +1,5 @@
/* PublicKey.java -- tagging interface for all public keys
- Copyright (C) 1998, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2001, 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -41,7 +41,7 @@ package java.security;
* This interface specified no methods. In simply provides a common
* super-interface for all algorithm specific public key values.
*
- * @author Aaron M. Renn <arenn@urbanophile.com>
+ * @author Aaron M. Renn (arenn@urbanophile.com)
* @see Key
* @see PrivateKey
* @see Certificate
diff --git a/libjava/java/security/SecureClassLoader.java b/libjava/java/security/SecureClassLoader.java
index 7546edc85e5..89b5e4effce 100644
--- a/libjava/java/security/SecureClassLoader.java
+++ b/libjava/java/security/SecureClassLoader.java
@@ -48,6 +48,8 @@ package java.security;
*/
public class SecureClassLoader extends ClassLoader
{
+ java.util.WeakHashMap protectionDomainCache = new java.util.WeakHashMap();
+
protected SecureClassLoader(ClassLoader parent)
{
super(parent);
@@ -80,11 +82,29 @@ public class SecureClassLoader extends ClassLoader
protected final Class defineClass(String name, byte[] b, int off, int len,
CodeSource cs)
{
- // FIXME: Need to cache ProtectionDomains according to 1.3 docs.
if (cs != null)
{
- ProtectionDomain protectionDomain
- = new ProtectionDomain(cs, getPermissions(cs), this, null);
+ ProtectionDomain protectionDomain;
+
+ synchronized (protectionDomainCache)
+ {
+ protectionDomain = (ProtectionDomain)protectionDomainCache.get(cs);
+ }
+
+ if (protectionDomain == null)
+ {
+ protectionDomain
+ = new ProtectionDomain(cs, getPermissions(cs), this, null);
+ synchronized (protectionDomainCache)
+ {
+ ProtectionDomain domain
+ = (ProtectionDomain)protectionDomainCache.get(cs);
+ if (domain == null)
+ protectionDomainCache.put(cs, protectionDomain);
+ else
+ protectionDomain = domain;
+ }
+ }
return super.defineClass(name, b, off, len, protectionDomain);
}
else
diff --git a/libjava/java/security/SecureRandom.java b/libjava/java/security/SecureRandom.java
index 5e410c0405c..5d200383843 100644
--- a/libjava/java/security/SecureRandom.java
+++ b/libjava/java/security/SecureRandom.java
@@ -1,5 +1,5 @@
/* SecureRandom.java --- Secure Random class implementation
- Copyright (C) 1999, 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -49,7 +49,7 @@ import java.util.Random;
* keys and initialization vectors to the generation of random padding
* bytes.
*
- * @author Mark Benvenuto <ivymccough@worldnet.att.net>
+ * @author Mark Benvenuto (ivymccough@worldnet.att.net)
* @author Casey Marshall
*/
public class SecureRandom extends Random
@@ -112,6 +112,10 @@ public class SecureRandom extends Random
provider = p[i];
return;
}
+ catch (ThreadDeath death)
+ {
+ throw death;
+ }
catch (Throwable t)
{
// Ignore.
@@ -214,7 +218,7 @@ public class SecureRandom extends Random
Provider p = Security.getProvider(provider);
if (p == null)
- throw new NoSuchProviderException();
+ throw new NoSuchProviderException(provider);
return getInstance(algorithm, p);
}
diff --git a/libjava/java/security/SecureRandomSpi.java b/libjava/java/security/SecureRandomSpi.java
index 6831173688f..5218a985899 100644
--- a/libjava/java/security/SecureRandomSpi.java
+++ b/libjava/java/security/SecureRandomSpi.java
@@ -1,5 +1,5 @@
/* SecureRandomSpi.java --- Secure Random Service Provider Interface
- Copyright (C) 1999 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -46,7 +46,7 @@ import java.io.Serializable;
@since JDK 1.2
- @author Mark Benvenuto <ivymccough@worldnet.att.net>
+ @author Mark Benvenuto (ivymccough@worldnet.att.net)
*/
public abstract class SecureRandomSpi implements Serializable
{
diff --git a/libjava/java/security/SignatureException.java b/libjava/java/security/SignatureException.java
index 8762b0683cc..daccdf09cf7 100644
--- a/libjava/java/security/SignatureException.java
+++ b/libjava/java/security/SignatureException.java
@@ -1,5 +1,5 @@
/* SignatureException.java -- Generic error in signature
- Copyright (C) 1998, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -41,7 +41,7 @@ package java.security;
* This exception is thrown when a problem is encountered with a
* digital signature.
*
- * @author Aaron M. Renn <arenn@urbanophile.com>
+ * @author Aaron M. Renn (arenn@urbanophile.com)
* @status updated to 1.4
*/
public class SignatureException extends GeneralSecurityException
diff --git a/libjava/java/security/SignatureSpi.java b/libjava/java/security/SignatureSpi.java
index 3b6bdbc99ab..3dd3e4f4952 100644
--- a/libjava/java/security/SignatureSpi.java
+++ b/libjava/java/security/SignatureSpi.java
@@ -49,7 +49,7 @@ import java.security.spec.AlgorithmParameterSpec;
* cryptographic service provider who wishes to supply the implementation of a
* particular signature algorithm.
*
- * @author Mark Benvenuto <ivymccough@worldnet.att.net>
+ * @author Mark Benvenuto (ivymccough@worldnet.att.net)
* @since 1.2
* @see Signature
*/
diff --git a/libjava/java/security/SignedObject.java b/libjava/java/security/SignedObject.java
index 0d9f733e70d..f7ef0d5cb44 100644
--- a/libjava/java/security/SignedObject.java
+++ b/libjava/java/security/SignedObject.java
@@ -123,7 +123,7 @@ import java.io.Serializable;
* of signatures, resembling a chain of authorization and delegation.</li>
* </ul>
*
- * @author Mark Benvenuto <ivymccough@worldnet.att.net>
+ * @author Mark Benvenuto (ivymccough@worldnet.att.net)
* @since 1.2
* @see Signature
*/
diff --git a/libjava/java/security/Signer.java b/libjava/java/security/Signer.java
index 425933a8cea..a9e20d42cab 100644
--- a/libjava/java/security/Signer.java
+++ b/libjava/java/security/Signer.java
@@ -45,7 +45,7 @@ package java.security;
* issue that should be handled by subclasses as appropriate to their intended
* use.</p>
*
- * @author Mark Benvenuto <ivymccough@worldnet.att.net>
+ * @author Mark Benvenuto (ivymccough@worldnet.att.net)
* @deprecated This class is no longer used. Its functionality has been replaced
* by <code>java.security.KeyStore</code>, the <code>java.security.cert</code>
* package, and <code>java.security.Principal</code>.
diff --git a/libjava/java/security/UnrecoverableKeyException.java b/libjava/java/security/UnrecoverableKeyException.java
index 3e93153ad7d..9708625a636 100644
--- a/libjava/java/security/UnrecoverableKeyException.java
+++ b/libjava/java/security/UnrecoverableKeyException.java
@@ -1,5 +1,5 @@
/* UnrecoverableKeyException.java -- Cannot recover a key from the key store
- Copyright (C) 1998, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -41,7 +41,7 @@ package java.security;
* This exception is thrown when a key cannot be recovered from the key
* store.
*
- * @author Aaron M. Renn <arenn@urbanophile.com>
+ * @author Aaron M. Renn (arenn@urbanophile.com)
* @since 1.2
* @status updated to 1.4
*/
diff --git a/libjava/java/security/UnresolvedPermission.java b/libjava/java/security/UnresolvedPermission.java
index c96bce0cc14..c1f6f049360 100644
--- a/libjava/java/security/UnresolvedPermission.java
+++ b/libjava/java/security/UnresolvedPermission.java
@@ -1,5 +1,5 @@
/* UnresolvedPermission.java -- Placeholder for unresolved permissions
- Copyright (C) 1998, 2001, 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2001, 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -207,7 +207,7 @@ public final class UnresolvedPermission extends Permission
* Implements the permission collection for unresolved permissions, and
* obeys serialization of JDK.
*
- * @author Eric Blake <ebb9@email.byu.edu>
+ * @author Eric Blake (ebb9@email.byu.edu)
*/
class UnresolvedPermissionCollection extends PermissionCollection
{
diff --git a/libjava/java/security/acl/AclNotFoundException.java b/libjava/java/security/acl/AclNotFoundException.java
index a843fac1761..4462ffc3493 100644
--- a/libjava/java/security/acl/AclNotFoundException.java
+++ b/libjava/java/security/acl/AclNotFoundException.java
@@ -1,5 +1,5 @@
/* AclNotFoundException.java -- thrown when an ACL is not found
- Copyright (C) 1998, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -41,7 +41,7 @@ package java.security.acl;
* This exception is thrown when a requested access control list (ACL) is
* not found.
*
- * @author Aaron M. Renn <arenn@urbanophile.com>
+ * @author Aaron M. Renn (arenn@urbanophile.com)
* @status updated to 1.4
*/
public class AclNotFoundException extends Exception
diff --git a/libjava/java/security/acl/LastOwnerException.java b/libjava/java/security/acl/LastOwnerException.java
index be2815192fb..13e13907988 100644
--- a/libjava/java/security/acl/LastOwnerException.java
+++ b/libjava/java/security/acl/LastOwnerException.java
@@ -1,5 +1,5 @@
/* LastOwnerException.java -- User attempted to delete last ACL owner
- Copyright (C) 1998, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -41,7 +41,7 @@ package java.security.acl;
* This exception is thrown when an attempt is made to delete the last owner
* of an access control list (ACL)
*
- * @author Aaron M. Renn <arenn@urbanophile.com>
+ * @author Aaron M. Renn (arenn@urbanophile.com)
* @see Owner#deleteOwner(java.security.Principal, java.security.Principal)
* @status updated to 1.4
*/
diff --git a/libjava/java/security/acl/NotOwnerException.java b/libjava/java/security/acl/NotOwnerException.java
index 8b2739d9cc4..7c3a6c431a7 100644
--- a/libjava/java/security/acl/NotOwnerException.java
+++ b/libjava/java/security/acl/NotOwnerException.java
@@ -1,5 +1,5 @@
/* NotOwnerException.java -- Attempt to modify an unowned ACL
- Copyright (C) 1998, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -42,7 +42,7 @@ package java.security.acl;
* the caller to be the owner of the access control list (ACL) when the caller
* is in fact not the owner of the ACL.
*
- * @author Aaron M. Renn <arenn@urbanophile.com>
+ * @author Aaron M. Renn (arenn@urbanophile.com)
* @status updated to 1.4
*/
public class NotOwnerException extends Exception
diff --git a/libjava/java/security/cert/CertPath.java b/libjava/java/security/cert/CertPath.java
index 53f42e752de..c57bd313bc1 100644
--- a/libjava/java/security/cert/CertPath.java
+++ b/libjava/java/security/cert/CertPath.java
@@ -1,5 +1,5 @@
/* CertPath.java -- a sequence of certificates
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -54,7 +54,7 @@ import java.util.List;
* the path is consolidated into a {@link CertPathRep}, which preserves the
* data regardless of the underlying implementation of the path.
*
- * @author Eric Blake <ebb9@email.byu.edu>
+ * @author Eric Blake (ebb9@email.byu.edu)
* @since 1.4
* @status updated to 1.4
*/
@@ -63,7 +63,7 @@ public abstract class CertPath implements Serializable
/**
* The serialized representation of a path.
*
- * @author Eric Blake <ebb9@email.byu.edu>
+ * @author Eric Blake (ebb9@email.byu.edu)
*/
protected static class CertPathRep implements Serializable
{
diff --git a/libjava/java/security/cert/CertPathBuilderException.java b/libjava/java/security/cert/CertPathBuilderException.java
index 7cfdb79e536..2db7d337c98 100644
--- a/libjava/java/security/cert/CertPathBuilderException.java
+++ b/libjava/java/security/cert/CertPathBuilderException.java
@@ -1,6 +1,6 @@
/* CertPathBuilderException.java -- wraps an exception during certificate
path building
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -47,7 +47,7 @@ import java.security.GeneralSecurityException;
* Indicates a problem while using a <code>CertPathBuilder</code>, wrapping
* the lower exception. This class is not thread-safe.
*
- * @author Eric Blake <ebb9@email.byu.edu>
+ * @author Eric Blake (ebb9@email.byu.edu)
* @see CertPathBuilder
* @since 1.4
* @status updated to 1.4
diff --git a/libjava/java/security/cert/CertPathValidatorException.java b/libjava/java/security/cert/CertPathValidatorException.java
index e7b40b8d3d6..9c7ad03c925 100644
--- a/libjava/java/security/cert/CertPathValidatorException.java
+++ b/libjava/java/security/cert/CertPathValidatorException.java
@@ -1,6 +1,6 @@
/* CertPathValidatorException.java -- wraps an exception during validation
of a CertPath
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -48,7 +48,7 @@ import java.security.GeneralSecurityException;
* it can store the path an index in that path that caused the problem. This
* class is not thread-safe.
*
- * @author Eric Blake <ebb9@email.byu.edu>
+ * @author Eric Blake (ebb9@email.byu.edu)
* @see CertPathValidator
* @since 1.4
* @status updated to 1.4
diff --git a/libjava/java/security/cert/CertStoreException.java b/libjava/java/security/cert/CertStoreException.java
index 7d7bd148e9a..d157b1dc950 100644
--- a/libjava/java/security/cert/CertStoreException.java
+++ b/libjava/java/security/cert/CertStoreException.java
@@ -1,5 +1,5 @@
/* CertStoreException.java -- wraps an exception during certificate storage
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -47,7 +47,7 @@ import java.security.GeneralSecurityException;
* <code>CertStore</code>, wrapping the lower exception. This class is not
* thread-safe.
*
- * @author Eric Blake <ebb9@email.byu.edu>
+ * @author Eric Blake (ebb9@email.byu.edu)
* @see CertStore
* @since 1.4
* @status updated to 1.4
diff --git a/libjava/java/security/cert/CertificateFactory.java b/libjava/java/security/cert/CertificateFactory.java
index 31664401aea..6a9231703e4 100644
--- a/libjava/java/security/cert/CertificateFactory.java
+++ b/libjava/java/security/cert/CertificateFactory.java
@@ -138,7 +138,7 @@ public class CertificateFactory
{
Provider p = Security.getProvider(provider);
if( p == null)
- throw new NoSuchProviderException();
+ throw new NoSuchProviderException(provider);
return getInstance(type, p);
}
diff --git a/libjava/java/security/interfaces/DSAPrivateKey.java b/libjava/java/security/interfaces/DSAPrivateKey.java
index 4e6f13ddbe5..223db91e806 100644
--- a/libjava/java/security/interfaces/DSAPrivateKey.java
+++ b/libjava/java/security/interfaces/DSAPrivateKey.java
@@ -50,6 +50,11 @@ import java.security.PrivateKey;
public interface DSAPrivateKey extends DSAKey, PrivateKey
{
/**
+ * The version identifier used for serialization.
+ */
+ long serialVersionUID = 7776497482533790279L;
+
+ /**
* This method returns the value of the DSA private key
*/
BigInteger getX();
diff --git a/libjava/java/security/interfaces/DSAPublicKey.java b/libjava/java/security/interfaces/DSAPublicKey.java
index aec1c606dcd..3f8d211d295 100644
--- a/libjava/java/security/interfaces/DSAPublicKey.java
+++ b/libjava/java/security/interfaces/DSAPublicKey.java
@@ -50,6 +50,11 @@ import java.security.PublicKey;
public interface DSAPublicKey extends DSAKey, PublicKey
{
/**
+ * The version identifier used for serialization.
+ */
+ long serialVersionUID = 1234526332779022332L;
+
+ /**
* This method returns the value of the DSA public key
*/
BigInteger getY();
diff --git a/libjava/java/security/interfaces/RSAMultiPrimePrivateCrtKey.java b/libjava/java/security/interfaces/RSAMultiPrimePrivateCrtKey.java
index 7e115fabcd1..68a5e448877 100644
--- a/libjava/java/security/interfaces/RSAMultiPrimePrivateCrtKey.java
+++ b/libjava/java/security/interfaces/RSAMultiPrimePrivateCrtKey.java
@@ -54,6 +54,7 @@ public interface RSAMultiPrimePrivateCrtKey extends RSAPrivateKey
{
// Constants
// --------------------------------------------------------------------------
+ long serialVersionUID = 618058533534628008L;
// Methods
// --------------------------------------------------------------------------
diff --git a/libjava/java/security/interfaces/RSAPrivateCrtKey.java b/libjava/java/security/interfaces/RSAPrivateCrtKey.java
index 8af1bb9168e..1fb2881ed50 100644
--- a/libjava/java/security/interfaces/RSAPrivateCrtKey.java
+++ b/libjava/java/security/interfaces/RSAPrivateCrtKey.java
@@ -49,6 +49,8 @@ import java.math.BigInteger;
*/
public interface RSAPrivateCrtKey extends RSAPrivateKey
{
+ long serialVersionUID = -5682214253527700368L;
+
/**
* Returns the public exponent for this key
*
diff --git a/libjava/java/security/interfaces/RSAPrivateKey.java b/libjava/java/security/interfaces/RSAPrivateKey.java
index d287d67327a..b4e34292340 100644
--- a/libjava/java/security/interfaces/RSAPrivateKey.java
+++ b/libjava/java/security/interfaces/RSAPrivateKey.java
@@ -49,6 +49,8 @@ import java.security.PrivateKey;
*/
public interface RSAPrivateKey extends PrivateKey, RSAKey
{
+ long serialVersionUID = 5187144804936595022L;
+
/**
* Returns the private exponent value for this key
*
diff --git a/libjava/java/security/interfaces/RSAPublicKey.java b/libjava/java/security/interfaces/RSAPublicKey.java
index 22d64b1bb7a..9847ae9d257 100644
--- a/libjava/java/security/interfaces/RSAPublicKey.java
+++ b/libjava/java/security/interfaces/RSAPublicKey.java
@@ -49,6 +49,8 @@ import java.security.PublicKey;
*/
public interface RSAPublicKey extends PublicKey, RSAKey
{
+ long serialVersionUID = -8727434096241101194L;
+
/**
* Returns the public exponent value for this key
*