You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by er...@apache.org on 2004/10/04 20:54:49 UTC

svn commit: rev 53733 - incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/messages/application

Author: erodriguez
Date: Mon Oct  4 11:54:48 2004
New Revision: 53733

Added:
   incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/messages/application/
   incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/messages/application/ApplicationReply.java
   incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/messages/application/ApplicationRequest.java
   incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/messages/application/CredentialMessage.java
   incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/messages/application/PrivateMessage.java
   incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/messages/application/SafeMessage.java
Log:
kerberos application messages.

Added: incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/messages/application/ApplicationReply.java
==============================================================================
--- (empty file)
+++ incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/messages/application/ApplicationReply.java	Mon Oct  4 11:54:48 2004
@@ -0,0 +1,39 @@
+/*
+ *   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.application;
+
+import org.apache.kerberos.kdc.*;
+import org.apache.kerberos.messages.*;
+import org.apache.kerberos.messages.value.*;
+
+public class ApplicationReply extends KerberosMessage {
+
+	private EncryptedData _encryptedPart;
+
+	/**
+	 * Class constructor
+	 */
+	public ApplicationReply(EncryptedData encPart) {
+		super(LocalConfig.PVNO, MessageType.KRB_AP_REP);
+		_encryptedPart = encPart;
+	}
+	
+	public EncryptedData getEncPart() {
+		return _encryptedPart;
+	}
+}
+

Added: incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/messages/application/ApplicationRequest.java
==============================================================================
--- (empty file)
+++ incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/messages/application/ApplicationRequest.java	Mon Oct  4 11:54:48 2004
@@ -0,0 +1,84 @@
+/*
+ *   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.application;
+
+import org.apache.kerberos.kdc.*;
+import org.apache.kerberos.messages.*;
+import org.apache.kerberos.messages.components.*;
+import org.apache.kerberos.messages.value.*;
+
+public class ApplicationRequest extends KerberosMessage {
+
+	private ApOptions     _apOptions;
+	private Ticket        _ticket;
+	private EncryptedData _encPart       = new EncryptedData();
+	private Authenticator _authenticator = new Authenticator();
+	
+	/**
+	 * Class constructors
+	 */
+	public ApplicationRequest() {
+		super(LocalConfig.PVNO, MessageType.KRB_AP_REQ);
+		// used by ASN1 decoder
+	}
+	
+	public ApplicationRequest(ApOptions apOptions, Ticket ticket, EncryptedData encPart) {
+		super(LocalConfig.PVNO, MessageType.KRB_AP_REQ);
+		_apOptions             = apOptions;
+		_ticket                = ticket;
+		_encPart               = encPart;
+	}
+	
+	public ApOptions getApOptions() {
+		return _apOptions;
+	}
+	public Authenticator getAuthenticator() {
+		return _authenticator;
+	}
+	public Ticket getTicket() {
+		return _ticket;
+	}
+	
+	// delegate ApOptions methods
+	public boolean getOption(int option) {
+		return _apOptions.get(option);
+	}
+	public void setOption(int option) {
+		_apOptions.set(option);
+	}
+	public void clearOption(int option) {
+		_apOptions.clear(option);
+	}
+	
+	public EncryptedData getEncPart() {
+		return _encPart;
+	}
+	public void setEncPart(EncryptedData data) {
+		_encPart = data;
+	}
+	
+	public void setApOptions(ApOptions options) {
+		_apOptions = options;
+	}
+	public void setAuthenticator(Authenticator authenticator) {
+		_authenticator = authenticator;
+	}
+	public void setTicket(Ticket ticket) {
+		_ticket = ticket;
+	}
+}
+

Added: incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/messages/application/CredentialMessage.java
==============================================================================
--- (empty file)
+++ incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/messages/application/CredentialMessage.java	Mon Oct  4 11:54:48 2004
@@ -0,0 +1,54 @@
+/*
+ *   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.application;
+
+import org.apache.kerberos.kdc.*;
+import org.apache.kerberos.messages.*;
+import org.apache.kerberos.messages.components.*;
+import org.apache.kerberos.messages.value.*;
+
+public class CredentialMessage {
+	
+	private int           _pvno;
+	private MessageType   _msgType;
+	private Ticket[]      _tickets;
+	private EncryptedData _encPart;
+
+	/**
+	 * Class constructor
+	 */
+	public CredentialMessage(Ticket[] tickets, EncryptedData encPart) {
+		_pvno    = LocalConfig.PVNO;
+		_msgType = MessageType.KRB_CRED;
+		_tickets = tickets;
+		_encPart = encPart;
+	}
+	
+	public EncryptedData getEncPart() {
+		return _encPart;
+	}
+	public MessageType getMsgType() {
+		return _msgType;
+	}
+	public int getPvno() {
+		return _pvno;
+	}
+	public Ticket[] getTickets() {
+		return _tickets;
+	}
+}
+

Added: incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/messages/application/PrivateMessage.java
==============================================================================
--- (empty file)
+++ incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/messages/application/PrivateMessage.java	Mon Oct  4 11:54:48 2004
@@ -0,0 +1,39 @@
+/*
+ *   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.application;
+
+import org.apache.kerberos.kdc.*;
+import org.apache.kerberos.messages.*;
+import org.apache.kerberos.messages.value.*;
+
+public class PrivateMessage extends KerberosMessage {
+
+	private EncryptedData _encPart;
+
+	/**
+	 * Class constructor
+	 */
+	public PrivateMessage(EncryptedData encPart) {
+		super(LocalConfig.PVNO, MessageType.KRB_PRIV);
+		_encPart = encPart;
+	}
+	
+	public EncryptedData getEncPart() {
+		return _encPart;
+	}
+}
+

Added: incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/messages/application/SafeMessage.java
==============================================================================
--- (empty file)
+++ incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/messages/application/SafeMessage.java	Mon Oct  4 11:54:48 2004
@@ -0,0 +1,61 @@
+/*
+ *   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.application;
+
+import org.apache.kerberos.kdc.*;
+import org.apache.kerberos.messages.*;
+import org.apache.kerberos.messages.value.*;
+
+public class SafeMessage extends KerberosMessage {
+
+	private SafeBody _safeBody;
+	private Checksum _cksum;
+
+	/**
+	 * Class constructor
+	 */
+	public SafeMessage(SafeBody safeBody, Checksum cksum) {
+		super(LocalConfig.PVNO, MessageType.KRB_SAFE);
+		_safeBody = safeBody;
+		_cksum    = cksum;
+	}
+	
+	public Checksum getCksum() {
+		return _cksum;
+	}
+	
+	// SafeBody delegate methods
+	public HostAddress getRAddress() {
+		return _safeBody.getRAddress();
+	}
+	public HostAddress getSAddress() {
+		return _safeBody.getSAddress();
+	}
+	public Integer getSeqNumber() {
+		return _safeBody.getSeqNumber();
+	}
+	public KerberosTime getTimestamp() {
+		return _safeBody.getTimestamp();
+	}
+	public Integer getUsec() {
+		return _safeBody.getUsec();
+	}
+	public byte[] getUserData() {
+		return _safeBody.getUserData();
+	}
+}
+