harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From le...@apache.org
Subject svn commit: r594462 - in /harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/jgss/kerberos/toolbox: KerberosApplicationRequest.java KerberosToolboxImpl.java KerberosToolboxSpi.java
Date Tue, 13 Nov 2007 09:09:47 GMT
Author: leoli
Date: Tue Nov 13 01:09:46 2007
New Revision: 594462

URL: http://svn.apache.org/viewvc?rev=594462&view=rev
Log:
Apply patch for HARMONY-4721([classlib][auth]Harmony lacks default JGSS provider.) Add encode
& decode KerberosApplicationRequest methods in KerberosToolboxSpi.

Added:
    harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/jgss/kerberos/toolbox/KerberosApplicationRequest.java
  (with props)
Modified:
    harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/jgss/kerberos/toolbox/KerberosToolboxImpl.java
    harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/jgss/kerberos/toolbox/KerberosToolboxSpi.java

Added: harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/jgss/kerberos/toolbox/KerberosApplicationRequest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/jgss/kerberos/toolbox/KerberosApplicationRequest.java?rev=594462&view=auto
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/jgss/kerberos/toolbox/KerberosApplicationRequest.java
(added)
+++ harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/jgss/kerberos/toolbox/KerberosApplicationRequest.java
Tue Nov 13 01:09:46 2007
@@ -0,0 +1,58 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You 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.harmony.auth.jgss.kerberos.toolbox;
+
+import javax.crypto.SecretKey;
+import javax.security.auth.kerberos.KerberosTicket;
+
+// TODO The Request for encoding includes TGS while decoding includes
+// SessionKey. Maybe more information, for example, peer Principal is required
+// in decoding.
+public class KerberosApplicationRequest {
+    private long seqNum;
+
+    private boolean[] options;
+
+    private KerberosTicket tgs;
+
+    private SecretKey sessionKey;
+
+    public KerberosApplicationRequest(long seqNum, boolean[] options,
+            KerberosTicket tgs, SecretKey sessionKey) {
+        this.seqNum = seqNum;
+        this.options = options;
+        this.tgs = tgs;
+        this.sessionKey = sessionKey;
+    }
+
+    public long getSeqNum() {
+        return seqNum;
+    }
+
+    public boolean[] getOptions() {
+        return options;
+    }
+
+    public KerberosTicket getTGS() {
+        return tgs;
+    }
+
+    public SecretKey getSessionKey() {
+        return sessionKey;
+    }
+}

Propchange: harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/jgss/kerberos/toolbox/KerberosApplicationRequest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/jgss/kerberos/toolbox/KerberosToolboxImpl.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/jgss/kerberos/toolbox/KerberosToolboxImpl.java?rev=594462&r1=594461&r2=594462&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/jgss/kerberos/toolbox/KerberosToolboxImpl.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/jgss/kerberos/toolbox/KerberosToolboxImpl.java
Tue Nov 13 01:09:46 2007
@@ -25,7 +25,7 @@
 /*
  * The class will wrap the dependency on external kerberos tools.
  */
-public class KerberosToolboxImpl implements KerberosToolboxSpi {
+public final class KerberosToolboxImpl implements KerberosToolboxSpi {
 
     private String kdc;
     
@@ -42,5 +42,15 @@
         // TODO Auto-generated method stub
         throw new NotImplementedException();
     }
+
+	public KerberosApplicationRequest decodeApplicationRequest(byte[] token) {
+		// TODO Auto-generated method stub
+		throw new NotImplementedException();
+	}
+
+	public byte[] encodeApplicationRequest(KerberosApplicationRequest kerberosApplicationRequest)
{
+		// TODO Auto-generated method stub
+		throw new NotImplementedException();
+	}
 
 }

Modified: harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/jgss/kerberos/toolbox/KerberosToolboxSpi.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/jgss/kerberos/toolbox/KerberosToolboxSpi.java?rev=594462&r1=594461&r2=594462&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/jgss/kerberos/toolbox/KerberosToolboxSpi.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/jgss/kerberos/toolbox/KerberosToolboxSpi.java
Tue Nov 13 01:09:46 2007
@@ -22,4 +22,6 @@
 public interface KerberosToolboxSpi {    
     KerberosTicket getTGT(String clientPrincipalName, char[] password);
     KerberosTicket getTGS(String serverPrincipalName, KerberosTicket TGT);
+    byte[] encodeApplicationRequest(KerberosApplicationRequest kerberosApplicationRequest);
+    KerberosApplicationRequest decodeApplicationRequest(byte[] token);
 }



Mime
View raw message