From 13970a92a67826bfd12464079b9ccc173f9ab5a6 Mon Sep 17 00:00:00 2001
From: Jesse Wilson
Date: Mon, 11 May 2009 14:08:03 -0700
Subject: Squashed commit of the following:
commit 2e4a7b3a3accb25865fb4c5535168b0d6bcebae4
Merge: 81ff13e 6c7f7e7
Author: Jesse Wilson
Date: Mon May 11 13:47:02 2009 -0700
Update our auth/ package to Harmony r772995. This change is just whitespace, plus dropping the newly added GSS tests and sample data (Generic Security services, org.ietf.jgss).
Merge branch 'auth_772995' into auth_dalvik
Conflicts:
libcore/auth/.classpath
libcore/auth/META-INF/MANIFEST.MF
libcore/auth/build.xml
libcore/auth/make/exclude.common
libcore/auth/src/main/java/javax/security/auth/AuthPermission.java
libcore/auth/src/main/java/javax/security/auth/DestroyFailedException.java
libcore/auth/src/main/java/javax/security/auth/Destroyable.java
libcore/auth/src/main/java/javax/security/auth/PrivateCredentialPermission.java
libcore/auth/src/main/java/javax/security/auth/Subject.java
libcore/auth/src/main/java/javax/security/auth/SubjectDomainCombiner.java
libcore/auth/src/main/java/javax/security/auth/callback/CallbackHandler.java
libcore/auth/src/main/java/javax/security/auth/callback/PasswordCallback.java
libcore/auth/src/main/java/javax/security/auth/callback/UnsupportedCallbackException.java
libcore/auth/src/main/java/javax/security/auth/kerberos/KerberosKey.java
libcore/auth/src/main/java/javax/security/auth/login/LoginException.java
libcore/auth/src/main/java/javax/security/auth/x500/X500Principal.java
libcore/auth/src/main/java/org/apache/harmony/auth/login/DefaultConfiguration.java
libcore/auth/src/main/native/auth/unix/exports.txt
libcore/auth/src/main/native/auth/unix/makefile
libcore/auth/src/main/native/auth/windows/makefile
libcore/auth/src/test/java/common/org/ietf/jgss/OidTest.java
commit 81ff13ec7ae480ac783f692f38c845f502b49809
Author: Jesse Wilson
Date: Fri May 8 17:53:27 2009 -0700
Stripped @since tags
commit 8b4d0e9b66d8d674a56a26f0d1bc111f9d2faa8d
Author: Jesse Wilson
Date: Fri May 8 17:40:36 2009 -0700
Auth dalvik.
commit 6c7f7e7d41393869e3900ad224bf32a26378d723
Author: Jesse Wilson
Date: Fri May 8 17:39:48 2009 -0700
Auth 772995
commit ed7f6150f8235006c59afab862d30d6033b02460
Author: Jesse Wilson
Date: Fri May 8 17:38:12 2009 -0700
Auth 527399
---
.../java/javax/security/auth/AuthPermission.java | 16 ++++-----
.../security/auth/DestroyFailedException.java | 4 +--
.../main/java/javax/security/auth/Destroyable.java | 6 ++--
.../security/auth/PrivateCredentialPermission.java | 19 +++++-----
.../src/main/java/javax/security/auth/Subject.java | 40 ++++++++++------------
.../javax/security/auth/SubjectDomainCombiner.java | 8 ++---
.../javax/security/auth/callback/Callback.java | 2 --
.../security/auth/callback/CallbackHandler.java | 4 +--
.../security/auth/callback/PasswordCallback.java | 12 +++----
.../callback/UnsupportedCallbackException.java | 8 ++---
.../javax/security/auth/login/LoginException.java | 4 +--
.../javax/security/auth/x500/X500Principal.java | 32 ++++++++---------
12 files changed, 66 insertions(+), 89 deletions(-)
(limited to 'auth/src/main/java/javax/security')
diff --git a/auth/src/main/java/javax/security/auth/AuthPermission.java b/auth/src/main/java/javax/security/auth/AuthPermission.java
index 06ea3fb..697d5c7 100644
--- a/auth/src/main/java/javax/security/auth/AuthPermission.java
+++ b/auth/src/main/java/javax/security/auth/AuthPermission.java
@@ -26,33 +26,31 @@ import org.apache.harmony.auth.internal.nls.Messages;
* target name of the permission specifies which methods are allowed
* without specifying the concrete action lists. Possible target names and
* associated authentication permissions are:
- *
+ *
*
* doAs invoke Subject.doAs methods.
* doAsPrivileged invoke the Subject.doAsPrivileged methods.
* getSubject invoke Subject.getSubject().
* getSubjectFromDomainCombiner invoke SubjectDomainCombiner.getSubject().
* setReadOnly invoke Subject.setReadonly().
- * modifyPrincipals modify the set of principals
+ * modifyPrincipals modify the set of principals
* associated with a Subject.
* modifyPublicCredentials modify the set of public credentials
* associated with a Subject.
* modifyPrivateCredentials modify the set of private credentials
* associated with a Subject.
- * refreshCredential invoke the refresh method on a credential of a
+ * refreshCredential invoke the refresh method on a credential of a
* refreshable credential class.
* destroyCredential invoke the destroy method on a credential of a
* destroyable credential class.
* createLoginContext.name instantiate a LoginContext with the
* specified name. The wildcard name ('*')
* allows to a LoginContext of any name.
- * getLoginConfiguration invoke the getConfiguration method of
+ * getLoginConfiguration invoke the getConfiguration method of
* javax.security.auth.login.Configuration.
- * refreshLoginConfiguration Invoke the refresh method of
+ * refreshLoginConfiguration Invoke the refresh method of
* javax.security.auth.login.Configuration.
*
- *
- * @since Android 1.0
*/
public final class AuthPermission extends BasicPermission {
@@ -77,7 +75,7 @@ public final class AuthPermission extends BasicPermission {
/**
* Creates an authentication permission with the specified target name.
- *
+ *
* @param name
* the target name of this authentication permission.
*/
@@ -87,7 +85,7 @@ public final class AuthPermission extends BasicPermission {
/**
* Creates an authentication permission with the specified target name.
- *
+ *
* @param name
* the target name of this authentication permission.
* @param actions
diff --git a/auth/src/main/java/javax/security/auth/DestroyFailedException.java b/auth/src/main/java/javax/security/auth/DestroyFailedException.java
index a5438a6..27d4dfd 100644
--- a/auth/src/main/java/javax/security/auth/DestroyFailedException.java
+++ b/auth/src/main/java/javax/security/auth/DestroyFailedException.java
@@ -19,8 +19,6 @@ package javax.security.auth;
/**
* Signals that the {@link Destroyable#destroy()} method failed.
- *
- * @since Android 1.0
*/
public class DestroyFailedException extends Exception {
@@ -35,7 +33,7 @@ public class DestroyFailedException extends Exception {
/**
* Creates an exception of type {@code DestroyFailedException}.
- *
+ *
* @param message
* A detail message that describes the reason for this exception.
*/
diff --git a/auth/src/main/java/javax/security/auth/Destroyable.java b/auth/src/main/java/javax/security/auth/Destroyable.java
index 6194db6..b4d0fa2 100644
--- a/auth/src/main/java/javax/security/auth/Destroyable.java
+++ b/auth/src/main/java/javax/security/auth/Destroyable.java
@@ -20,8 +20,6 @@ package javax.security.auth;
/**
* Allows for special treatment of sensitive information, when it comes to
* destroying or clearing of the data.
- *
- * @since Android 1.0
*/
public interface Destroyable {
@@ -29,7 +27,7 @@ public interface Destroyable {
* Erases the sensitive information. Once an object is destroyed any calls
* to its methods will throw an {@code IllegalStateException}. If it does
* not succeed a DestroyFailedException is thrown.
- *
+ *
* @throws DestroyFailedException
* if the information cannot be erased.
*/
@@ -37,7 +35,7 @@ public interface Destroyable {
/**
* Returns {@code true} once an object has been safely destroyed.
- *
+ *
* @return whether the object has been safely destroyed.
*/
boolean isDestroyed();
diff --git a/auth/src/main/java/javax/security/auth/PrivateCredentialPermission.java b/auth/src/main/java/javax/security/auth/PrivateCredentialPermission.java
index d92ede5..35072b8 100644
--- a/auth/src/main/java/javax/security/auth/PrivateCredentialPermission.java
+++ b/auth/src/main/java/javax/security/auth/PrivateCredentialPermission.java
@@ -31,11 +31,11 @@ import org.apache.harmony.auth.internal.nls.Messages;
* Protects private credential objects belonging to a {@code Subject}. It has
* only one action which is "read". The target name of this permission has a
* special syntax:
- *
+ *
*
- *
+ *
* First it states a credential class and is followed then by a list of one or
* more principals identifying the subject.
*
@@ -43,12 +43,11 @@ import org.apache.harmony.auth.internal.nls.Messages;
* Principal} class followed by the principal name in quotes. For example, the
* following file may define permission to read the private credentials of a
* principal named "Bob": "com.sun.PrivateCredential com.sun.Principal \"Bob\""
- *
+ *
* The syntax also allows the use of the wildcard "*" in place of {@code
* CredentialClass} or {@code PrincipalClass} and/or {@code PrincipalName}.
- *
+ *
* @see Principal
- * @since Android 1.0
*/
public final class PrivateCredentialPermission extends Permission {
@@ -69,7 +68,7 @@ public final class PrivateCredentialPermission extends Permission {
* Creates a new permission for private credentials specified by the target
* name {@code name} and an {@code action}. The action is always
* {@code "read"}.
- *
+ *
* @param name
* the target name of the permission.
* @param action
@@ -197,13 +196,13 @@ public final class PrivateCredentialPermission extends Permission {
* dimension of the array corresponds to the number of principals. The
* second dimension defines either the name of the {@code PrincipalClass}
* [x][0] or the value of {@code PrincipalName} [x][1].
- *
+ *
* This corresponds to the the target name's syntax:
- *
+ *
*
- *
+ *
* @return the principal classes and names associated with this {@code
* PrivateCredentialPermission}.
*/
@@ -225,7 +224,7 @@ public final class PrivateCredentialPermission extends Permission {
/**
* Returns the class name of the credential associated with this permission.
- *
+ *
* @return the class name of the credential associated with this permission.
*/
public String getCredentialClass() {
diff --git a/auth/src/main/java/javax/security/auth/Subject.java b/auth/src/main/java/javax/security/auth/Subject.java
index 5a4cceb..5bf6bba 100644
--- a/auth/src/main/java/javax/security/auth/Subject.java
+++ b/auth/src/main/java/javax/security/auth/Subject.java
@@ -51,8 +51,6 @@ import org.apache.harmony.auth.internal.nls.Messages;
*
Credentials (public and private) such as certificates, keys, or
* authentication proofs such as tickets
*
- *
- * @since Android 1.0
*/
public final class Subject implements Serializable {
@@ -104,7 +102,7 @@ public final class Subject implements Serializable {
/**
* The constructor for the subject, setting its public and private
* credentials and principals according to the arguments.
- *
+ *
* @param readOnly
* {@code true} if this {@code Subject} is read-only, thus
* preventing any modifications to be done.
@@ -135,7 +133,7 @@ public final class Subject implements Serializable {
/**
* Runs the code defined by {@code action} using the permissions granted to
* the {@code Subject} itself and to the code as well.
- *
+ *
* @param subject
* the distinguished {@code Subject}.
* @param action
@@ -154,7 +152,7 @@ public final class Subject implements Serializable {
* Run the code defined by {@code action} using the permissions granted to
* the {@code Subject} and to the code itself, additionally providing a more
* specific context.
- *
+ *
* @param subject
* the distinguished {@code Subject}.
* @param action
@@ -209,7 +207,7 @@ public final class Subject implements Serializable {
/**
* Runs the code defined by {@code action} using the permissions granted to
* the subject and to the code itself.
- *
+ *
* @param subject
* the distinguished {@code Subject}.
* @param action
@@ -231,7 +229,7 @@ public final class Subject implements Serializable {
* Runs the code defined by {@code action} using the permissions granted to
* the subject and to the code itself, additionally providing a more
* specific context.
- *
+ *
* @param subject
* the distinguished {@code Subject}.
* @param action
@@ -290,7 +288,7 @@ public final class Subject implements Serializable {
* Checks two Subjects for equality. More specifically if the principals,
* public and private credentials are equal, equality for two {@code
* Subjects} is implied.
- *
+ *
* @param obj
* the {@code Object} checked for equality with this {@code
* Subject}.
@@ -320,18 +318,18 @@ public final class Subject implements Serializable {
/**
* Returns this {@code Subject}'s {@link Principal}.
- *
+ *
* @return this {@code Subject}'s {@link Principal}.
*/
public Set getPrincipals() {
return principals;
}
-
+
/**
* Returns this {@code Subject}'s {@link Principal} which is a subclass of
* the {@code Class} provided.
- *
+ *
* @param c
* the {@code Class} as a criteria which the {@code Principal}
* returned must satisfy.
@@ -345,7 +343,7 @@ public final class Subject implements Serializable {
/**
* Returns the private credentials associated with this {@code Subject}.
- *
+ *
* @return the private credentials associated with this {@code Subject}.
*/
public Set