directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r376623 [22/38] - in /directory/sandbox/akarasulu/rc1/apacheds: core-plugin/src/main/java/org/apache/directory/server/core/tools/schema/ core-plugin/src/test/java/org/apache/directory/server/core/tools/schema/ core-shared/src/main/java/org/...
Date Fri, 10 Feb 2006 10:49:57 GMT
Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/exceptions/ErrorType.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/exceptions/ErrorType.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/exceptions/ErrorType.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/exceptions/ErrorType.java Fri Feb 10 02:48:07 2006
@@ -16,10 +16,12 @@
  */
 package org.apache.kerberos.exceptions;
 
+
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
 
+
 /**
  * Type safe enumeration of Kerberos error types
  *
@@ -28,212 +30,114 @@
  */
 public final class ErrorType implements Comparable
 {
-	/*
-	 * Enumeration elements are constructed once upon class loading.
-	 * Order of appearance here determines the order of compareTo.
-	 */
-    public static final ErrorType KDC_ERR_NONE = new ErrorType(0,
-    	"No error");
-    public static final ErrorType KDC_ERR_NAME_EXP = new ErrorType(1,
-    	"Client's entry in database expired");
-    public static final ErrorType KDC_ERR_SERVICE_EXP = new ErrorType(2,
-    	"Server's entry in database has expired");
-    public static final ErrorType KDC_ERR_BAD_PVNO = new ErrorType(3,
-    	"Requested protocol version number not supported");
-    public static final ErrorType KDC_ERR_C_OLD_MAST_KVNO = new ErrorType(4,
-    	"Client's key encrypted in old master key");
-    public static final ErrorType KDC_ERR_S_OLD_MAST_KVNO = new ErrorType(5,
-    	"Server's key encrypted in old master key");
-    public static final ErrorType KDC_ERR_C_PRINCIPAL_UNKNOWN = new ErrorType(6,
-    	"Client not found in Kerberos database");
-    public static final ErrorType KDC_ERR_S_PRINCIPAL_UNKNOWN = new ErrorType(7,
-    	"Server not found in Kerberos database");
-    public static final ErrorType KDC_ERR_PRINCIPAL_NOT_UNIQUE = new ErrorType(8,
-    	"Multiple principal entries in database");
-    public static final ErrorType KDC_ERR_NULL_KEY = new ErrorType(9,
-    	"The client or server has a null key");
-    public static final ErrorType KDC_ERR_CANNOT_POSTDATE = new ErrorType(10,
-    	"Ticket not eligible for postdating");
-    public static final ErrorType KDC_ERR_NEVER_VALID = new ErrorType(11,
-    	"Requested start time is later than end time");
-    public static final ErrorType KDC_ERR_POLICY = new ErrorType(12,
-    	"KDC policy rejects request");
-    public static final ErrorType KDC_ERR_BADOPTION = new ErrorType(13,
-    	"KDC cannot accommodate requested option");
-    public static final ErrorType KDC_ERR_ETYPE_NOSUPP = new ErrorType(14,
-    	"KDC has no support for encryption type");
-    public static final ErrorType KDC_ERR_SUMTYPE_NOSUPP = new ErrorType(15,
-    	"KDC has no support for checksum type");
-    public static final ErrorType KDC_ERR_PADATA_TYPE_NOSUPP = new ErrorType(16,
-    	"KDC has no support for padata type");
-    public static final ErrorType KDC_ERR_TRTYPE_NOSUPP = new ErrorType(17,
-    	"KDC has no support for transitedEncoding type");
-    public static final ErrorType KDC_ERR_CLIENT_REVOKED = new ErrorType(18,
-    	"Clients credentials have been revoked");
-    public static final ErrorType KDC_ERR_SERVICE_REVOKED = new ErrorType(19,
-    	"Credentials for server have been revoked");
-    public static final ErrorType KDC_ERR_TGT_REVOKED = new ErrorType(20,
-    	"TGT has been revoked");
-    public static final ErrorType KDC_ERR_CLIENT_NOTYET = new ErrorType(21,
-    	"Client not yet valid - try again later");
-    public static final ErrorType KDC_ERR_SERVICE_NOTYET = new ErrorType(22,
-    	"Server not yet valid - try again later");
-    public static final ErrorType KDC_ERR_KEY_EXPIRED = new ErrorType(23,
-    	"Password has expired - change password to reset");
-    public static final ErrorType KDC_ERR_PREAUTH_FAILED = new ErrorType(24,
-    	"Pre-authentication information was invalid");
-    public static final ErrorType KDC_ERR_PREAUTH_REQUIRED = new ErrorType(25,
-    	"Additional pre-authentication required");
-    public static final ErrorType KDC_ERR_SERVER_NOMATCH = new ErrorType(26,
-    	"Requested server and ticket don't match");
-    public static final ErrorType KDC_ERR_MUST_USE_USER2USER = new ErrorType(27,
-    	"Server valid for user2user only");
-    public static final ErrorType KDC_ERR_PATH_NOT_ACCEPTED = new ErrorType(28,
-    	"KDC Policy rejects transitedEncoding path");
-    public static final ErrorType KDC_ERR_SVC_UNAVAILABLE = new ErrorType(29,
-    	"A service is not available");
-    public static final ErrorType KRB_AP_ERR_BAD_INTEGRITY = new ErrorType(31,
-    	"Integrity check on decrypted field failed");
-    public static final ErrorType KRB_AP_ERR_TKT_EXPIRED = new ErrorType(32,
-    	"Ticket expired");
-    public static final ErrorType KRB_AP_ERR_TKT_NYV = new ErrorType(33,
-    	"Ticket not yet valid");
-    public static final ErrorType KRB_AP_ERR_REPEAT = new ErrorType(34,
-    	"Request is a replay");
-    public static final ErrorType KRB_AP_ERR_NOT_US = new ErrorType(35,
-    	"The ticket isn't for us");
-    public static final ErrorType KRB_AP_ERR_BADMATCH = new ErrorType(36,
-    	"Ticket and authenticator don't match");
-    public static final ErrorType KRB_AP_ERR_SKEW = new ErrorType(37,
-    	"Clock skew too great");
-    public static final ErrorType KRB_AP_ERR_BADADDR = new ErrorType(38,
-    	"Incorrect net address");
-    public static final ErrorType KRB_AP_ERR_BADVERSION = new ErrorType(39,
-    	"Protocol version mismatch");
-    public static final ErrorType KRB_AP_ERR_MSG_TYPE = new ErrorType(40,
-    	"Invalid msg type");
-    public static final ErrorType KRB_AP_ERR_MODIFIED = new ErrorType(41,
-    	"Message stream modified");
-    public static final ErrorType KRB_AP_ERR_BADORDER = new ErrorType(42,
-    	"Message out of order");
-    public static final ErrorType KRB_AP_ERR_BADKEYVER = new ErrorType(44,
-    	"Specified version of key is not available");
-    public static final ErrorType KRB_AP_ERR_NOKEY = new ErrorType(45,
-    	"Service key not available");
-    public static final ErrorType KRB_AP_ERR_MUT_FAIL = new ErrorType(46,
-    	"Mutual authentication failed");
-    public static final ErrorType KRB_AP_ERR_BADDIRECTION = new ErrorType(47,
-    	"Incorrect message direction");
-    public static final ErrorType KRB_AP_ERR_METHOD = new ErrorType(48,
-    	"Alternative authentication method required");
-    public static final ErrorType KRB_AP_ERR_BADSEQ = new ErrorType(49,
-    	"Incorrect sequence number in message");
-    public static final ErrorType KRB_AP_ERR_INAPP_CKSUM = new ErrorType(50,
-    	"Inappropriate type of checksum in message");
-    public static final ErrorType KRB_ERR_GENERIC = new ErrorType(60,
-    	"Generic error (description in e-text)");
-    public static final ErrorType KRB_ERR_FIELD_TOOLONG = new ErrorType(61,
-    	"Field is too long for this implementation");
-    public static final ErrorType KRB_ERR_CLIENT_NOT_TRUSTED = new ErrorType(62,
-    	"Client is not trusted");
-    public static final ErrorType KRB_ERR_KDC_NOT_TRUSTED = new ErrorType(63,
-    	"KDC is not trusted");
-    public static final ErrorType KRB_ERR_INVALID_SIG = new ErrorType(64,
-    	"Signature is invalid");
-    public static final ErrorType KRB_ERR_KEY_TOO_WEAK = new ErrorType(65,
-    	"Key too weak");
-    public static final ErrorType KRB_ERR_CERTIFICATE_MISMATCH = new ErrorType(66,
-    	"Certificates do not match");
-    public static final ErrorType KRB_AP_ERR_NO_TGT = new ErrorType(67,
-    	"No tgt for user-to-user authentication");
-    public static final ErrorType KRB_ERR_WRONG_REALM = new ErrorType(68,
-    	"Wrong realm");
-    public static final ErrorType KRB_AP_ERR_USER_TO_USER_REQUIRED = new ErrorType(
-    	69, "User-to-user authentication required");
-    public static final ErrorType KRB_ERR_CANT_VERIFY_CERTIFICATE = new ErrorType(
-    	70, "Can't verify certificate");
-    public static final ErrorType KRB_ERR_INVALID_CERTIFICATE = new ErrorType(71,
-    	"Invalid certificate");
-    public static final ErrorType KRB_ERR_REVOKED_CERTIFICATE = new ErrorType(72,
-    	"Revoked certificate");
-    public static final ErrorType KRB_ERR_REVOCATION_STATUS_UNKNOWN = new ErrorType(
-    	73, "Revocation status unknown");
-    public static final ErrorType KRB_ERR_REVOCATION_STATUS_UNAVAILABLE = new ErrorType(
-    	74, "Revocation status unavailable");
-    public static final ErrorType KRB_ERR_CLIENT_NAME_MISMATCH = new ErrorType(75,
-    	"Client names do not match");
-    public static final ErrorType KRB_ERR_KDC_NAME_MISMATCH = new ErrorType(76,
-    	"KDC names do not match");
+    /*
+     * Enumeration elements are constructed once upon class loading.
+     * Order of appearance here determines the order of compareTo.
+     */
+    public static final ErrorType KDC_ERR_NONE = new ErrorType( 0, "No error" );
+    public static final ErrorType KDC_ERR_NAME_EXP = new ErrorType( 1, "Client's entry in database expired" );
+    public static final ErrorType KDC_ERR_SERVICE_EXP = new ErrorType( 2, "Server's entry in database has expired" );
+    public static final ErrorType KDC_ERR_BAD_PVNO = new ErrorType( 3,
+        "Requested protocol version number not supported" );
+    public static final ErrorType KDC_ERR_C_OLD_MAST_KVNO = new ErrorType( 4,
+        "Client's key encrypted in old master key" );
+    public static final ErrorType KDC_ERR_S_OLD_MAST_KVNO = new ErrorType( 5,
+        "Server's key encrypted in old master key" );
+    public static final ErrorType KDC_ERR_C_PRINCIPAL_UNKNOWN = new ErrorType( 6,
+        "Client not found in Kerberos database" );
+    public static final ErrorType KDC_ERR_S_PRINCIPAL_UNKNOWN = new ErrorType( 7,
+        "Server not found in Kerberos database" );
+    public static final ErrorType KDC_ERR_PRINCIPAL_NOT_UNIQUE = new ErrorType( 8,
+        "Multiple principal entries in database" );
+    public static final ErrorType KDC_ERR_NULL_KEY = new ErrorType( 9, "The client or server has a null key" );
+    public static final ErrorType KDC_ERR_CANNOT_POSTDATE = new ErrorType( 10, "Ticket not eligible for postdating" );
+    public static final ErrorType KDC_ERR_NEVER_VALID = new ErrorType( 11,
+        "Requested start time is later than end time" );
+    public static final ErrorType KDC_ERR_POLICY = new ErrorType( 12, "KDC policy rejects request" );
+    public static final ErrorType KDC_ERR_BADOPTION = new ErrorType( 13, "KDC cannot accommodate requested option" );
+    public static final ErrorType KDC_ERR_ETYPE_NOSUPP = new ErrorType( 14, "KDC has no support for encryption type" );
+    public static final ErrorType KDC_ERR_SUMTYPE_NOSUPP = new ErrorType( 15, "KDC has no support for checksum type" );
+    public static final ErrorType KDC_ERR_PADATA_TYPE_NOSUPP = new ErrorType( 16, "KDC has no support for padata type" );
+    public static final ErrorType KDC_ERR_TRTYPE_NOSUPP = new ErrorType( 17,
+        "KDC has no support for transitedEncoding type" );
+    public static final ErrorType KDC_ERR_CLIENT_REVOKED = new ErrorType( 18, "Clients credentials have been revoked" );
+    public static final ErrorType KDC_ERR_SERVICE_REVOKED = new ErrorType( 19,
+        "Credentials for server have been revoked" );
+    public static final ErrorType KDC_ERR_TGT_REVOKED = new ErrorType( 20, "TGT has been revoked" );
+    public static final ErrorType KDC_ERR_CLIENT_NOTYET = new ErrorType( 21, "Client not yet valid - try again later" );
+    public static final ErrorType KDC_ERR_SERVICE_NOTYET = new ErrorType( 22, "Server not yet valid - try again later" );
+    public static final ErrorType KDC_ERR_KEY_EXPIRED = new ErrorType( 23,
+        "Password has expired - change password to reset" );
+    public static final ErrorType KDC_ERR_PREAUTH_FAILED = new ErrorType( 24,
+        "Pre-authentication information was invalid" );
+    public static final ErrorType KDC_ERR_PREAUTH_REQUIRED = new ErrorType( 25,
+        "Additional pre-authentication required" );
+    public static final ErrorType KDC_ERR_SERVER_NOMATCH = new ErrorType( 26, "Requested server and ticket don't match" );
+    public static final ErrorType KDC_ERR_MUST_USE_USER2USER = new ErrorType( 27, "Server valid for user2user only" );
+    public static final ErrorType KDC_ERR_PATH_NOT_ACCEPTED = new ErrorType( 28,
+        "KDC Policy rejects transitedEncoding path" );
+    public static final ErrorType KDC_ERR_SVC_UNAVAILABLE = new ErrorType( 29, "A service is not available" );
+    public static final ErrorType KRB_AP_ERR_BAD_INTEGRITY = new ErrorType( 31,
+        "Integrity check on decrypted field failed" );
+    public static final ErrorType KRB_AP_ERR_TKT_EXPIRED = new ErrorType( 32, "Ticket expired" );
+    public static final ErrorType KRB_AP_ERR_TKT_NYV = new ErrorType( 33, "Ticket not yet valid" );
+    public static final ErrorType KRB_AP_ERR_REPEAT = new ErrorType( 34, "Request is a replay" );
+    public static final ErrorType KRB_AP_ERR_NOT_US = new ErrorType( 35, "The ticket isn't for us" );
+    public static final ErrorType KRB_AP_ERR_BADMATCH = new ErrorType( 36, "Ticket and authenticator don't match" );
+    public static final ErrorType KRB_AP_ERR_SKEW = new ErrorType( 37, "Clock skew too great" );
+    public static final ErrorType KRB_AP_ERR_BADADDR = new ErrorType( 38, "Incorrect net address" );
+    public static final ErrorType KRB_AP_ERR_BADVERSION = new ErrorType( 39, "Protocol version mismatch" );
+    public static final ErrorType KRB_AP_ERR_MSG_TYPE = new ErrorType( 40, "Invalid msg type" );
+    public static final ErrorType KRB_AP_ERR_MODIFIED = new ErrorType( 41, "Message stream modified" );
+    public static final ErrorType KRB_AP_ERR_BADORDER = new ErrorType( 42, "Message out of order" );
+    public static final ErrorType KRB_AP_ERR_BADKEYVER = new ErrorType( 44, "Specified version of key is not available" );
+    public static final ErrorType KRB_AP_ERR_NOKEY = new ErrorType( 45, "Service key not available" );
+    public static final ErrorType KRB_AP_ERR_MUT_FAIL = new ErrorType( 46, "Mutual authentication failed" );
+    public static final ErrorType KRB_AP_ERR_BADDIRECTION = new ErrorType( 47, "Incorrect message direction" );
+    public static final ErrorType KRB_AP_ERR_METHOD = new ErrorType( 48, "Alternative authentication method required" );
+    public static final ErrorType KRB_AP_ERR_BADSEQ = new ErrorType( 49, "Incorrect sequence number in message" );
+    public static final ErrorType KRB_AP_ERR_INAPP_CKSUM = new ErrorType( 50,
+        "Inappropriate type of checksum in message" );
+    public static final ErrorType KRB_ERR_GENERIC = new ErrorType( 60, "Generic error (description in e-text)" );
+    public static final ErrorType KRB_ERR_FIELD_TOOLONG = new ErrorType( 61,
+        "Field is too long for this implementation" );
+    public static final ErrorType KRB_ERR_CLIENT_NOT_TRUSTED = new ErrorType( 62, "Client is not trusted" );
+    public static final ErrorType KRB_ERR_KDC_NOT_TRUSTED = new ErrorType( 63, "KDC is not trusted" );
+    public static final ErrorType KRB_ERR_INVALID_SIG = new ErrorType( 64, "Signature is invalid" );
+    public static final ErrorType KRB_ERR_KEY_TOO_WEAK = new ErrorType( 65, "Key too weak" );
+    public static final ErrorType KRB_ERR_CERTIFICATE_MISMATCH = new ErrorType( 66, "Certificates do not match" );
+    public static final ErrorType KRB_AP_ERR_NO_TGT = new ErrorType( 67, "No tgt for user-to-user authentication" );
+    public static final ErrorType KRB_ERR_WRONG_REALM = new ErrorType( 68, "Wrong realm" );
+    public static final ErrorType KRB_AP_ERR_USER_TO_USER_REQUIRED = new ErrorType( 69,
+        "User-to-user authentication required" );
+    public static final ErrorType KRB_ERR_CANT_VERIFY_CERTIFICATE = new ErrorType( 70, "Can't verify certificate" );
+    public static final ErrorType KRB_ERR_INVALID_CERTIFICATE = new ErrorType( 71, "Invalid certificate" );
+    public static final ErrorType KRB_ERR_REVOKED_CERTIFICATE = new ErrorType( 72, "Revoked certificate" );
+    public static final ErrorType KRB_ERR_REVOCATION_STATUS_UNKNOWN = new ErrorType( 73, "Revocation status unknown" );
+    public static final ErrorType KRB_ERR_REVOCATION_STATUS_UNAVAILABLE = new ErrorType( 74,
+        "Revocation status unavailable" );
+    public static final ErrorType KRB_ERR_CLIENT_NAME_MISMATCH = new ErrorType( 75, "Client names do not match" );
+    public static final ErrorType KRB_ERR_KDC_NAME_MISMATCH = new ErrorType( 76, "KDC names do not match" );
 
     /** Array for building a List of VALUES. */
-    private static final ErrorType[] values = {
-            KDC_ERR_NONE,
-            KDC_ERR_NAME_EXP,
-            KDC_ERR_SERVICE_EXP,
-            KDC_ERR_BAD_PVNO,
-            KDC_ERR_C_OLD_MAST_KVNO,
-            KDC_ERR_S_OLD_MAST_KVNO,
-            KDC_ERR_C_PRINCIPAL_UNKNOWN,
-            KDC_ERR_S_PRINCIPAL_UNKNOWN,
-            KDC_ERR_PRINCIPAL_NOT_UNIQUE,
-            KDC_ERR_NULL_KEY,
-            KDC_ERR_CANNOT_POSTDATE,
-            KDC_ERR_NEVER_VALID,
-            KDC_ERR_POLICY,
-            KDC_ERR_BADOPTION,
-            KDC_ERR_ETYPE_NOSUPP,
-            KDC_ERR_SUMTYPE_NOSUPP,
-            KDC_ERR_PADATA_TYPE_NOSUPP,
-            KDC_ERR_TRTYPE_NOSUPP,
-            KDC_ERR_CLIENT_REVOKED,
-            KDC_ERR_SERVICE_REVOKED,
-            KDC_ERR_TGT_REVOKED,
-            KDC_ERR_CLIENT_NOTYET,
-            KDC_ERR_SERVICE_NOTYET,
-            KDC_ERR_KEY_EXPIRED,
-            KDC_ERR_PREAUTH_FAILED,
-            KDC_ERR_PREAUTH_REQUIRED,
-            KDC_ERR_SERVER_NOMATCH,
-            KDC_ERR_MUST_USE_USER2USER,
-            KDC_ERR_PATH_NOT_ACCEPTED,
-            KDC_ERR_SVC_UNAVAILABLE,
-            KRB_AP_ERR_BAD_INTEGRITY,
-            KRB_AP_ERR_TKT_EXPIRED,
-            KRB_AP_ERR_TKT_NYV,
-            KRB_AP_ERR_REPEAT,
-            KRB_AP_ERR_NOT_US,
-            KRB_AP_ERR_BADMATCH,
-            KRB_AP_ERR_SKEW,
-            KRB_AP_ERR_BADADDR,
-            KRB_AP_ERR_BADVERSION,
-            KRB_AP_ERR_MSG_TYPE,
-            KRB_AP_ERR_MODIFIED,
-            KRB_AP_ERR_BADORDER,
-            KRB_AP_ERR_BADKEYVER,
-            KRB_AP_ERR_NOKEY,
-            KRB_AP_ERR_MUT_FAIL,
-            KRB_AP_ERR_BADDIRECTION,
-            KRB_AP_ERR_METHOD,
-            KRB_AP_ERR_BADSEQ,
-            KRB_AP_ERR_INAPP_CKSUM,
-            KRB_ERR_GENERIC,
-            KRB_ERR_FIELD_TOOLONG,
-            KRB_ERR_CLIENT_NOT_TRUSTED,
-            KRB_ERR_KDC_NOT_TRUSTED,
-            KRB_ERR_INVALID_SIG,
-            KRB_ERR_KEY_TOO_WEAK,
-            KRB_ERR_CERTIFICATE_MISMATCH,
-            KRB_AP_ERR_NO_TGT,
-            KRB_ERR_WRONG_REALM,
-            KRB_AP_ERR_USER_TO_USER_REQUIRED,
-            KRB_ERR_CANT_VERIFY_CERTIFICATE,
-            KRB_ERR_INVALID_CERTIFICATE,
-            KRB_ERR_REVOKED_CERTIFICATE,
-            KRB_ERR_REVOCATION_STATUS_UNKNOWN,
-            KRB_ERR_REVOCATION_STATUS_UNAVAILABLE,
-            KRB_ERR_CLIENT_NAME_MISMATCH,
-            KRB_ERR_KDC_NAME_MISMATCH
-    };
+    private static final ErrorType[] values =
+        { KDC_ERR_NONE, KDC_ERR_NAME_EXP, KDC_ERR_SERVICE_EXP, KDC_ERR_BAD_PVNO, KDC_ERR_C_OLD_MAST_KVNO,
+            KDC_ERR_S_OLD_MAST_KVNO, KDC_ERR_C_PRINCIPAL_UNKNOWN, KDC_ERR_S_PRINCIPAL_UNKNOWN,
+            KDC_ERR_PRINCIPAL_NOT_UNIQUE, KDC_ERR_NULL_KEY, KDC_ERR_CANNOT_POSTDATE, KDC_ERR_NEVER_VALID,
+            KDC_ERR_POLICY, KDC_ERR_BADOPTION, KDC_ERR_ETYPE_NOSUPP, KDC_ERR_SUMTYPE_NOSUPP,
+            KDC_ERR_PADATA_TYPE_NOSUPP, KDC_ERR_TRTYPE_NOSUPP, KDC_ERR_CLIENT_REVOKED, KDC_ERR_SERVICE_REVOKED,
+            KDC_ERR_TGT_REVOKED, KDC_ERR_CLIENT_NOTYET, KDC_ERR_SERVICE_NOTYET, KDC_ERR_KEY_EXPIRED,
+            KDC_ERR_PREAUTH_FAILED, KDC_ERR_PREAUTH_REQUIRED, KDC_ERR_SERVER_NOMATCH, KDC_ERR_MUST_USE_USER2USER,
+            KDC_ERR_PATH_NOT_ACCEPTED, KDC_ERR_SVC_UNAVAILABLE, KRB_AP_ERR_BAD_INTEGRITY, KRB_AP_ERR_TKT_EXPIRED,
+            KRB_AP_ERR_TKT_NYV, KRB_AP_ERR_REPEAT, KRB_AP_ERR_NOT_US, KRB_AP_ERR_BADMATCH, KRB_AP_ERR_SKEW,
+            KRB_AP_ERR_BADADDR, KRB_AP_ERR_BADVERSION, KRB_AP_ERR_MSG_TYPE, KRB_AP_ERR_MODIFIED, KRB_AP_ERR_BADORDER,
+            KRB_AP_ERR_BADKEYVER, KRB_AP_ERR_NOKEY, KRB_AP_ERR_MUT_FAIL, KRB_AP_ERR_BADDIRECTION, KRB_AP_ERR_METHOD,
+            KRB_AP_ERR_BADSEQ, KRB_AP_ERR_INAPP_CKSUM, KRB_ERR_GENERIC, KRB_ERR_FIELD_TOOLONG,
+            KRB_ERR_CLIENT_NOT_TRUSTED, KRB_ERR_KDC_NOT_TRUSTED, KRB_ERR_INVALID_SIG, KRB_ERR_KEY_TOO_WEAK,
+            KRB_ERR_CERTIFICATE_MISMATCH, KRB_AP_ERR_NO_TGT, KRB_ERR_WRONG_REALM, KRB_AP_ERR_USER_TO_USER_REQUIRED,
+            KRB_ERR_CANT_VERIFY_CERTIFICATE, KRB_ERR_INVALID_CERTIFICATE, KRB_ERR_REVOKED_CERTIFICATE,
+            KRB_ERR_REVOCATION_STATUS_UNKNOWN, KRB_ERR_REVOCATION_STATUS_UNAVAILABLE, KRB_ERR_CLIENT_NAME_MISMATCH,
+            KRB_ERR_KDC_NAME_MISMATCH };
 
     /** a list of all the error type constants */
     public static final List VALUES = Collections.unmodifiableList( Arrays.asList( values ) );
@@ -244,15 +148,17 @@
     /** the value/code for the error type */
     private final int ordinal;
 
+
     /**
      * Private constructor prevents construction outside of this class.
      */
-    private ErrorType( int ordinal, String name )
+    private ErrorType(int ordinal, String name)
     {
         this.ordinal = ordinal;
         this.name = name;
     }
 
+
     /**
      * Returns the message for this Kerberos error.
      *
@@ -263,6 +169,7 @@
         return name;
     }
 
+
     /**
      * Returns the message for this Kerberos error.
      *
@@ -273,6 +180,7 @@
         return name;
     }
 
+
     /**
      * Compares this type to another object hopefully one that is of the same
      * type.
@@ -282,9 +190,10 @@
      */
     public int compareTo( Object that )
     {
-        return ordinal - ( (ErrorType) that ).ordinal;
+        return ordinal - ( ( ErrorType ) that ).ordinal;
     }
 
+
     /**
      * Gets the ordinal by its ordinal value.
      *
@@ -295,14 +204,15 @@
     {
         for ( int ii = 0; ii < values.length; ii++ )
         {
-            if ( values[ ii ].ordinal == ordinal )
+            if ( values[ii].ordinal == ordinal )
             {
-                return values[ ii ];
+                return values[ii];
             }
         }
 
         return KRB_ERR_GENERIC;
     }
+
 
     /**
      * Gets the ordinal value associated with this Kerberos error.

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/exceptions/KerberosException.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/exceptions/KerberosException.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/exceptions/KerberosException.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/exceptions/KerberosException.java Fri Feb 10 02:48:07 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.kerberos.exceptions;
 
+
 /**
  * The root of the Kerberos exception hierarchy.
  *
@@ -37,6 +38,7 @@
      */
     private byte[] explanatoryData;
 
+
     // ------------------------------------------------------------------------
     // C O N S T R U C T O R S
     // ------------------------------------------------------------------------
@@ -47,13 +49,14 @@
      * @param errorCode the error code associated with this KerberosException
      * @param msg the standard Kerberos error message for this KerberosException
      */
-    public KerberosException( int errorCode, String msg )
+    public KerberosException(int errorCode, String msg)
     {
         super( msg );
 
         this.errorCode = errorCode;
     }
 
+
     /**
      * Creates a KerberosException with an error code, a message and an
      * underlying throwable that caused this fault.
@@ -62,13 +65,14 @@
      * @param msg the standard Kerberos error message for this KerberosException
      * @param cause the underlying failure, if any
      */
-    public KerberosException( int errorCode, String msg, Throwable cause )
+    public KerberosException(int errorCode, String msg, Throwable cause)
     {
         super( msg, cause );
 
         this.errorCode = errorCode;
     }
 
+
     /**
      * Creates a KerberosException with an error code, a message, and data
      * helping to explain what caused this fault.
@@ -77,7 +81,7 @@
      * @param msg the standard Kerberos error message for this KerberosException
      * @param explanatoryData data helping to explain this fault, if any
      */
-    public KerberosException( int errorCode, String msg, byte[] explanatoryData )
+    public KerberosException(int errorCode, String msg, byte[] explanatoryData)
     {
         super( msg );
 
@@ -85,31 +89,34 @@
         this.explanatoryData = explanatoryData;
     }
 
+
     /**
      * Creates a KerberosException with an error type.
      *
      * @param errorType the error type associated with this KerberosException
      */
-    public KerberosException( ErrorType errorType )
+    public KerberosException(ErrorType errorType)
     {
         super( errorType.getMessage() );
 
         this.errorCode = errorType.getOrdinal();
     }
 
+
     /**
      * Creates a KerberosException with an error type and a custom error message.
      *
      * @param errorType the error type associated with this KerberosException
      * @param msg a custom error message for this KerberosException
      */
-    public KerberosException( ErrorType errorType, String msg )
+    public KerberosException(ErrorType errorType, String msg)
     {
         super( msg );
 
         this.errorCode = errorType.getOrdinal();
     }
 
+
     /**
      * Creates a KerberosException with an error type and data helping to
      * explain what caused this fault.
@@ -117,7 +124,7 @@
      * @param errorType the error type associated with this KerberosException
      * @param explanatoryData data helping to explain this fault, if any
      */
-    public KerberosException( ErrorType errorType, byte[] explanatoryData )
+    public KerberosException(ErrorType errorType, byte[] explanatoryData)
     {
         super( errorType.getMessage() );
 
@@ -125,6 +132,7 @@
         this.explanatoryData = explanatoryData;
     }
 
+
     /**
      * Gets the protocol error code associated with this KerberosException.
      *
@@ -134,6 +142,7 @@
     {
         return this.errorCode;
     }
+
 
     /**
      * Gets the explanatory data associated with this KerberosException.

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/ApplicationRequestDecoder.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/ApplicationRequestDecoder.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/ApplicationRequestDecoder.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/ApplicationRequestDecoder.java Fri Feb 10 02:48:07 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.kerberos.io.decoder;
 
+
 import java.io.IOException;
 import java.util.Enumeration;
 
@@ -30,60 +31,61 @@
 import org.apache.kerberos.messages.MessageType;
 import org.apache.kerberos.messages.value.ApOptions;
 
+
 public class ApplicationRequestDecoder
 {
     public ApplicationRequest decode( byte[] encodedAuthHeader ) throws IOException
     {
         ASN1InputStream ais = new ASN1InputStream( encodedAuthHeader );
 
-        DERApplicationSpecific app = (DERApplicationSpecific) ais.readObject();
+        DERApplicationSpecific app = ( DERApplicationSpecific ) ais.readObject();
 
-        DERSequence apreq = (DERSequence) app.getObject();
+        DERSequence apreq = ( DERSequence ) app.getObject();
 
         return decodeApplicationRequestSequence( apreq );
     }
-	
-	/*
-        AP-REQ ::=      [APPLICATION 14] SEQUENCE {
-        pvno[0]                       INTEGER,
-        msg-type[1]                   INTEGER,
-
-        ap-options[2]                 APOptions,
-        ticket[3]                     Ticket,
-        authenticator[4]              EncryptedData
-        }
-    */
-	private ApplicationRequest decodeApplicationRequestSequence( DERSequence sequence )
-            throws IOException
+
+
+    /*
+     AP-REQ ::=      [APPLICATION 14] SEQUENCE {
+     pvno[0]                       INTEGER,
+     msg-type[1]                   INTEGER,
+
+     ap-options[2]                 APOptions,
+     ticket[3]                     Ticket,
+     authenticator[4]              EncryptedData
+     }
+     */
+    private ApplicationRequest decodeApplicationRequestSequence( DERSequence sequence ) throws IOException
     {
         ApplicationRequest authHeader = new ApplicationRequest();
 
         for ( Enumeration e = sequence.getObjects(); e.hasMoreElements(); )
         {
-            DERTaggedObject object = ( (DERTaggedObject) e.nextElement() );
+            DERTaggedObject object = ( ( DERTaggedObject ) e.nextElement() );
             int tag = object.getTagNo();
             DEREncodable derObject = object.getObject();
 
             switch ( tag )
             {
                 case 0:
-                    DERInteger tag0 = (DERInteger) derObject;
+                    DERInteger tag0 = ( DERInteger ) derObject;
                     authHeader.setProtocolVersionNumber( tag0.intValue() );
                     break;
                 case 1:
-                    DERInteger tag1 = (DERInteger) derObject;
+                    DERInteger tag1 = ( DERInteger ) derObject;
                     authHeader.setMessageType( MessageType.getTypeByOrdinal( tag1.intValue() ) );
                     break;
                 case 2:
-                    DERBitString apOptions = (DERBitString) derObject;
+                    DERBitString apOptions = ( DERBitString ) derObject;
                     authHeader.setApOptions( new ApOptions( apOptions.getOctets() ) );
                     break;
                 case 3:
-                    DERApplicationSpecific tag3 = (DERApplicationSpecific) derObject;
+                    DERApplicationSpecific tag3 = ( DERApplicationSpecific ) derObject;
                     authHeader.setTicket( TicketDecoder.decode( tag3 ) );
                     break;
                 case 4:
-                    DERSequence tag4 = (DERSequence) derObject;
+                    DERSequence tag4 = ( DERSequence ) derObject;
                     authHeader.setEncPart( EncryptedDataDecoder.decode( tag4 ) );
                     break;
             }

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/AuthenticatorDecoder.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/AuthenticatorDecoder.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/AuthenticatorDecoder.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/AuthenticatorDecoder.java Fri Feb 10 02:48:07 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.kerberos.io.decoder;
 
+
 import java.io.IOException;
 import java.util.Enumeration;
 
@@ -31,6 +32,7 @@
 import org.apache.kerberos.messages.components.Authenticator;
 import org.apache.kerberos.messages.components.AuthenticatorModifier;
 
+
 public class AuthenticatorDecoder implements Decoder, DecoderFactory
 {
     public Decoder getDecoder()
@@ -38,79 +40,81 @@
         return new AuthenticatorDecoder();
     }
 
+
     public Encodable decode( byte[] encodedAuthenticator ) throws IOException
     {
         ASN1InputStream ais = new ASN1InputStream( encodedAuthenticator );
 
-        DERApplicationSpecific app = (DERApplicationSpecific) ais.readObject();
+        DERApplicationSpecific app = ( DERApplicationSpecific ) ais.readObject();
 
-        DERSequence sequence = (DERSequence) app.getObject();
+        DERSequence sequence = ( DERSequence ) app.getObject();
 
         return decode( sequence );
     }
-	
-	/**
-	 * -- Unencrypted authenticator
-	 * Authenticator ::=    [APPLICATION 2] SEQUENCE
-	 * {
-	 *                authenticator-vno[0]          INTEGER,
-	 *                crealm[1]                     Realm,
-	 *                cname[2]                      PrincipalName,
-	 *                cksum[3]                      Checksum OPTIONAL,
-	 *                cusec[4]                      INTEGER,
-	 *                ctime[5]                      KerberosTime,
-	 *                subkey[6]                     EncryptionKey OPTIONAL,
-	 *                seq-number[7]                 INTEGER OPTIONAL,
+
+
+    /**
+     * -- Unencrypted authenticator
+     * Authenticator ::=    [APPLICATION 2] SEQUENCE
+     * {
+     *                authenticator-vno[0]          INTEGER,
+     *                crealm[1]                     Realm,
+     *                cname[2]                      PrincipalName,
+     *                cksum[3]                      Checksum OPTIONAL,
+     *                cusec[4]                      INTEGER,
+     *                ctime[5]                      KerberosTime,
+     *                subkey[6]                     EncryptionKey OPTIONAL,
+     *                seq-number[7]                 INTEGER OPTIONAL,
      *  
-	 *                authorization-data[8]         AuthorizationData OPTIONAL
-	 * }
-	 */
-	protected static Authenticator decode( DERSequence sequence )
+     *                authorization-data[8]         AuthorizationData OPTIONAL
+     * }
+     */
+    protected static Authenticator decode( DERSequence sequence )
     {
         AuthenticatorModifier modifier = new AuthenticatorModifier();
 
         for ( Enumeration e = sequence.getObjects(); e.hasMoreElements(); )
         {
-            DERTaggedObject object = (DERTaggedObject) e.nextElement();
+            DERTaggedObject object = ( DERTaggedObject ) e.nextElement();
             int tag = object.getTagNo();
             DEREncodable derObject = object.getObject();
 
             switch ( tag )
             {
                 case 0:
-                    DERInteger tag0 = (DERInteger) derObject;
+                    DERInteger tag0 = ( DERInteger ) derObject;
                     modifier.setVersionNumber( tag0.intValue() );
                     break;
                 case 1:
-                    DERGeneralString tag1 = (DERGeneralString) derObject;
+                    DERGeneralString tag1 = ( DERGeneralString ) derObject;
                     modifier.setClientRealm( tag1.getString() );
                     break;
                 case 2:
-                    DERSequence tag2 = (DERSequence) derObject;
+                    DERSequence tag2 = ( DERSequence ) derObject;
                     modifier.setClientName( PrincipalNameDecoder.decode( tag2 ) );
                     break;
                 case 3:
-                    DERSequence tag3 = (DERSequence) derObject;
+                    DERSequence tag3 = ( DERSequence ) derObject;
                     modifier.setChecksum( ChecksumDecoder.decode( tag3 ) );
                     break;
                 case 4:
-                    DERInteger tag4 = (DERInteger) derObject;
+                    DERInteger tag4 = ( DERInteger ) derObject;
                     modifier.setClientMicroSecond( tag4.intValue() );
                     break;
                 case 5:
-                    DERGeneralizedTime tag5 = (DERGeneralizedTime) derObject;
+                    DERGeneralizedTime tag5 = ( DERGeneralizedTime ) derObject;
                     modifier.setClientTime( KerberosTimeDecoder.decode( tag5 ) );
                     break;
                 case 6:
-                    DERSequence tag6 = (DERSequence) derObject;
+                    DERSequence tag6 = ( DERSequence ) derObject;
                     modifier.setSubSessionKey( EncryptionKeyDecoder.decode( tag6 ) );
                     break;
                 case 7:
-                    DERInteger tag7 = (DERInteger) derObject;
+                    DERInteger tag7 = ( DERInteger ) derObject;
                     modifier.setSequenceNumber( tag7.intValue() );
                     break;
                 case 8:
-                    DERSequence tag8 = (DERSequence) derObject;
+                    DERSequence tag8 = ( DERSequence ) derObject;
                     modifier.setAuthorizationData( AuthorizationDataDecoder.decodeSequence( tag8 ) );
                     break;
             }

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/AuthorizationDataDecoder.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/AuthorizationDataDecoder.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/AuthorizationDataDecoder.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/AuthorizationDataDecoder.java Fri Feb 10 02:48:07 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.kerberos.io.decoder;
 
+
 import java.io.IOException;
 import java.util.Enumeration;
 
@@ -30,6 +31,7 @@
 import org.apache.kerberos.messages.value.AuthorizationDataEntry;
 import org.apache.kerberos.messages.value.AuthorizationType;
 
+
 public class AuthorizationDataDecoder implements Decoder, DecoderFactory
 {
     public Decoder getDecoder()
@@ -37,28 +39,30 @@
         return new AuthorizationDataDecoder();
     }
 
+
     public Encodable decode( byte[] encodedAuthData ) throws IOException
     {
         ASN1InputStream ais = new ASN1InputStream( encodedAuthData );
 
-        DERSequence sequence = (DERSequence) ais.readObject();
+        DERSequence sequence = ( DERSequence ) ais.readObject();
 
         return decodeSequence( sequence );
     }
-	
-	/**
-	 * AuthorizationData ::=   SEQUENCE OF SEQUENCE {
+
+
+    /**
+     * AuthorizationData ::=   SEQUENCE OF SEQUENCE {
      *     ad-type[0]               INTEGER,
      *     ad-data[1]               OCTET STRING
      * }
      */
-	protected static AuthorizationData decodeSequence( DERSequence sequence )
+    protected static AuthorizationData decodeSequence( DERSequence sequence )
     {
         AuthorizationData authData = new AuthorizationData();
 
         for ( Enumeration e = sequence.getObjects(); e.hasMoreElements(); )
         {
-            DERSequence object = (DERSequence) e.nextElement();
+            DERSequence object = ( DERSequence ) e.nextElement();
             AuthorizationDataEntry entry = decodeAuthorizationEntry( object );
             authData.add( entry );
         }
@@ -66,6 +70,7 @@
         return authData;
     }
 
+
     protected static AuthorizationDataEntry decodeAuthorizationEntry( DERSequence sequence )
     {
         AuthorizationType type = AuthorizationType.NULL;
@@ -73,18 +78,18 @@
 
         for ( Enumeration e = sequence.getObjects(); e.hasMoreElements(); )
         {
-            DERTaggedObject object = (DERTaggedObject) e.nextElement();
+            DERTaggedObject object = ( DERTaggedObject ) e.nextElement();
             int tag = object.getTagNo();
             DEREncodable derObject = object.getObject();
 
             switch ( tag )
             {
                 case 0:
-                    DERInteger tag0 = (DERInteger) derObject;
+                    DERInteger tag0 = ( DERInteger ) derObject;
                     type = AuthorizationType.getTypeByOrdinal( tag0.intValue() );
                     break;
                 case 1:
-                    DEROctetString tag1 = (DEROctetString) derObject;
+                    DEROctetString tag1 = ( DEROctetString ) derObject;
                     data = tag1.getOctets();
                     break;
             }

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/ChecksumDecoder.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/ChecksumDecoder.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/ChecksumDecoder.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/ChecksumDecoder.java Fri Feb 10 02:48:07 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.kerberos.io.decoder;
 
+
 import java.util.Enumeration;
 
 import org.apache.directory.shared.asn1.der.DEREncodable;
@@ -26,33 +27,34 @@
 import org.apache.kerberos.crypto.checksum.ChecksumType;
 import org.apache.kerberos.messages.value.Checksum;
 
+
 public class ChecksumDecoder
 {
-	/**
-	 * Checksum ::=   SEQUENCE {
+    /**
+     * Checksum ::=   SEQUENCE {
      *          cksumtype[0]   INTEGER,
      *          checksum[1]    OCTET STRING
      * }
-	 */
-	public static Checksum decode( DERSequence sequence )
+     */
+    public static Checksum decode( DERSequence sequence )
     {
         ChecksumType type = ChecksumType.NULL;
         byte[] data = null;
 
         for ( Enumeration e = sequence.getObjects(); e.hasMoreElements(); )
         {
-            DERTaggedObject object = (DERTaggedObject) e.nextElement();
+            DERTaggedObject object = ( DERTaggedObject ) e.nextElement();
             int tag = object.getTagNo();
             DEREncodable derObject = object.getObject();
 
             switch ( tag )
             {
                 case 0:
-                    DERInteger tag0 = (DERInteger) derObject;
+                    DERInteger tag0 = ( DERInteger ) derObject;
                     type = ChecksumType.getTypeByOrdinal( tag0.intValue() );
                     break;
                 case 1:
-                    DEROctetString tag1 = (DEROctetString) derObject;
+                    DEROctetString tag1 = ( DEROctetString ) derObject;
                     data = tag1.getOctets();
                     break;
             }

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/Decoder.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/Decoder.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/Decoder.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/Decoder.java Fri Feb 10 02:48:07 2006
@@ -17,9 +17,11 @@
 
 package org.apache.kerberos.io.decoder;
 
+
 import java.io.IOException;
 
 import org.apache.kerberos.messages.Encodable;
+
 
 public interface Decoder
 {

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/DecoderFactory.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/DecoderFactory.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/DecoderFactory.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/DecoderFactory.java Fri Feb 10 02:48:07 2006
@@ -17,6 +17,7 @@
 
 package org.apache.kerberos.io.decoder;
 
+
 public interface DecoderFactory
 {
     public Decoder getDecoder();

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/EncKrbPrivPartDecoder.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/EncKrbPrivPartDecoder.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/EncKrbPrivPartDecoder.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/EncKrbPrivPartDecoder.java Fri Feb 10 02:48:07 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.kerberos.io.decoder;
 
+
 import java.io.IOException;
 import java.util.Enumeration;
 
@@ -31,6 +32,7 @@
 import org.apache.kerberos.messages.components.EncKrbPrivPart;
 import org.apache.kerberos.messages.components.EncKrbPrivPartModifier;
 
+
 public class EncKrbPrivPartDecoder implements Decoder, DecoderFactory
 {
     public Decoder getDecoder()
@@ -38,51 +40,53 @@
         return new EncKrbPrivPartDecoder();
     }
 
+
     public Encodable decode( byte[] encodedPrivatePart ) throws IOException
     {
         ASN1InputStream ais = new ASN1InputStream( encodedPrivatePart );
 
-        DERApplicationSpecific app = (DERApplicationSpecific) ais.readObject();
+        DERApplicationSpecific app = ( DERApplicationSpecific ) ais.readObject();
 
-        DERSequence privatePart = (DERSequence) app.getObject();
+        DERSequence privatePart = ( DERSequence ) app.getObject();
 
         return decodePrivatePartSequence( privatePart );
     }
 
+
     private EncKrbPrivPart decodePrivatePartSequence( DERSequence sequence )
     {
         EncKrbPrivPartModifier modifier = new EncKrbPrivPartModifier();
 
         for ( Enumeration e = sequence.getObjects(); e.hasMoreElements(); )
         {
-            DERTaggedObject object = (DERTaggedObject) e.nextElement();
+            DERTaggedObject object = ( DERTaggedObject ) e.nextElement();
             int tag = object.getTagNo();
             DEREncodable derObject = object.getObject();
 
             switch ( tag )
             {
                 case 0:
-                    DEROctetString tag0 = (DEROctetString) derObject;
+                    DEROctetString tag0 = ( DEROctetString ) derObject;
                     modifier.setUserData( tag0.getOctets() );
                     break;
                 case 1:
-                    DERGeneralizedTime tag1 = (DERGeneralizedTime) derObject;
+                    DERGeneralizedTime tag1 = ( DERGeneralizedTime ) derObject;
                     modifier.setTimestamp( KerberosTimeDecoder.decode( tag1 ) );
                     break;
                 case 2:
-                    DERInteger tag2 = (DERInteger) derObject;
+                    DERInteger tag2 = ( DERInteger ) derObject;
                     modifier.setMicroSecond( new Integer( tag2.intValue() ) );
                     break;
                 case 3:
-                    DERInteger tag3 = (DERInteger) derObject;
+                    DERInteger tag3 = ( DERInteger ) derObject;
                     modifier.setSequenceNumber( new Integer( tag3.intValue() ) );
                     break;
                 case 4:
-                    DERSequence tag4 = (DERSequence) derObject;
+                    DERSequence tag4 = ( DERSequence ) derObject;
                     modifier.setSenderAddress( HostAddressDecoder.decode( tag4 ) );
                     break;
                 case 5:
-                    DERSequence tag5 = (DERSequence) derObject;
+                    DERSequence tag5 = ( DERSequence ) derObject;
                     modifier.setRecipientAddress( HostAddressDecoder.decode( tag5 ) );
                     break;
             }

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/EncTicketPartDecoder.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/EncTicketPartDecoder.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/EncTicketPartDecoder.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/EncTicketPartDecoder.java Fri Feb 10 02:48:07 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.kerberos.io.decoder;
 
+
 import java.io.IOException;
 import java.util.Enumeration;
 
@@ -36,6 +37,7 @@
 import org.apache.kerberos.messages.value.TransitedEncoding;
 import org.apache.kerberos.messages.value.TransitedEncodingType;
 
+
 public class EncTicketPartDecoder implements Decoder, DecoderFactory
 {
     public Decoder getDecoder()
@@ -43,86 +45,88 @@
         return new EncTicketPartDecoder();
     }
 
+
     public Encodable decode( byte[] encodedTicket ) throws IOException
     {
         ASN1InputStream ais = new ASN1InputStream( encodedTicket );
 
-        DERApplicationSpecific app = (DERApplicationSpecific) ais.readObject();
+        DERApplicationSpecific app = ( DERApplicationSpecific ) ais.readObject();
 
-        DERSequence sequence = (DERSequence) app.getObject();
+        DERSequence sequence = ( DERSequence ) app.getObject();
 
         return decodeEncTicketPartSequence( sequence );
     }
-	
-	/*
-	-- Encrypted part of ticket
-	EncTicketPart ::=     [APPLICATION 3] SEQUENCE {
-	                      flags[0]             TicketFlags,
-	                      key[1]               EncryptionKey,
-	                      crealm[2]            Realm,
-	                      cname[3]             PrincipalName,
-	                      transited[4]         TransitedEncoding,
-	                      authtime[5]          KerberosTime,
-	                      starttime[6]         KerberosTime OPTIONAL,
-	                      endtime[7]           KerberosTime,
-	                      renew-till[8]        KerberosTime OPTIONAL,
-	                      caddr[9]             HostAddresses OPTIONAL,
-	                      authorization-data[10]   AuthorizationData OPTIONAL
-	}*/
-	private EncTicketPart decodeEncTicketPartSequence( DERSequence sequence )
+
+
+    /*
+     -- Encrypted part of ticket
+     EncTicketPart ::=     [APPLICATION 3] SEQUENCE {
+     flags[0]             TicketFlags,
+     key[1]               EncryptionKey,
+     crealm[2]            Realm,
+     cname[3]             PrincipalName,
+     transited[4]         TransitedEncoding,
+     authtime[5]          KerberosTime,
+     starttime[6]         KerberosTime OPTIONAL,
+     endtime[7]           KerberosTime,
+     renew-till[8]        KerberosTime OPTIONAL,
+     caddr[9]             HostAddresses OPTIONAL,
+     authorization-data[10]   AuthorizationData OPTIONAL
+     }*/
+    private EncTicketPart decodeEncTicketPartSequence( DERSequence sequence )
     {
         EncTicketPartModifier modifier = new EncTicketPartModifier();
 
         for ( Enumeration e = sequence.getObjects(); e.hasMoreElements(); )
         {
-            DERTaggedObject object = (DERTaggedObject) e.nextElement();
+            DERTaggedObject object = ( DERTaggedObject ) e.nextElement();
             int tag = object.getTagNo();
             DEREncodable derObject = object.getObject();
 
             switch ( tag )
             {
                 case 0:
-                    DERBitString tag0 = (DERBitString) derObject;
+                    DERBitString tag0 = ( DERBitString ) derObject;
                     modifier.setFlags( new TicketFlags( tag0.getOctets() ) );
                     break;
                 case 1:
-                    DERSequence tag1 = (DERSequence) derObject;
+                    DERSequence tag1 = ( DERSequence ) derObject;
                     modifier.setSessionKey( EncryptionKeyDecoder.decode( tag1 ) );
                     break;
                 case 2:
-                    DERGeneralString tag2 = (DERGeneralString) derObject;
+                    DERGeneralString tag2 = ( DERGeneralString ) derObject;
                     modifier.setClientRealm( tag2.getString() );
                     break;
                 case 3:
-                    DERSequence tag3 = (DERSequence) derObject;
+                    DERSequence tag3 = ( DERSequence ) derObject;
                     modifier.setClientName( PrincipalNameDecoder.decode( tag3 ) );
                     break;
                 case 4:
-                    DERSequence tag4 = (DERSequence) derObject;
+                    DERSequence tag4 = ( DERSequence ) derObject;
                     modifier.setTransitedEncoding( decodeTransitedEncoding( tag4 ) );
                     break;
                 case 5:
-                    DERGeneralizedTime tag5 = (DERGeneralizedTime) derObject;
+                    DERGeneralizedTime tag5 = ( DERGeneralizedTime ) derObject;
                     modifier.setAuthTime( KerberosTimeDecoder.decode( tag5 ) );
                     break;
                 case 6:
-                    DERGeneralizedTime tag6 = (DERGeneralizedTime) derObject;
+                    DERGeneralizedTime tag6 = ( DERGeneralizedTime ) derObject;
                     modifier.setStartTime( KerberosTimeDecoder.decode( tag6 ) );
                     break;
                 case 7:
-                    DERGeneralizedTime tag7 = (DERGeneralizedTime) derObject;
+                    DERGeneralizedTime tag7 = ( DERGeneralizedTime ) derObject;
                     modifier.setEndTime( KerberosTimeDecoder.decode( tag7 ) );
                     break;
                 case 8:
-                    DERGeneralizedTime tag8 = (DERGeneralizedTime) derObject;
+                    DERGeneralizedTime tag8 = ( DERGeneralizedTime ) derObject;
                     modifier.setRenewTill( KerberosTimeDecoder.decode( tag8 ) );
                     break;
                 case 9:
-                    DERSequence tag9 = (DERSequence) derObject;
+                    DERSequence tag9 = ( DERSequence ) derObject;
                     modifier.setClientAddresses( HostAddressDecoder.decodeSequence( tag9 ) );
                     break;
                 case 10:
-                    DERSequence tag10 = (DERSequence) derObject;
+                    DERSequence tag10 = ( DERSequence ) derObject;
                     modifier.setAuthorizationData( AuthorizationDataDecoder.decodeSequence( tag10 ) );
                     break;
             }
@@ -130,6 +134,7 @@
         return modifier.getEncTicketPart();
     }
 
+
     /*
      * TransitedEncoding ::= SEQUENCE {
      *   tr-type[0] INTEGER, -- must be
@@ -143,18 +148,18 @@
 
         for ( Enumeration e = sequence.getObjects(); e.hasMoreElements(); )
         {
-            DERTaggedObject object = (DERTaggedObject) e.nextElement();
+            DERTaggedObject object = ( DERTaggedObject ) e.nextElement();
             int tag = object.getTagNo();
             DEREncodable derObject = object.getObject();
 
             switch ( tag )
             {
                 case 0:
-                    DERInteger tag0 = (DERInteger) derObject;
+                    DERInteger tag0 = ( DERInteger ) derObject;
                     type = TransitedEncodingType.getTypeByOrdinal( tag0.intValue() );
                     break;
                 case 1:
-                    DEROctetString tag1 = (DEROctetString) derObject;
+                    DEROctetString tag1 = ( DEROctetString ) derObject;
                     contents = tag1.getOctets();
                     break;
             }

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/EncryptedDataDecoder.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/EncryptedDataDecoder.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/EncryptedDataDecoder.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/EncryptedDataDecoder.java Fri Feb 10 02:48:07 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.kerberos.io.decoder;
 
+
 import java.io.IOException;
 import java.util.Enumeration;
 
@@ -29,46 +30,48 @@
 import org.apache.kerberos.messages.value.EncryptedData;
 import org.apache.kerberos.messages.value.EncryptedDataModifier;
 
+
 public class EncryptedDataDecoder
 {
     public static EncryptedData decode( byte[] encodedEncryptedData ) throws IOException
     {
         ASN1InputStream ais = new ASN1InputStream( encodedEncryptedData );
 
-        DERSequence sequence = (DERSequence) ais.readObject();
+        DERSequence sequence = ( DERSequence ) ais.readObject();
 
         return decode( sequence );
     }
-	
-	/**
-	 * EncryptedData ::=   SEQUENCE {
-	 *             etype[0]     INTEGER, -- EncryptionEngine
-	 *             kvno[1]      INTEGER OPTIONAL,
-	 *             cipher[2]    OCTET STRING -- ciphertext
-	 * }
-	 */
-	public static EncryptedData decode( DERSequence sequence )
+
+
+    /**
+     * EncryptedData ::=   SEQUENCE {
+     *             etype[0]     INTEGER, -- EncryptionEngine
+     *             kvno[1]      INTEGER OPTIONAL,
+     *             cipher[2]    OCTET STRING -- ciphertext
+     * }
+     */
+    public static EncryptedData decode( DERSequence sequence )
     {
         EncryptedDataModifier modifier = new EncryptedDataModifier();
 
         for ( Enumeration e = sequence.getObjects(); e.hasMoreElements(); )
         {
-            DERTaggedObject object = (DERTaggedObject) e.nextElement();
+            DERTaggedObject object = ( DERTaggedObject ) e.nextElement();
             int tag = object.getTagNo();
             DEREncodable derObject = object.getObject();
 
             switch ( tag )
             {
                 case 0:
-                    DERInteger etype = (DERInteger) derObject;
+                    DERInteger etype = ( DERInteger ) derObject;
                     modifier.setEncryptionType( EncryptionType.getTypeByOrdinal( etype.intValue() ) );
                     break;
                 case 1:
-                    DERInteger kvno = (DERInteger) derObject;
+                    DERInteger kvno = ( DERInteger ) derObject;
                     modifier.setKeyVersion( kvno.intValue() );
                     break;
                 case 2:
-                    DEROctetString cipher = (DEROctetString) derObject;
+                    DEROctetString cipher = ( DEROctetString ) derObject;
                     modifier.setCipherText( cipher.getOctets() );
                     break;
             }

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/EncryptedTimestampDecoder.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/EncryptedTimestampDecoder.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/EncryptedTimestampDecoder.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/EncryptedTimestampDecoder.java Fri Feb 10 02:48:07 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.kerberos.io.decoder;
 
+
 import java.io.IOException;
 import java.util.Enumeration;
 
@@ -29,6 +30,7 @@
 import org.apache.kerberos.messages.value.EncryptedTimeStamp;
 import org.apache.kerberos.messages.value.EncryptedTimeStampModifier;
 
+
 /**
  * padata-type     ::= PA-ENC-TIMESTAMP
  * padata-value    ::= EncryptedData -- PA-ENC-TS-ENC
@@ -45,33 +47,35 @@
         return new EncryptedTimestampDecoder();
     }
 
+
     public Encodable decode( byte[] encodedEncryptedTimestamp ) throws IOException
     {
         ASN1InputStream ais = new ASN1InputStream( encodedEncryptedTimestamp );
 
-        DERSequence sequence = (DERSequence) ais.readObject();
+        DERSequence sequence = ( DERSequence ) ais.readObject();
 
         return decodeEncryptedTimestamp( sequence );
     }
 
+
     protected EncryptedTimeStamp decodeEncryptedTimestamp( DERSequence sequence )
     {
         EncryptedTimeStampModifier modifier = new EncryptedTimeStampModifier();
 
         for ( Enumeration e = sequence.getObjects(); e.hasMoreElements(); )
         {
-            DERTaggedObject object = (DERTaggedObject) e.nextElement();
+            DERTaggedObject object = ( DERTaggedObject ) e.nextElement();
             int tag = object.getTagNo();
             DEREncodable derObject = object.getObject();
 
             switch ( tag )
             {
                 case 0:
-                    DERGeneralizedTime tag0 = (DERGeneralizedTime) derObject;
+                    DERGeneralizedTime tag0 = ( DERGeneralizedTime ) derObject;
                     modifier.setKerberosTime( KerberosTimeDecoder.decode( tag0 ) );
                     break;
                 case 1:
-                    DERInteger tag1 = (DERInteger) derObject;
+                    DERInteger tag1 = ( DERInteger ) derObject;
                     modifier.setMicroSecond( tag1.intValue() );
                     break;
             }

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/EncryptionKeyDecoder.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/EncryptionKeyDecoder.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/EncryptionKeyDecoder.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/EncryptionKeyDecoder.java Fri Feb 10 02:48:07 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.kerberos.io.decoder;
 
+
 import java.util.Enumeration;
 
 import org.apache.directory.shared.asn1.der.DEREncodable;
@@ -26,33 +27,34 @@
 import org.apache.kerberos.crypto.encryption.EncryptionType;
 import org.apache.kerberos.messages.value.EncryptionKey;
 
+
 public class EncryptionKeyDecoder
 {
-	/**
+    /**
      * EncryptionKey ::=   SEQUENCE {
      *     keytype[0]    INTEGER,
      *     keyvalue[1]   OCTET STRING
      * }
      */
-	protected static EncryptionKey decode( DERSequence sequence )
+    protected static EncryptionKey decode( DERSequence sequence )
     {
         EncryptionType type = EncryptionType.NULL;
         byte[] data = null;
 
         for ( Enumeration e = sequence.getObjects(); e.hasMoreElements(); )
         {
-            DERTaggedObject object = (DERTaggedObject) e.nextElement();
+            DERTaggedObject object = ( DERTaggedObject ) e.nextElement();
             int tag = object.getTagNo();
             DEREncodable derObject = object.getObject();
 
             switch ( tag )
             {
                 case 0:
-                    DERInteger tag0 = (DERInteger) derObject;
+                    DERInteger tag0 = ( DERInteger ) derObject;
                     type = EncryptionType.getTypeByOrdinal( tag0.intValue() );
                     break;
                 case 1:
-                    DEROctetString tag1 = (DEROctetString) derObject;
+                    DEROctetString tag1 = ( DEROctetString ) derObject;
                     data = tag1.getOctets();
                     break;
             }

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/EncryptionTypeDecoder.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/EncryptionTypeDecoder.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/EncryptionTypeDecoder.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/EncryptionTypeDecoder.java Fri Feb 10 02:48:07 2006
@@ -16,27 +16,29 @@
  */
 package org.apache.kerberos.io.decoder;
 
+
 import java.util.Enumeration;
 
 import org.apache.directory.shared.asn1.der.DERInteger;
 import org.apache.directory.shared.asn1.der.DERSequence;
 import org.apache.kerberos.crypto.encryption.EncryptionType;
 
+
 public class EncryptionTypeDecoder
 {
-	/**
+    /**
      * etype[8]             SEQUENCE OF INTEGER, -- EncryptionType,
      *             -- in preference order
      */
-	protected static EncryptionType[] decode( DERSequence sequence )
+    protected static EncryptionType[] decode( DERSequence sequence )
     {
-        EncryptionType[] eTypes = new EncryptionType[ sequence.size() ];
+        EncryptionType[] eTypes = new EncryptionType[sequence.size()];
 
         int ii = 0;
         for ( Enumeration e = sequence.getObjects(); e.hasMoreElements(); )
         {
-            DERInteger object = (DERInteger) e.nextElement();
-            eTypes[ ii ] = EncryptionType.getTypeByOrdinal( object.intValue() );
+            DERInteger object = ( DERInteger ) e.nextElement();
+            eTypes[ii] = EncryptionType.getTypeByOrdinal( object.intValue() );
             ii++;
         }
 

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/HostAddressDecoder.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/HostAddressDecoder.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/HostAddressDecoder.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/HostAddressDecoder.java Fri Feb 10 02:48:07 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.kerberos.io.decoder;
 
+
 import java.util.Enumeration;
 
 import org.apache.directory.shared.asn1.der.DEREncodable;
@@ -27,33 +28,34 @@
 import org.apache.kerberos.messages.value.HostAddressType;
 import org.apache.kerberos.messages.value.HostAddresses;
 
+
 public class HostAddressDecoder
 {
-	/**
-	 * HostAddress ::=     SEQUENCE  {
+    /**
+     * HostAddress ::=     SEQUENCE  {
      *                     addr-type[0]             INTEGER,
      *                     address[1]               OCTET STRING
      * }
      */
-	protected static HostAddress decode( DERSequence sequence )
+    protected static HostAddress decode( DERSequence sequence )
     {
         HostAddressType type = HostAddressType.NULL;
         byte[] value = null;
 
         for ( Enumeration e = sequence.getObjects(); e.hasMoreElements(); )
         {
-            DERTaggedObject object = (DERTaggedObject) e.nextElement();
+            DERTaggedObject object = ( DERTaggedObject ) e.nextElement();
             int tag = object.getTagNo();
             DEREncodable derObject = object.getObject();
 
             switch ( tag )
             {
                 case 0:
-                    DERInteger addressType = (DERInteger) derObject;
+                    DERInteger addressType = ( DERInteger ) derObject;
                     type = HostAddressType.getTypeByOrdinal( addressType.intValue() );
                     break;
                 case 1:
-                    DEROctetString address = (DEROctetString) derObject;
+                    DEROctetString address = ( DEROctetString ) derObject;
                     value = address.getOctets();
                     break;
             }
@@ -62,22 +64,23 @@
         return new HostAddress( type, value );
     }
 
-	/**
-	 * HostAddresses ::=   SEQUENCE OF SEQUENCE {
-	 *                     addr-type[0]             INTEGER,
-	 *                     address[1]               OCTET STRING
-	 * }
-	 */
-	protected static HostAddresses decodeSequence( DERSequence sequence )
+
+    /**
+     * HostAddresses ::=   SEQUENCE OF SEQUENCE {
+     *                     addr-type[0]             INTEGER,
+     *                     address[1]               OCTET STRING
+     * }
+     */
+    protected static HostAddresses decodeSequence( DERSequence sequence )
     {
-        HostAddress[] addresses = new HostAddress[ sequence.size() ];
+        HostAddress[] addresses = new HostAddress[sequence.size()];
 
         int ii = 0;
         for ( Enumeration e = sequence.getObjects(); e.hasMoreElements(); )
         {
-            DERSequence object = (DERSequence) e.nextElement();
+            DERSequence object = ( DERSequence ) e.nextElement();
             HostAddress address = decode( object );
-            addresses[ ii ] = address;
+            addresses[ii] = address;
             ii++;
         }
 

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/KdcRequestDecoder.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/KdcRequestDecoder.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/KdcRequestDecoder.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/KdcRequestDecoder.java Fri Feb 10 02:48:07 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.kerberos.io.decoder;
 
+
 import java.io.IOException;
 import java.nio.ByteBuffer;
 import java.util.Enumeration;
@@ -36,30 +37,32 @@
 import org.apache.kerberos.messages.value.RequestBody;
 import org.apache.kerberos.messages.value.RequestBodyModifier;
 
+
 public class KdcRequestDecoder
 {
     public KdcRequest decode( ByteBuffer in ) throws IOException
     {
         ASN1InputStream ais = new ASN1InputStream( in );
 
-        DERApplicationSpecific app = (DERApplicationSpecific) ais.readObject();
+        DERApplicationSpecific app = ( DERApplicationSpecific ) ais.readObject();
 
-        DERSequence kdcreq = (DERSequence) app.getObject();
+        DERSequence kdcreq = ( DERSequence ) app.getObject();
 
         return decodeKdcRequestSequence( kdcreq );
     }
-	
-	/*
-	AS-REQ ::=         [APPLICATION 10] KDC-REQ
-	TGS-REQ ::=        [APPLICATION 12] KDC-REQ
-	
-	KDC-REQ ::=        SEQUENCE {
-	           pvno[1]               INTEGER,
-	           msg-type[2]           INTEGER,
-	           padata[3]             SEQUENCE OF PA-DATA OPTIONAL,
-	           req-body[4]           KDC-REQ-BODY
-	}*/
-	private KdcRequest decodeKdcRequestSequence( DERSequence sequence ) throws IOException
+
+
+    /*
+     AS-REQ ::=         [APPLICATION 10] KDC-REQ
+     TGS-REQ ::=        [APPLICATION 12] KDC-REQ
+     
+     KDC-REQ ::=        SEQUENCE {
+     pvno[1]               INTEGER,
+     msg-type[2]           INTEGER,
+     padata[3]             SEQUENCE OF PA-DATA OPTIONAL,
+     req-body[4]           KDC-REQ-BODY
+     }*/
+    private KdcRequest decodeKdcRequestSequence( DERSequence sequence ) throws IOException
     {
         int pvno = 5;
         MessageType msgType = MessageType.NULL;
@@ -70,26 +73,26 @@
 
         for ( Enumeration e = sequence.getObjects(); e.hasMoreElements(); )
         {
-            DERTaggedObject object = (DERTaggedObject) e.nextElement();
+            DERTaggedObject object = ( DERTaggedObject ) e.nextElement();
             int tag = object.getTagNo();
             DEREncodable derObject = object.getObject();
 
             switch ( tag )
             {
                 case 1:
-                    DERInteger tag1 = (DERInteger) derObject;
+                    DERInteger tag1 = ( DERInteger ) derObject;
                     pvno = tag1.intValue();
                     break;
                 case 2:
-                    DERInteger tag2 = (DERInteger) derObject;
+                    DERInteger tag2 = ( DERInteger ) derObject;
                     msgType = MessageType.getTypeByOrdinal( tag2.intValue() );
                     break;
                 case 3:
-                    DERSequence tag3 = (DERSequence) derObject;
+                    DERSequence tag3 = ( DERSequence ) derObject;
                     paData = PreAuthenticationDataDecoder.decodeSequence( tag3 );
                     break;
                 case 4:
-                    DERSequence tag4 = (DERSequence) derObject;
+                    DERSequence tag4 = ( DERSequence ) derObject;
                     requestBody = decodeRequestBody( tag4 );
 
                     /**
@@ -106,83 +109,84 @@
         return new KdcRequest( pvno, msgType, paData, requestBody, bodyBytes );
     }
 
-	/*
-	KDC-REQ-BODY ::=   SEQUENCE {
-	            kdc-options[0]       KdcOptions,
-	            cname[1]             PrincipalName OPTIONAL,
-	                         -- Used only in AS-REQ
-	            realm[2]             Realm, -- Server's realm
-	                         -- Also client's in AS-REQ
-	            sname[3]             PrincipalName OPTIONAL,
-	            from[4]              KerberosTime OPTIONAL,
-	            till[5]              KerberosTime,
-	            rtime[6]             KerberosTime OPTIONAL,
-	            nonce[7]             INTEGER,
-	            etype[8]             SEQUENCE OF INTEGER, -- EncryptionType,
-	                         -- in preference order
-	            addresses[9]         HostAddresses OPTIONAL,
-	            enc-authorization-data[10]   EncryptedData OPTIONAL,
-	                         -- Encrypted AuthorizationData encoding
-	            additional-tickets[11]       SEQUENCE OF Ticket OPTIONAL
-	}*/
-	private RequestBody decodeRequestBody( DERSequence sequence ) throws IOException
+
+    /*
+     KDC-REQ-BODY ::=   SEQUENCE {
+     kdc-options[0]       KdcOptions,
+     cname[1]             PrincipalName OPTIONAL,
+     -- Used only in AS-REQ
+     realm[2]             Realm, -- Server's realm
+     -- Also client's in AS-REQ
+     sname[3]             PrincipalName OPTIONAL,
+     from[4]              KerberosTime OPTIONAL,
+     till[5]              KerberosTime,
+     rtime[6]             KerberosTime OPTIONAL,
+     nonce[7]             INTEGER,
+     etype[8]             SEQUENCE OF INTEGER, -- EncryptionType,
+     -- in preference order
+     addresses[9]         HostAddresses OPTIONAL,
+     enc-authorization-data[10]   EncryptedData OPTIONAL,
+     -- Encrypted AuthorizationData encoding
+     additional-tickets[11]       SEQUENCE OF Ticket OPTIONAL
+     }*/
+    private RequestBody decodeRequestBody( DERSequence sequence ) throws IOException
     {
         RequestBodyModifier modifier = new RequestBodyModifier();
 
         for ( Enumeration e = sequence.getObjects(); e.hasMoreElements(); )
         {
-            DERTaggedObject object = (DERTaggedObject) e.nextElement();
+            DERTaggedObject object = ( DERTaggedObject ) e.nextElement();
             int tag = object.getTagNo();
             DEREncodable derObject = object.getObject();
 
             switch ( tag )
             {
                 case 0:
-                    DERBitString kdcOptions = (DERBitString) derObject;
+                    DERBitString kdcOptions = ( DERBitString ) derObject;
                     modifier.setKdcOptions( new KdcOptions( kdcOptions.getOctets() ) );
                     break;
                 case 1:
-                    DERSequence cName = (DERSequence) derObject;
+                    DERSequence cName = ( DERSequence ) derObject;
                     modifier.setClientName( PrincipalNameDecoder.decode( cName ) );
                     break;
                 case 2:
-                    DERGeneralString realm = (DERGeneralString) derObject;
+                    DERGeneralString realm = ( DERGeneralString ) derObject;
                     modifier.setRealm( realm.getString() );
                     break;
                 case 3:
-                    DERSequence sname = (DERSequence) derObject;
+                    DERSequence sname = ( DERSequence ) derObject;
                     modifier.setServerName( PrincipalNameDecoder.decode( sname ) );
                     break;
                 case 4:
-                    DERGeneralizedTime from = (DERGeneralizedTime) derObject;
+                    DERGeneralizedTime from = ( DERGeneralizedTime ) derObject;
                     modifier.setFrom( KerberosTimeDecoder.decode( from ) );
                     break;
                 case 5:
-                    DERGeneralizedTime till = (DERGeneralizedTime) derObject;
+                    DERGeneralizedTime till = ( DERGeneralizedTime ) derObject;
                     modifier.setTill( KerberosTimeDecoder.decode( till ) );
                     break;
                 case 6:
-                    DERGeneralizedTime rtime = (DERGeneralizedTime) derObject;
+                    DERGeneralizedTime rtime = ( DERGeneralizedTime ) derObject;
                     modifier.setRtime( KerberosTimeDecoder.decode( rtime ) );
                     break;
                 case 7:
-                    DERInteger nonce = (DERInteger) derObject;
+                    DERInteger nonce = ( DERInteger ) derObject;
                     modifier.setNonce( nonce.intValue() );
                     break;
                 case 8:
-                    DERSequence etype = (DERSequence) derObject;
+                    DERSequence etype = ( DERSequence ) derObject;
                     modifier.setEType( EncryptionTypeDecoder.decode( etype ) );
                     break;
                 case 9:
-                    DERSequence hostAddresses = (DERSequence) derObject;
+                    DERSequence hostAddresses = ( DERSequence ) derObject;
                     modifier.setAddresses( HostAddressDecoder.decodeSequence( hostAddresses ) );
                     break;
                 case 10:
-                    DERSequence encryptedData = (DERSequence) derObject;
+                    DERSequence encryptedData = ( DERSequence ) derObject;
                     modifier.setEncAuthorizationData( EncryptedDataDecoder.decode( encryptedData ) );
                     break;
                 case 11:
-                    DERSequence tag11 = (DERSequence) derObject;
+                    DERSequence tag11 = ( DERSequence ) derObject;
                     modifier.setAdditionalTickets( TicketDecoder.decodeSequence( tag11 ) );
                     break;
             }

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/KerberosTimeDecoder.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/KerberosTimeDecoder.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/KerberosTimeDecoder.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/KerberosTimeDecoder.java Fri Feb 10 02:48:07 2006
@@ -16,11 +16,13 @@
  */
 package org.apache.kerberos.io.decoder;
 
+
 import java.text.ParseException;
 import java.util.Date;
 
 import org.apache.directory.shared.asn1.der.DERGeneralizedTime;
 import org.apache.kerberos.messages.value.KerberosTime;
+
 
 public class KerberosTimeDecoder
 {

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/LastRequestDecoder.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/LastRequestDecoder.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/LastRequestDecoder.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/LastRequestDecoder.java Fri Feb 10 02:48:07 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.kerberos.io.decoder;
 
+
 import java.util.Enumeration;
 
 import org.apache.directory.shared.asn1.der.DEREncodable;
@@ -28,54 +29,56 @@
 import org.apache.kerberos.messages.value.LastRequestEntry;
 import org.apache.kerberos.messages.value.LastRequestType;
 
+
 public class LastRequestDecoder
 {
-	/**
-	 * LastReq ::=   SEQUENCE OF SEQUENCE {
-	 * lr-type[0]               INTEGER,
-	 * lr-value[1]              KerberosTime
-	 * }
-	 */
-	protected LastRequest decodeSequence( DERSequence sequence )
-	{
-		LastRequestEntry[] entries = new LastRequestEntry[ sequence.size() ];
-		
-		int ii = 0;
-		for ( Enumeration e = sequence.getObjects(); e.hasMoreElements(); )
-		{
-			DERSequence object = (DERSequence) e.nextElement();
-			LastRequestEntry entry = decode( object );
-			entries[ii] = entry;
-			ii++;
-		}
-		
-		return new LastRequest( entries );
-	}
-	
-	protected LastRequestEntry decode( DERSequence sequence )
-	{
-		LastRequestType type = LastRequestType.NONE;
-		KerberosTime value = null;
-		
-		for ( Enumeration e = sequence.getObjects(); e.hasMoreElements(); )
-		{
-			DERTaggedObject object = (DERTaggedObject) e.nextElement();
-			int tag = object.getTagNo();
-			DEREncodable derObject = object.getObject();
-			
-			switch ( tag )
-			{
-				case 0:
-					DERInteger tag0 = (DERInteger)derObject;
-					type = LastRequestType.getTypeByOrdinal( tag0.intValue() );
-					break;
-				case 1:
-					DERGeneralizedTime tag1 = (DERGeneralizedTime)derObject;
-					value = KerberosTimeDecoder.decode( tag1 );
-					break;
-			}
-		}
-		
-		return new LastRequestEntry( type, value );
-	}
+    /**
+     * LastReq ::=   SEQUENCE OF SEQUENCE {
+     * lr-type[0]               INTEGER,
+     * lr-value[1]              KerberosTime
+     * }
+     */
+    protected LastRequest decodeSequence( DERSequence sequence )
+    {
+        LastRequestEntry[] entries = new LastRequestEntry[sequence.size()];
+
+        int ii = 0;
+        for ( Enumeration e = sequence.getObjects(); e.hasMoreElements(); )
+        {
+            DERSequence object = ( DERSequence ) e.nextElement();
+            LastRequestEntry entry = decode( object );
+            entries[ii] = entry;
+            ii++;
+        }
+
+        return new LastRequest( entries );
+    }
+
+
+    protected LastRequestEntry decode( DERSequence sequence )
+    {
+        LastRequestType type = LastRequestType.NONE;
+        KerberosTime value = null;
+
+        for ( Enumeration e = sequence.getObjects(); e.hasMoreElements(); )
+        {
+            DERTaggedObject object = ( DERTaggedObject ) e.nextElement();
+            int tag = object.getTagNo();
+            DEREncodable derObject = object.getObject();
+
+            switch ( tag )
+            {
+                case 0:
+                    DERInteger tag0 = ( DERInteger ) derObject;
+                    type = LastRequestType.getTypeByOrdinal( tag0.intValue() );
+                    break;
+                case 1:
+                    DERGeneralizedTime tag1 = ( DERGeneralizedTime ) derObject;
+                    value = KerberosTimeDecoder.decode( tag1 );
+                    break;
+            }
+        }
+
+        return new LastRequestEntry( type, value );
+    }
 }

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/PreAuthenticationDataDecoder.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/PreAuthenticationDataDecoder.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/PreAuthenticationDataDecoder.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/PreAuthenticationDataDecoder.java Fri Feb 10 02:48:07 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.kerberos.io.decoder;
 
+
 import java.io.IOException;
 import java.util.Enumeration;
 
@@ -29,17 +30,19 @@
 import org.apache.kerberos.messages.value.PreAuthenticationDataModifier;
 import org.apache.kerberos.messages.value.PreAuthenticationDataType;
 
+
 public class PreAuthenticationDataDecoder
 {
     public PreAuthenticationData decode( byte[] encodedPreAuthData ) throws IOException
     {
         ASN1InputStream ais = new ASN1InputStream( encodedPreAuthData );
 
-        DERSequence sequence = (DERSequence) ais.readObject();
+        DERSequence sequence = ( DERSequence ) ais.readObject();
 
         return decode( sequence );
     }
 
+
     /**
      * KDC-REQ ::=        SEQUENCE {
      *            pvno[1]               INTEGER,
@@ -50,20 +53,21 @@
      */
     protected static PreAuthenticationData[] decodeSequence( DERSequence sequence )
     {
-        PreAuthenticationData[] paDataSequence = new PreAuthenticationData[ sequence.size() ];
+        PreAuthenticationData[] paDataSequence = new PreAuthenticationData[sequence.size()];
 
         int ii = 0;
         for ( Enumeration e = sequence.getObjects(); e.hasMoreElements(); )
         {
-            DERSequence object = (DERSequence) e.nextElement();
+            DERSequence object = ( DERSequence ) e.nextElement();
             PreAuthenticationData paData = PreAuthenticationDataDecoder.decode( object );
-            paDataSequence[ ii ] = paData;
+            paDataSequence[ii] = paData;
             ii++;
         }
 
         return paDataSequence;
     }
 
+
     /**
      * PA-DATA ::=        SEQUENCE {
      *            padata-type[1]        INTEGER,
@@ -77,20 +81,19 @@
 
         for ( Enumeration e = sequence.getObjects(); e.hasMoreElements(); )
         {
-            DERTaggedObject object = (DERTaggedObject) e.nextElement();
+            DERTaggedObject object = ( DERTaggedObject ) e.nextElement();
             int tag = object.getTagNo();
             DEREncodable derObject = object.getObject();
 
             switch ( tag )
             {
                 case 1:
-                    DERInteger padataType = (DERInteger) derObject;
-                    PreAuthenticationDataType type = PreAuthenticationDataType
-                            .getTypeByOrdinal( padataType.intValue() );
+                    DERInteger padataType = ( DERInteger ) derObject;
+                    PreAuthenticationDataType type = PreAuthenticationDataType.getTypeByOrdinal( padataType.intValue() );
                     modifier.setDataType( type );
                     break;
                 case 2:
-                    DEROctetString padataValue = (DEROctetString) derObject;
+                    DEROctetString padataValue = ( DEROctetString ) derObject;
                     modifier.setDataValue( padataValue.getOctets() );
                     break;
             }



Mime
View raw message