directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erodrig...@apache.org
Subject svn commit: r544724 - in /directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos: kdc/authentication/ kdc/preauthentication/ protocol/
Date Wed, 06 Jun 2007 04:11:22 GMT
Author: erodriguez
Date: Tue Jun  5 21:11:21 2007
New Revision: 544724

URL: http://svn.apache.org/viewvc?view=rev&rev=544724
Log:
Improved exception handling in protocol-kerberos.

Modified:
    directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/GenerateTicket.java
    directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/preauthentication/VerifyEncryptedTimestamp.java
    directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/preauthentication/VerifySam.java
    directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/protocol/KerberosProtocolHandler.java

Modified: directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/GenerateTicket.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/GenerateTicket.java?view=diff&rev=544724&r1=544723&r2=544724
==============================================================================
--- directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/GenerateTicket.java
(original)
+++ directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/GenerateTicket.java
Tue Jun  5 21:11:21 2007
@@ -105,7 +105,10 @@
         {
             // TODO - possibly allow req.from range
             if ( !config.isPostdateAllowed() )
+            {
                 throw new KerberosException( ErrorType.KDC_ERR_POLICY );
+            }
+
             newTicketBody.setFlag( TicketFlags.INVALID );
             newTicketBody.setStartTime( request.getFrom() );
         }

Modified: directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/preauthentication/VerifyEncryptedTimestamp.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/preauthentication/VerifyEncryptedTimestamp.java?view=diff&rev=544724&r1=544723&r2=544724
==============================================================================
--- directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/preauthentication/VerifyEncryptedTimestamp.java
(original)
+++ directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/preauthentication/VerifyEncryptedTimestamp.java
Tue Jun  5 21:11:21 2007
@@ -110,11 +110,11 @@
                         }
                         catch ( IOException ioe )
                         {
-                            throw new KerberosException( ErrorType.KRB_AP_ERR_BAD_INTEGRITY
);
+                            throw new KerberosException( ErrorType.KRB_AP_ERR_BAD_INTEGRITY,
ioe );
                         }
                         catch ( ClassCastException cce )
                         {
-                            throw new KerberosException( ErrorType.KRB_AP_ERR_BAD_INTEGRITY
);
+                            throw new KerberosException( ErrorType.KRB_AP_ERR_BAD_INTEGRITY,
cce );
                         }
 
                         timestamp = ( EncryptedTimeStamp ) cipherTextHandler.unseal( EncryptedTimeStamp.class,

Modified: directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/preauthentication/VerifySam.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/preauthentication/VerifySam.java?view=diff&rev=544724&r1=544723&r2=544724
==============================================================================
--- directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/preauthentication/VerifySam.java
(original)
+++ directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/preauthentication/VerifySam.java
Tue Jun  5 21:11:21 2007
@@ -80,7 +80,8 @@
 
             if ( preAuthData == null || preAuthData.length == 0 )
             {
-                throw new KerberosException( ErrorType.KDC_ERR_PREAUTH_REQUIRED, preparePreAuthenticationError(
config.getEncryptionTypes() ) );
+                throw new KerberosException( ErrorType.KDC_ERR_PREAUTH_REQUIRED, preparePreAuthenticationError(
config
+                    .getEncryptionTypes() ) );
             }
 
             try
@@ -98,7 +99,7 @@
             }
             catch ( SamException se )
             {
-                throw new KerberosException( ErrorType.KRB_ERR_GENERIC, se.getMessage() );
+                throw new KerberosException( ErrorType.KRB_ERR_GENERIC, se );
             }
 
             authContext.setClientKey( clientKey );

Modified: directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/protocol/KerberosProtocolHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/protocol/KerberosProtocolHandler.java?view=diff&rev=544724&r1=544723&r2=544724
==============================================================================
--- directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/protocol/KerberosProtocolHandler.java
(original)
+++ directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/protocol/KerberosProtocolHandler.java
Tue Jun  5 21:11:21 2007
@@ -189,7 +189,7 @@
         {
             if ( log.isDebugEnabled() )
             {
-                log.debug( ke.getMessage(), ke );
+                log.warn( ke.getMessage(), ke );
             }
             else
             {



Mime
View raw message