directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erodrig...@apache.org
Subject svn commit: r543385 - in /directory/apacheds/trunk: kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/service/ kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/ protocol-ldap/src/main/ja...
Date Fri, 01 Jun 2007 04:40:12 GMT
Author: erodriguez
Date: Thu May 31 21:40:06 2007
New Revision: 543385

URL: http://svn.apache.org/viewvc?view=rev&rev=543385
Log:
Modified Kerberos principal entry acquisition to make entry key type optional since we now
support multiple encryption types and the encryption type is encoded along with the individual
keys.

Modified:
    directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/service/GetPrincipalStoreEntry.java
    directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/GetPrincipal.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/bind/GetPrincipal.java

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/service/GetPrincipalStoreEntry.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/service/GetPrincipalStoreEntry.java?view=diff&rev=543385&r1=543384&r2=543385
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/service/GetPrincipalStoreEntry.java
(original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/service/GetPrincipalStoreEntry.java
Thu May 31 21:40:06 2007
@@ -59,7 +59,7 @@
         }
         catch ( Exception e )
         {
-            throw new KerberosException( errorType );
+            throw new KerberosException( errorType, e );
         }
 
         if ( entry == null || entry.getKeyMap().isEmpty() )

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/GetPrincipal.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/GetPrincipal.java?view=diff&rev=543385&r1=543384&r2=543385
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/GetPrincipal.java
(original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/GetPrincipal.java
Thu May 31 21:40:06 2007
@@ -129,9 +129,18 @@
     private PrincipalStoreEntry getEntry( Attributes attrs ) throws NamingException
     {
         PrincipalStoreEntryModifier modifier = new PrincipalStoreEntryModifier();
+
         String principal = ( String ) attrs.get( KerberosAttribute.PRINCIPAL ).get();
-        String encryptionType = ( String ) attrs.get( KerberosAttribute.TYPE ).get();
+        modifier.setPrincipal( new KerberosPrincipal( principal ) );
+
         String keyVersionNumber = ( String ) attrs.get( KerberosAttribute.VERSION ).get();
+        modifier.setKeyVersionNumber( Integer.parseInt( keyVersionNumber ) );
+
+        if ( attrs.get( KerberosAttribute.TYPE ) != null )
+        {
+            String val = ( String ) attrs.get( KerberosAttribute.TYPE ).get();
+            modifier.setEncryptionType( Integer.parseInt( val ) );
+        }
 
         if ( attrs.get( KerberosAttribute.ACCOUNT_DISABLED ) != null )
         {
@@ -181,9 +190,6 @@
             }
         }
 
-        modifier.setPrincipal( new KerberosPrincipal( principal ) );
-        modifier.setEncryptionType( Integer.parseInt( encryptionType ) );
-        modifier.setKeyVersionNumber( Integer.parseInt( keyVersionNumber ) );
         return modifier.getEntry();
     }
 }

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/bind/GetPrincipal.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/bind/GetPrincipal.java?view=diff&rev=543385&r1=543384&r2=543385
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/bind/GetPrincipal.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/bind/GetPrincipal.java
Thu May 31 21:40:06 2007
@@ -162,9 +162,18 @@
         }
 
         PrincipalStoreEntryModifier modifier = new PrincipalStoreEntryModifier();
+
         String principal = ( String ) attrs.get( KerberosAttribute.PRINCIPAL ).get();
-        String encryptionType = ( String ) attrs.get( KerberosAttribute.TYPE ).get();
+        modifier.setPrincipal( new KerberosPrincipal( principal ) );
+
         String keyVersionNumber = ( String ) attrs.get( KerberosAttribute.VERSION ).get();
+        modifier.setKeyVersionNumber( Integer.parseInt( keyVersionNumber ) );
+
+        if ( attrs.get( KerberosAttribute.TYPE ) != null )
+        {
+            String val = ( String ) attrs.get( KerberosAttribute.TYPE ).get();
+            modifier.setEncryptionType( Integer.parseInt( val ) );
+        }
 
         if ( attrs.get( KerberosAttribute.ACCOUNT_DISABLED ) != null )
         {
@@ -214,9 +223,6 @@
             }
         }
 
-        modifier.setPrincipal( new KerberosPrincipal( principal ) );
-        modifier.setEncryptionType( Integer.parseInt( encryptionType ) );
-        modifier.setKeyVersionNumber( Integer.parseInt( keyVersionNumber ) );
         return modifier.getEntry();
     }
 }



Mime
View raw message