directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r164953 - /directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/spnego/codec/grammars/SpnegoGrammar.java /directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/spnego/codec/grammars/SpnegoStatesEnum.java
Date Wed, 27 Apr 2005 07:05:10 GMT
Author: elecharny
Date: Wed Apr 27 00:05:09 2005
New Revision: 164953

URL: http://svn.apache.org/viewcvs?rev=164953&view=rev
Log:
Added some states and grammar transitions. Work in progress !

Modified:
    directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/spnego/codec/grammars/SpnegoGrammar.java
    directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/spnego/codec/grammars/SpnegoStatesEnum.java

Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/spnego/codec/grammars/SpnegoGrammar.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/spnego/codec/grammars/SpnegoGrammar.java?rev=164953&r1=164952&r2=164953&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/spnego/codec/grammars/SpnegoGrammar.java
(original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/spnego/codec/grammars/SpnegoGrammar.java
Wed Apr 27 00:05:09 2005
@@ -22,7 +22,6 @@
 import org.apache.asn1.ber.grammar.GrammarAction;
 import org.apache.asn1.ber.grammar.GrammarTransition;
 import org.apache.asn1.ber.grammar.IGrammar;
-import org.apache.asn1.ldap.codec.grammars.LdapStatesEnum;
 import org.apache.asn1.spnego.codec.SpnegoContainer;
 import org.apache.asn1.spnego.codec.SpnegoPoolEnum;
 import org.apache.asn1.spnego.pojo.SpnegoNegTokenInitPOJO;
@@ -151,5 +150,58 @@
                     }
                 } );
         
+        // NegTokenInit ::= SEQUENCE { (Value)
+        //    mechTypes     [0]  MechTypeList  OPTIONAL,
+        //    reqFlags      [1]  ContextFlags  OPTIONAL,
+        //    mechToken     [2]  OCTET STRING  OPTIONAL,
+        //    mechListMIC   [3]  OCTET STRING  OPTIONAL } (Length)
+        // The next token will be either 0xA0, 0xA1, 0xA2 or 0xA3, depending on the
+        // element : mechType, reqFlages, mechToken or mechListMIC.
+        // This transition does nothing.
+        super.transitions[SpnegoStatesEnum.SPNEGO_NEG_TOKEN_INIT_SEQUENCE_VALUE][0x30] =
new GrammarTransition( SpnegoStatesEnum.SPNEGO_NEG_TOKEN_INIT_SEQUENCE_VALUE, SpnegoStatesEnum.SPNEGO_NEG_TOKEN_INIT_SEQUENCE_VALUE_TAG,
null);
+
+        // NegTokenInit ::= SEQUENCE {
+        //    mechTypes     [0]  MechTypeList  OPTIONAL, (Length)
+        //    ...
+        super.transitions[SpnegoStatesEnum.SPNEGO_NEG_TOKEN_INIT_SEQUENCE_VALUE_TAG][0xA0]
= new GrammarTransition( SpnegoStatesEnum.SPNEGO_NEG_TOKEN_INIT_SEQUENCE_VALUE_TAG, SpnegoStatesEnum.SPNEGO_MECH_TYPES_LENGTH,
null);
+
+        // NegTokenInit ::= SEQUENCE {
+        //    mechTypes     [0]  MechTypeList  OPTIONAL, (Value)
+        //    ...
+        super.transitions[SpnegoStatesEnum.SPNEGO_MECH_TYPES_LENGTH][0xA0] = new GrammarTransition(
SpnegoStatesEnum.SPNEGO_MECH_TYPES_LENGTH, SpnegoStatesEnum.SPNEGO_MECH_TYPES_VALUE, null);
+
+        super.transitions[SpnegoStatesEnum.SPNEGO_MECH_TYPES_VALUE][0xA0] = new GrammarTransition(
SpnegoStatesEnum.SPNEGO_MECH_TYPES_VALUE, SpnegoStatesEnum.SPNEGO_MECH_TYPES_LIST_TAG, null);
+
+        super.transitions[SpnegoStatesEnum.SPNEGO_MECH_TYPES_LIST_TAG][0x30] = new GrammarTransition(
SpnegoStatesEnum.SPNEGO_MECH_TYPES_LIST_TAG, SpnegoStatesEnum.SPNEGO_MECH_TYPES_LIST_LENGTH,
null);
+        
+        super.transitions[SpnegoStatesEnum.SPNEGO_MECH_TYPES_LIST_LENGTH][0x30] = new GrammarTransition(
SpnegoStatesEnum.SPNEGO_MECH_TYPES_LIST_LENGTH, SpnegoStatesEnum.SPNEGO_MECH_TYPES_LIST_VALUE,
null);
+        
+        super.transitions[SpnegoStatesEnum.SPNEGO_MECH_TYPES_LIST_VALUE][0x30] = new GrammarTransition(
SpnegoStatesEnum.SPNEGO_MECH_TYPES_LIST_VALUE, SpnegoStatesEnum.SPNEGO_MECH_TYPE_TAG, null);
+        
+        super.transitions[SpnegoStatesEnum.SPNEGO_MECH_TYPE_TAG][0x06] = new GrammarTransition(
SpnegoStatesEnum.SPNEGO_MECH_TYPE_TAG, SpnegoStatesEnum.SPNEGO_MECH_TYPE_TAG, null);
+        
+        super.transitions[SpnegoStatesEnum.SPNEGO_MECH_TYPE_LENGTH][0x06] = new GrammarTransition(
SpnegoStatesEnum.SPNEGO_MECH_TYPE_LENGTH, SpnegoStatesEnum.SPNEGO_MECH_TYPE_VALUE, null);
+
+        super.transitions[SpnegoStatesEnum.SPNEGO_MECH_TYPE_VALUE][0x06] = new GrammarTransition(
SpnegoStatesEnum.SPNEGO_MECH_TYPE_VALUE, SpnegoStatesEnum.SPNEGO_MECH_TYPE_FOLLOW_TAG, null);
+
+        
+        
+        
+        // NegTokenInit ::= SEQUENCE {
+        //    ...
+        //    reqFlags      [1]  ContextFlags  OPTIONAL, (Length)
+        //    ...
+        super.transitions[SpnegoStatesEnum.SPNEGO_NEG_TOKEN_INIT_SEQUENCE_VALUE_TAG][0xA1]
= new GrammarTransition( SpnegoStatesEnum.SPNEGO_NEG_TOKEN_INIT_SEQUENCE_VALUE_TAG, SpnegoStatesEnum.SPNEGO_REQ_FLAGS_LENGTH,
null);
+
+        // NegTokenInit ::= SEQUENCE {
+        //    ...
+        //    mechToken     [2]  OCTET STRING  OPTIONAL, (Length)
+        //    ...
+        super.transitions[SpnegoStatesEnum.SPNEGO_NEG_TOKEN_INIT_SEQUENCE_VALUE_TAG][0xA2]
= new GrammarTransition( SpnegoStatesEnum.SPNEGO_NEG_TOKEN_INIT_SEQUENCE_VALUE_TAG, SpnegoStatesEnum.SPNEGO_MECH_TOKEN_LENGTH,
null);
+
+        // NegTokenInit ::= SEQUENCE {
+        //    ...
+        //    mechListMIC   [3]  OCTET STRING  OPTIONAL } (Length)
+        super.transitions[SpnegoStatesEnum.SPNEGO_NEG_TOKEN_INIT_SEQUENCE_VALUE_TAG][0xA3]
= new GrammarTransition( SpnegoStatesEnum.SPNEGO_NEG_TOKEN_INIT_SEQUENCE_VALUE_TAG, SpnegoStatesEnum.SPNEGO_MECH_LIST_MIC_LENGTH,
null);
     }
 }

Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/spnego/codec/grammars/SpnegoStatesEnum.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/spnego/codec/grammars/SpnegoStatesEnum.java?rev=164953&r1=164952&r2=164953&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/spnego/codec/grammars/SpnegoStatesEnum.java
(original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/spnego/codec/grammars/SpnegoStatesEnum.java
Wed Apr 27 00:05:09 2005
@@ -44,6 +44,55 @@
     /** SPNEGO neg token init SEQUENCE Value */
     public static final int SPNEGO_NEG_TOKEN_INIT_SEQUENCE_VALUE = 5;
     
+    /** SPNEGO neg token init SEQUENCE Value next tag */
+    public static final int SPNEGO_NEG_TOKEN_INIT_SEQUENCE_VALUE_TAG = 6;
+    
+    /** SPNEGO mech types length */
+    public static final int SPNEGO_MECH_TYPES_LENGTH = 7;
+    
+    /** SPNEGO mech types value */
+    public static final int SPNEGO_MECH_TYPES_VALUE = 8;
+    
+    /** SPNEGO mech types list tag */
+    public static final int SPNEGO_MECH_TYPES_LIST_TAG = 9;
+    
+    /** SPNEGO mech types list length */
+    public static final int SPNEGO_MECH_TYPES_LIST_LENGTH = 10;
+    
+    /** SPNEGO mech types list value */
+    public static final int SPNEGO_MECH_TYPES_LIST_VALUE = 11;
+    
+    /** SPNEGO mech type tag */
+    public static final int SPNEGO_MECH_TYPE_TAG = 12;
+    
+    /** SPNEGO mech type length */
+    public static final int SPNEGO_MECH_TYPE_LENGTH = 13;
+    
+    /** SPNEGO mech type value */
+    public static final int SPNEGO_MECH_TYPE_VALUE = 14;
+    
+    /** SPNEGO mech type following tag */
+    public static final int SPNEGO_MECH_TYPE_FOLLOW_TAG = 15;
+    
+    
+    
+    
+
+    /** SPNEGO req flags tag */
+    public static final int SPNEGO_REQ_FLAGS_TAG = 9;
+    
+    /** SPNEGO req flags length */
+    public static final int SPNEGO_REQ_FLAGS_LENGTH = 10;
+    
+
+    /** SPNEGO mech token length */
+    public static final int SPNEGO_MECH_TOKEN_LENGTH = 7;
+
+
+    /** SPNEGO mech list MIC length */
+    public static final int SPNEGO_MECH_LIST_MIC_LENGTH = 7;
+
+
     /** SPNEGO neg token targ Tag */
     public static final int SPNEGO_NEG_TOKEN_TARG_TAG = 6;
 
@@ -54,7 +103,7 @@
     public static final int SPNEGO_NEG_TOKEN_TARG_VALUE = 8;
     
     /** SPNEGO last state */
-    public static final int LAST_SPNEGO_STATE = 10;
+    public static final int LAST_SPNEGO_STATE = 16;
 
     /** SPNEGO Grammar */
     public static final int SPNEGO_GRAMMAR = 0;



Mime
View raw message