directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erodrig...@apache.org
Subject svn commit: rev 56472 - incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/messages/components
Date Wed, 03 Nov 2004 04:21:23 GMT
Author: erodriguez
Date: Tue Nov  2 20:21:22 2004
New Revision: 56472

Added:
   incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/messages/components/EncApRepPartModifier.java
Modified:
   incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/messages/components/EncApRepPart.java
   incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/messages/components/EncKrbPrivPart.java
   incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/messages/components/EncKrbPrivPartModifier.java
Log:
Value object implementations for message parts related to application (AP) message support.

Modified: incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/messages/components/EncApRepPart.java
==============================================================================
--- incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/messages/components/EncApRepPart.java
(original)
+++ incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/messages/components/EncApRepPart.java
Tue Nov  2 20:21:22 2004
@@ -16,36 +16,41 @@
  */
 package org.apache.kerberos.messages.components;
 
+import org.apache.kerberos.messages.*;
 import org.apache.kerberos.messages.value.*;
 
 /**
  * Encrypted part of the application response
  */
-public class EncApRepPart {
+public class EncApRepPart extends KerberosMessage {
 
 	private KerberosTime  _clientTime;
 	private int           _cusec;
-	private EncryptionKey _subjectKey; //optional
+	private EncryptionKey _subSessionKey;  //optional
 	private Integer       _sequenceNumber; //optional
 
-	public EncApRepPart(KerberosTime ctime, int cusec, EncryptionKey subKey, Integer seqNumber)
{
-		_clientTime = ctime;
-		_cusec = cusec;
-		_subjectKey = subKey;
-		_sequenceNumber = seqNumber;
+	public EncApRepPart(KerberosTime clientTime, int cusec, EncryptionKey subSessionKey,
+			Integer sequenceNumber) {
+		
+		super(MessageType.ENC_AP_REP_PART);
+		
+		_clientTime     = clientTime;
+		_cusec          = cusec;
+		_subSessionKey  = subSessionKey;
+		_sequenceNumber = sequenceNumber;
 	}
 	
 	public KerberosTime getClientTime() {
 		return _clientTime;
 	}
-	public int getCusec() {
+	public int getClientMicroSecond() {
 		return _cusec;
 	}
 	public Integer getSequenceNumber() {
 		return _sequenceNumber;
 	}
-	public EncryptionKey getSubjectKey() {
-		return _subjectKey;
+	public EncryptionKey getSubSessionKey() {
+		return _subSessionKey;
 	}
 }
 

Added: incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/messages/components/EncApRepPartModifier.java
==============================================================================
--- (empty file)
+++ incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/messages/components/EncApRepPartModifier.java
Tue Nov  2 20:21:22 2004
@@ -0,0 +1,46 @@
+/*
+ *   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ */
+package org.apache.kerberos.messages.components;
+
+import org.apache.kerberos.messages.value.*;
+
+public class EncApRepPartModifier {
+
+	private KerberosTime  _clientTime;
+	private int           _cusec;
+	private EncryptionKey _subSessionKey;  //optional
+	private Integer       _sequenceNumber; //optional
+
+	public EncApRepPart getEncApRepPart() {
+		
+		return new EncApRepPart(_clientTime, _cusec, _subSessionKey, _sequenceNumber);
+	}
+	
+	public void setClientTime(KerberosTime clientTime) {
+		_clientTime = clientTime;
+	}
+	public void setClientMicroSecond(int cusec) {
+		_cusec = cusec;
+	}
+	public void setSubSessionKey(EncryptionKey subSessionKey) {
+		_subSessionKey = subSessionKey;
+	}
+	public void setSequenceNumber(Integer sequenceNumber) {
+		_sequenceNumber = sequenceNumber;
+	}
+}
+

Modified: incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/messages/components/EncKrbPrivPart.java
==============================================================================
--- incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/messages/components/EncKrbPrivPart.java
(original)
+++ incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/messages/components/EncKrbPrivPart.java
Tue Nov  2 20:21:22 2004
@@ -16,22 +16,25 @@
  */
 package org.apache.kerberos.messages.components;
 
+import org.apache.kerberos.messages.*;
 import org.apache.kerberos.messages.value.*;
 
 /**
  * Encrypted part of private messages
  */
-public class EncKrbPrivPart {
+public class EncKrbPrivPart extends KerberosMessage {
 
 	private byte[]       _userData;
 	private KerberosTime _timestamp;        //optional
-	private int          _usec;             //optional
-	private int          _sequenceNumber;   //optional
+	private Integer      _usec;             //optional
+	private Integer      _sequenceNumber;   //optional
 	private HostAddress  _senderAddress;    //optional
 	private HostAddress  _recipientAddress; //optional
 
-	public EncKrbPrivPart(byte[] userData, KerberosTime timestamp, int usec,
-			int sequenceNumber, HostAddress senderAddress, HostAddress recipientAddress) {
+	public EncKrbPrivPart(byte[] userData, KerberosTime timestamp, Integer usec,
+			Integer sequenceNumber, HostAddress senderAddress, HostAddress recipientAddress) {
+		
+		super(MessageType.ENC_PRIV_PART);
 		
 		_userData         = userData;
 		_timestamp        = timestamp;
@@ -47,13 +50,13 @@
 	public HostAddress getSenderAddress() {
 		return _senderAddress;
 	}
-	public int getSequenceNumber() {
+	public Integer getSequenceNumber() {
 		return _sequenceNumber;
 	}
 	public KerberosTime getTimestamp() {
 		return _timestamp;
 	}
-	public int getMicroSecond() {
+	public Integer getMicroSecond() {
 		return _usec;
 	}
 	public byte[] getUserData() {

Modified: incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/messages/components/EncKrbPrivPartModifier.java
==============================================================================
--- incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/messages/components/EncKrbPrivPartModifier.java
(original)
+++ incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/messages/components/EncKrbPrivPartModifier.java
Tue Nov  2 20:21:22 2004
@@ -22,12 +22,13 @@
 
 	private byte[]       _userData;
 	private KerberosTime _timestamp;        //optional
-	private int          _usec;             //optional
-	private int          _sequenceNumber;   //optional
+	private Integer      _usec;             //optional
+	private Integer      _sequenceNumber;   //optional
 	private HostAddress  _senderAddress;    //optional
 	private HostAddress  _recipientAddress; //optional
 
 	public EncKrbPrivPart getEncKrbPrivPart() {
+		
 		return new EncKrbPrivPart(_userData, _timestamp, _usec, _sequenceNumber,
 				_senderAddress, _recipientAddress);
 	}
@@ -38,13 +39,13 @@
 	public void setSenderAddress(HostAddress address) {
 		_senderAddress = address;
 	}
-	public void setSequenceNumber(int number) {
+	public void setSequenceNumber(Integer number) {
 		_sequenceNumber = number;
 	}
 	public void setTimestamp(KerberosTime timestamp) {
 		_timestamp = timestamp;
 	}
-	public void setMicroSecond(int usec) {
+	public void setMicroSecond(Integer usec) {
 		_usec = usec;
 	}
 	public void setUserData(byte[] data) {

Mime
View raw message