directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erodrig...@apache.org
Subject svn commit: r267542 - in /directory/shared/kerberos/trunk/common: project.xml src/java/org/apache/kerberos/io/decoder/KdcRequestDecoder.java src/java/org/apache/kerberos/messages/KdcRequest.java
Date Sun, 04 Sep 2005 01:40:38 GMT
Author: erodriguez
Date: Sat Sep  3 18:40:33 2005
New Revision: 267542

URL: http://svn.apache.org/viewcvs?rev=267542&view=rev
Log:
Updates to get the raw bytes of the KDC-REQ-BODY for checksum calculation and comparison with
the authenticator checksum during the verification stage of ticket grant processing.
o  addition of undecoded bytes to KdcRequest
o  setting of undecoded bytes during decoding
o  bump up asn1-der dep to follow undecoded bytes changes

Modified:
    directory/shared/kerberos/trunk/common/project.xml
    directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/decoder/KdcRequestDecoder.java
    directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/KdcRequest.java

Modified: directory/shared/kerberos/trunk/common/project.xml
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/trunk/common/project.xml?rev=267542&r1=267541&r2=267542&view=diff
==============================================================================
--- directory/shared/kerberos/trunk/common/project.xml (original)
+++ directory/shared/kerberos/trunk/common/project.xml Sat Sep  3 18:40:33 2005
@@ -13,7 +13,7 @@
     <dependency>
       <groupId>directory-asn1</groupId>
       <artifactId>asn1-der</artifactId>
-      <version>0.3.1</version>
+      <version>0.3.3-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>directory-shared</groupId>

Modified: directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/decoder/KdcRequestDecoder.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/decoder/KdcRequestDecoder.java?rev=267542&r1=267541&r2=267542&view=diff
==============================================================================
--- directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/decoder/KdcRequestDecoder.java
(original)
+++ directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/decoder/KdcRequestDecoder.java
Sat Sep  3 18:40:33 2005
@@ -66,6 +66,7 @@
 
         PreAuthenticationData[] paData = null;
         RequestBody requestBody = null;
+        byte[] bodyBytes = null;
 
         for ( Enumeration e = sequence.getObjects(); e.hasMoreElements(); )
         {
@@ -90,13 +91,21 @@
                 case 4:
                     DERSequence tag4 = (DERSequence) derObject;
                     requestBody = decodeRequestBody( tag4 );
+
+                    /**
+                     * Get the raw bytes of the KDC-REQ-BODY for checksum calculation and
+                     * comparison with the authenticator checksum during the verification
+                     * stage of ticket grant processing.
+                     */
+                    bodyBytes = object.getOctets();
+
                     break;
             }
         }
 
-        return new KdcRequest( pvno, msgType, paData, requestBody );
+        return new KdcRequest( pvno, msgType, paData, requestBody, bodyBytes );
     }
-	
+
 	/*
 	KDC-REQ-BODY ::=   SEQUENCE {
 	            kdc-options[0]       KdcOptions,

Modified: directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/KdcRequest.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/KdcRequest.java?rev=267542&r1=267541&r2=267542&view=diff
==============================================================================
--- directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/KdcRequest.java
(original)
+++ directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/KdcRequest.java
Sat Sep  3 18:40:33 2005
@@ -31,6 +31,7 @@
 {
     private PreAuthenticationData[] preAuthData; //optional
     private RequestBody requestBody;
+    private byte[] bodyBytes;
 
     public KdcRequest( int pvno, MessageType messageType, PreAuthenticationData[] preAuthData,
             RequestBody requestBody )
@@ -40,9 +41,21 @@
         this.requestBody = requestBody;
     }
 
+    public KdcRequest( int pvno, MessageType messageType, PreAuthenticationData[] preAuthData,
+            RequestBody requestBody, byte[] bodyBytes )
+    {
+        this( pvno, messageType, preAuthData, requestBody );
+        this.bodyBytes = bodyBytes;
+    }
+
     public PreAuthenticationData[] getPreAuthData()
     {
         return preAuthData;
+    }
+
+    public byte[] getBodyBytes()
+    {
+        return bodyBytes;
     }
 
     // RequestBody delegate methods



Mime
View raw message