directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erodrig...@apache.org
Subject svn commit: rev 56098 - incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/messages/components
Date Sun, 31 Oct 2004 00:48:23 GMT
Author: erodriguez
Date: Sat Oct 30 17:48:23 2004
New Revision: 56098

Modified:
   incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/messages/components/EncAsRepPart.java
   incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/messages/components/EncKdcRepPart.java
   incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/messages/components/EncTgsRepPart.java
Log:
Replacing Realm and PrincipalName with JAAS KerberosPrincipal.

Modified: incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/messages/components/EncAsRepPart.java
==============================================================================
--- incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/messages/components/EncAsRepPart.java
(original)
+++ incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/messages/components/EncAsRepPart.java
Sat Oct 30 17:48:23 2004
@@ -18,6 +18,8 @@
 
 import org.apache.kerberos.messages.value.*;
 
+import javax.security.auth.kerberos.*;
+
 /**
  * Encrypted part of the authentication service response
  */
@@ -29,10 +31,10 @@
 	public EncAsRepPart(EncryptionKey key, LastRequest lastReq, int nonce,
 			KerberosTime keyExpiration, TicketFlags flags, KerberosTime authTime,
 			KerberosTime startTime, KerberosTime endTime, KerberosTime renewTill,
-			Realm srealm, PrincipalName sname, HostAddresses caddr) {
+			KerberosPrincipal serverPrincipal, HostAddresses caddr) {
 		
 		super(key, lastReq, nonce, keyExpiration, flags, authTime,
-				startTime, endTime, renewTill, srealm, sname, caddr,
+				startTime, endTime, renewTill, serverPrincipal, caddr,
 				MessageComponentType.KRB_ENC_AS_REP_PART);
 	}
 }

Modified: incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/messages/components/EncKdcRepPart.java
==============================================================================
--- incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/messages/components/EncKdcRepPart.java
(original)
+++ incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/messages/components/EncKdcRepPart.java
Sat Oct 30 17:48:23 2004
@@ -18,23 +18,24 @@
 
 import org.apache.kerberos.messages.value.*;
 
+import javax.security.auth.kerberos.*;
+
 /**
  * Base class for encrypted parts of KDC responses
  */
 public class EncKdcRepPart {
 
-	private EncryptionKey _key;
-	private LastRequest   _lastRequest;
-	private int           _nonce;
-	private KerberosTime  _keyExpiration;   //optional
-	private TicketFlags   _flags = new TicketFlags();
-	private KerberosTime  _authTime;
-	private KerberosTime  _startTime;       //optional
-	private KerberosTime  _endTime;
-	private KerberosTime  _renewTill;       //optional
-	private Realm         _serverRealm;
-	private PrincipalName _serverName;
-	private HostAddresses _clientAddresses; //optional
+	private EncryptionKey        _key;
+	private LastRequest          _lastRequest;
+	private int                  _nonce;
+	private KerberosTime         _keyExpiration;   //optional
+	private TicketFlags          _flags = new TicketFlags();
+	private KerberosTime         _authTime;
+	private KerberosTime         _startTime;       //optional
+	private KerberosTime         _endTime;
+	private KerberosTime         _renewTill;       //optional
+	private KerberosPrincipal    _serverPrincipal;
+	private HostAddresses        _clientAddresses; //optional
 	private MessageComponentType _componentType;
 
 	/**
@@ -46,22 +47,21 @@
 	
 	public EncKdcRepPart(EncryptionKey key, LastRequest lastReq, int nonce,
 			KerberosTime keyExpiration, TicketFlags flags, KerberosTime authtime,
-			KerberosTime starttime, KerberosTime endtime, KerberosTime renewTill, Realm srealm,
-			PrincipalName sname, HostAddresses caddr, MessageComponentType componentType) {
+			KerberosTime starttime, KerberosTime endtime, KerberosTime renewTill,
+			KerberosPrincipal serverPrincipal, HostAddresses caddr, MessageComponentType componentType)
{
 		
-		_key = key;
-		_lastRequest = lastReq;
-		_nonce = nonce;
-		_keyExpiration = keyExpiration;
-		_flags = flags;
-		_authTime = authtime;
-		_startTime = starttime;
-		_endTime = endtime;
-		_renewTill = renewTill;
-		_serverRealm = srealm;
-		_serverName = sname;
+		_key             = key;
+		_lastRequest     = lastReq;
+		_nonce           = nonce;
+		_keyExpiration   = keyExpiration;
+		_flags           = flags;
+		_authTime        = authtime;
+		_startTime       = starttime;
+		_endTime         = endtime;
+		_renewTill       = renewTill;
+		_serverPrincipal = serverPrincipal;
 		_clientAddresses = caddr;
-		_componentType = componentType;
+		_componentType   = componentType;
 	}
 	
 	// getters
@@ -92,11 +92,11 @@
 	public KerberosTime getRenewTill() {
 		return _renewTill;
 	}
-	public PrincipalName getServerName() {
-		return _serverName;
+	public KerberosPrincipal getServerPrincipal() {
+		return _serverPrincipal;
 	}
-	public Realm getServerRealm() {
-		return _serverRealm;
+	public String getServerRealm() {
+		return _serverPrincipal.getRealm();
 	}
 	public KerberosTime getStartTime() {
 		return _startTime;
@@ -133,11 +133,8 @@
 	public void setRenewTill(KerberosTime till) {
 		_renewTill = till;
 	}
-	public void setServerName(PrincipalName name) {
-		_serverName = name;
-	}
-	public void setServerRealm(Realm realm) {
-		_serverRealm = realm;
+	public void setServerPrincipal(KerberosPrincipal principal) {
+		_serverPrincipal = principal;
 	}
 	public void setStartTime(KerberosTime time) {
 		_startTime = time;

Modified: incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/messages/components/EncTgsRepPart.java
==============================================================================
--- incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/messages/components/EncTgsRepPart.java
(original)
+++ incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/messages/components/EncTgsRepPart.java
Sat Oct 30 17:48:23 2004
@@ -18,6 +18,8 @@
 
 import org.apache.kerberos.messages.value.*;
 
+import javax.security.auth.kerberos.*;
+
 /**
  * Encrypted part of TGS responses
  */
@@ -29,10 +31,10 @@
 	public EncTgsRepPart(EncryptionKey key, LastRequest lastReq, int nonce,
 			KerberosTime keyExpiration, TicketFlags flags, KerberosTime authtime,
 			KerberosTime starttime, KerberosTime endtime, KerberosTime renewTill,
-			Realm srealm, PrincipalName sname, HostAddresses caddr) {
+			KerberosPrincipal serverPrincipal, HostAddresses caddr) {
 		
 		super(key, lastReq, nonce, keyExpiration, flags, authtime,
-				starttime, endtime, renewTill, srealm, sname, caddr,
+				starttime, endtime, renewTill, serverPrincipal, caddr,
 				MessageComponentType.KRB_ENC_TGS_REP_PART);
 	}
 }

Mime
View raw message