directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dran...@apache.org
Subject [2/2] directory-kerby git commit: DIRKRB-476 Allow to define explicit and implicit fields more easily for collection types
Date Fri, 27 Nov 2015 01:22:14 GMT
DIRKRB-476 Allow to define explicit and implicit fields more easily for collection types


Project: http://git-wip-us.apache.org/repos/asf/directory-kerby/repo
Commit: http://git-wip-us.apache.org/repos/asf/directory-kerby/commit/a8a07691
Tree: http://git-wip-us.apache.org/repos/asf/directory-kerby/tree/a8a07691
Diff: http://git-wip-us.apache.org/repos/asf/directory-kerby/diff/a8a07691

Branch: refs/heads/master
Commit: a8a07691afe6d3f8d96538ba1b547ba558844a48
Parents: 28bb76d
Author: Kai Zheng <kai.zheng@intel.com>
Authored: Fri Nov 27 09:21:47 2015 +0800
Committer: Kai Zheng <kai.zheng@intel.com>
Committed: Fri Nov 27 09:21:47 2015 +0800

----------------------------------------------------------------------
 .../apache/kerby/asn1/type/Asn1FieldInfo.java   | 14 +++------
 .../apache/kerby/asn1/type/ExplicitField.java   | 31 ++++++++++++++++++++
 .../apache/kerby/asn1/type/ImplicitField.java   | 31 ++++++++++++++++++++
 .../org/apache/kerby/asn1/PersonnelRecord.java  | 25 ++++++++--------
 .../kerberos/kerb/spec/KerberosString.java      |  1 +
 .../kerberos/kerb/spec/KrbAppSequenceType.java  |  2 +-
 .../kerberos/kerb/spec/KrbSequenceType.java     |  2 +-
 .../kerby/kerberos/kerb/spec/ad/AdToken.java    |  3 +-
 .../kerb/spec/ad/AuthorizationDataEntry.java    |  5 ++--
 .../kerby/kerberos/kerb/spec/ap/ApRep.java      |  9 +++---
 .../kerby/kerberos/kerb/spec/ap/ApReq.java      | 13 ++++----
 .../kerberos/kerb/spec/ap/Authenticator.java    | 19 ++++++------
 .../kerberos/kerb/spec/ap/EncAPRepPart.java     |  9 +++---
 .../kerby/kerberos/kerb/spec/base/CheckSum.java |  5 ++--
 .../kerberos/kerb/spec/base/EncryptedData.java  |  7 +++--
 .../kerberos/kerb/spec/base/EncryptionKey.java  |  5 ++--
 .../kerb/spec/base/EtypeInfo2Entry.java         |  7 +++--
 .../kerberos/kerb/spec/base/EtypeInfoEntry.java |  5 ++--
 .../kerberos/kerb/spec/base/HostAddress.java    |  5 ++--
 .../kerby/kerberos/kerb/spec/base/KrbError.java | 27 +++++++++--------
 .../kerby/kerberos/kerb/spec/base/KrbToken.java |  5 ++--
 .../kerberos/kerb/spec/base/LastReqEntry.java   |  5 ++--
 .../kerberos/kerb/spec/base/PrincipalName.java  |  5 ++--
 .../kerb/spec/base/TransitedEncoding.java       |  5 ++--
 .../kerberos/kerb/spec/fast/KrbFastArmor.java   |  5 ++--
 .../kerb/spec/fast/KrbFastArmoredRep.java       |  3 +-
 .../kerb/spec/fast/KrbFastArmoredReq.java       |  7 +++--
 .../kerb/spec/fast/KrbFastFinished.java         |  7 +++--
 .../kerberos/kerb/spec/fast/KrbFastReq.java     |  7 +++--
 .../kerb/spec/fast/KrbFastResponse.java         |  9 +++---
 .../kerberos/kerb/spec/fast/PaAuthnEntry.java   |  7 +++--
 .../kerberos/kerb/spec/fast/PaFxFastReply.java  |  3 +-
 .../kerb/spec/fast/PaFxFastRequest.java         |  3 +-
 .../kerberos/kerb/spec/kdc/EncKdcRepPart.java   | 25 ++++++++--------
 .../kerby/kerberos/kerb/spec/kdc/KdcRep.java    | 15 +++++-----
 .../kerby/kerberos/kerb/spec/kdc/KdcReq.java    |  9 +++---
 .../kerberos/kerb/spec/kdc/KdcReqBody.java      | 25 ++++++++--------
 .../kerb/spec/pa/PaAuthenticationSetElem.java   |  7 +++--
 .../kerberos/kerb/spec/pa/PaDataEntry.java      |  5 ++--
 .../kerby/kerberos/kerb/spec/pa/PaEncTsEnc.java |  5 ++--
 .../kerberos/kerb/spec/pa/otp/OtpTokenInfo.java | 19 ++++++------
 .../kerb/spec/pa/otp/PaOtpChallenge.java        | 11 +++----
 .../kerberos/kerb/spec/pa/pkinit/AuthPack.java  |  9 +++---
 .../kerberos/kerb/spec/pa/pkinit/DHRepInfo.java |  6 ++--
 .../pa/pkinit/ExternalPrincipalIdentifier.java  |  7 +++--
 .../kerb/spec/pa/pkinit/KdcDHKeyInfo.java       |  7 +++--
 .../kerb/spec/pa/pkinit/Krb5PrincipalName.java  |  5 ++--
 .../kerberos/kerb/spec/pa/pkinit/PaPkAsRep.java |  6 ++--
 .../kerberos/kerb/spec/pa/pkinit/PaPkAsReq.java |  8 +++--
 .../kerb/spec/pa/pkinit/PkAuthenticator.java    |  9 +++---
 .../kerb/spec/pa/pkinit/ReplyKeyPack.java       |  5 ++--
 .../kerb/spec/pa/token/PaTokenChallenge.java    |  3 +-
 .../kerb/spec/pa/token/PaTokenRequest.java      |  5 ++--
 .../kerberos/kerb/spec/pa/token/TokenInfo.java  |  5 ++--
 .../kerb/spec/ticket/EncTicketPart.java         | 23 ++++++++-------
 .../kerby/kerberos/kerb/spec/ticket/Ticket.java |  9 +++---
 .../kerb/spec/x509/AlgorithmIdentifier.java     |  5 ++--
 .../kerb/spec/x509/SubjectPublicKeyInfo.java    |  5 ++--
 58 files changed, 323 insertions(+), 211 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a8a07691/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1FieldInfo.java
----------------------------------------------------------------------
diff --git a/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1FieldInfo.java b/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1FieldInfo.java
index 0647159..3c844e1 100644
--- a/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1FieldInfo.java
+++ b/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1FieldInfo.java
@@ -27,19 +27,13 @@ public class Asn1FieldInfo {
     private boolean isImplicit;
     private Class<? extends Asn1Type> type;
 
-    public Asn1FieldInfo(int index, int tagNo, Class<? extends Asn1Type> type) {
-        this(index, tagNo, type, false);
-    }
-
-    public Asn1FieldInfo(int index, Class<? extends Asn1Type> type) {
-        this(index, index, type, false);
-    }
-
-    public Asn1FieldInfo(int index, Class<? extends Asn1Type> type, boolean isImplicit) {
+    public Asn1FieldInfo(int index, Class<? extends Asn1Type> type,
+                         boolean isImplicit) {
         this(index, index, type, isImplicit);
     }
 
-    public Asn1FieldInfo(int index, int tagNo, Class<? extends Asn1Type> type, boolean isImplicit) {
+    public Asn1FieldInfo(int index, int tagNo, Class<? extends Asn1Type> type,
+                         boolean isImplicit) {
         this.index = index;
         this.tagNo = tagNo;
         this.type = type;

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a8a07691/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/ExplicitField.java
----------------------------------------------------------------------
diff --git a/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/ExplicitField.java b/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/ExplicitField.java
new file mode 100644
index 0000000..7628fdc
--- /dev/null
+++ b/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/ExplicitField.java
@@ -0,0 +1,31 @@
+/**
+ *  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.kerby.asn1.type;
+
+public class ExplicitField extends Asn1FieldInfo {
+
+    public ExplicitField(int index, int tagNo, Class<? extends Asn1Type> type) {
+        super(index, tagNo, type, false);
+    }
+
+    public ExplicitField(int index, Class<? extends Asn1Type> type) {
+        super(index, index, type, false);
+    }
+}

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a8a07691/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/ImplicitField.java
----------------------------------------------------------------------
diff --git a/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/ImplicitField.java b/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/ImplicitField.java
new file mode 100644
index 0000000..128df68
--- /dev/null
+++ b/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/ImplicitField.java
@@ -0,0 +1,31 @@
+/**
+ *  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.kerby.asn1.type;
+
+public class ImplicitField extends Asn1FieldInfo {
+
+    public ImplicitField(int index, int tagNo, Class<? extends Asn1Type> type) {
+        super(index, tagNo, type, true);
+    }
+
+    public ImplicitField(int index, Class<? extends Asn1Type> type) {
+        super(index, index, type, true);
+    }
+}

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a8a07691/kerby-asn1/src/test/java/org/apache/kerby/asn1/PersonnelRecord.java
----------------------------------------------------------------------
diff --git a/kerby-asn1/src/test/java/org/apache/kerby/asn1/PersonnelRecord.java b/kerby-asn1/src/test/java/org/apache/kerby/asn1/PersonnelRecord.java
index cee7d3b..72da457 100644
--- a/kerby-asn1/src/test/java/org/apache/kerby/asn1/PersonnelRecord.java
+++ b/kerby-asn1/src/test/java/org/apache/kerby/asn1/PersonnelRecord.java
@@ -19,13 +19,14 @@
  */
 package org.apache.kerby.asn1;
 
-
 import org.apache.kerby.asn1.type.Asn1FieldInfo;
 import org.apache.kerby.asn1.type.Asn1Integer;
 import org.apache.kerby.asn1.type.Asn1SequenceOf;
 import org.apache.kerby.asn1.type.Asn1SetType;
 import org.apache.kerby.asn1.type.Asn1Tagging;
 import org.apache.kerby.asn1.type.Asn1VisibleString;
+import org.apache.kerby.asn1.type.ExplicitField;
+import org.apache.kerby.asn1.type.ImplicitField;
 import org.apache.kerby.asn1.type.TaggingSequence;
 import org.apache.kerby.asn1.type.TaggingSet;
 
@@ -42,12 +43,12 @@ public class PersonnelRecord extends TaggingSet {
     private static final int CHILDREN = 5;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(NAME, -1, Name.class),
-            new Asn1FieldInfo(TITLE, 0, Asn1VisibleString.class),
-            new Asn1FieldInfo(NUMBER, -1, EmployeeNumber.class),
-            new Asn1FieldInfo(DATEOFHIRE, 1, Date.class),
-            new Asn1FieldInfo(NAMEOFSPOUSE, 2, Name.class),
-            new Asn1FieldInfo(CHILDREN, 3, Children.class, true)
+            new ExplicitField(NAME, -1, Name.class),
+            new ExplicitField(TITLE, 0, Asn1VisibleString.class),
+            new ExplicitField(NUMBER, -1, EmployeeNumber.class),
+            new ExplicitField(DATEOFHIRE, 1, Date.class),
+            new ExplicitField(NAMEOFSPOUSE, 2, Name.class),
+            new ImplicitField(CHILDREN, 3, Children.class)
     };
 
     public PersonnelRecord() {
@@ -120,8 +121,8 @@ public class PersonnelRecord extends TaggingSet {
         private static final int DATEOFBIRTH = 1;
 
         static Asn1FieldInfo[] tags = new Asn1FieldInfo[] {
-                new Asn1FieldInfo(NAME, -1, Name.class),
-                new Asn1FieldInfo(DATEOFBIRTH, 0, Date.class)
+                new ExplicitField(NAME, -1, Name.class),
+                new ExplicitField(DATEOFBIRTH, 0, Date.class)
         };
 
         public ChildInformation() {
@@ -151,9 +152,9 @@ public class PersonnelRecord extends TaggingSet {
         private static final int FAMILYNAME = 2;
 
         static Asn1FieldInfo[] tags = new Asn1FieldInfo[] {
-                new Asn1FieldInfo(GIVENNAME, -1, Asn1VisibleString.class),
-                new Asn1FieldInfo(INITIAL, -1, Asn1VisibleString.class),
-                new Asn1FieldInfo(FAMILYNAME, -1, Asn1VisibleString.class)
+                new ExplicitField(GIVENNAME, -1, Asn1VisibleString.class),
+                new ExplicitField(INITIAL, -1, Asn1VisibleString.class),
+                new ExplicitField(FAMILYNAME, -1, Asn1VisibleString.class)
         };
 
         public Name() {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a8a07691/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/KerberosString.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/KerberosString.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/KerberosString.java
index 3078b72..9ada2fa 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/KerberosString.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/KerberosString.java
@@ -26,6 +26,7 @@ import org.apache.kerby.asn1.type.Asn1GeneralString;
  */
 public class KerberosString extends Asn1GeneralString {
     public KerberosString() {
+        super();
     }
 
     public KerberosString(String value) {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a8a07691/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/KrbAppSequenceType.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/KrbAppSequenceType.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/KrbAppSequenceType.java
index 5e83189..ef7f911 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/KrbAppSequenceType.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/KrbAppSequenceType.java
@@ -19,8 +19,8 @@
  */
 package org.apache.kerby.kerberos.kerb.spec;
 
-import org.apache.kerby.asn1.type.Asn1FieldInfo;
 import org.apache.kerby.asn1.type.Asn1EnumType;
+import org.apache.kerby.asn1.type.Asn1FieldInfo;
 import org.apache.kerby.asn1.type.TaggingSequence;
 
 /**

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a8a07691/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/KrbSequenceType.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/KrbSequenceType.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/KrbSequenceType.java
index b9902bc..a15cc59 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/KrbSequenceType.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/KrbSequenceType.java
@@ -19,9 +19,9 @@
  */
 package org.apache.kerby.kerberos.kerb.spec;
 
+import org.apache.kerby.asn1.type.Asn1EnumType;
 import org.apache.kerby.asn1.type.Asn1FieldInfo;
 import org.apache.kerby.asn1.type.Asn1SequenceType;
-import org.apache.kerby.asn1.type.Asn1EnumType;
 
 public abstract class KrbSequenceType extends Asn1SequenceType {
 

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a8a07691/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/ad/AdToken.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/ad/AdToken.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/ad/AdToken.java
index 652170b..80896ff 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/ad/AdToken.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/ad/AdToken.java
@@ -20,6 +20,7 @@
 package org.apache.kerby.kerberos.kerb.spec.ad;
 
 import org.apache.kerby.asn1.type.Asn1FieldInfo;
+import org.apache.kerby.asn1.type.ExplicitField;
 import org.apache.kerby.kerberos.kerb.spec.KrbSequenceType;
 import org.apache.kerby.kerberos.kerb.spec.base.KrbToken;
 
@@ -32,7 +33,7 @@ public class AdToken extends KrbSequenceType {
     private static final int TOKEN = 0;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(TOKEN, KrbToken.class)
+            new ExplicitField(TOKEN, KrbToken.class)
     };
 
     public AdToken() {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a8a07691/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/ad/AuthorizationDataEntry.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/ad/AuthorizationDataEntry.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/ad/AuthorizationDataEntry.java
index 07b04d7..6f5b3bf 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/ad/AuthorizationDataEntry.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/ad/AuthorizationDataEntry.java
@@ -22,6 +22,7 @@ package org.apache.kerby.kerberos.kerb.spec.ad;
 import org.apache.kerby.asn1.type.Asn1FieldInfo;
 import org.apache.kerby.asn1.type.Asn1Integer;
 import org.apache.kerby.asn1.type.Asn1OctetString;
+import org.apache.kerby.asn1.type.ExplicitField;
 import org.apache.kerby.kerberos.kerb.spec.KrbSequenceType;
 
 /**
@@ -35,8 +36,8 @@ public class AuthorizationDataEntry extends KrbSequenceType {
     private static final int AD_DATA = 1;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(AD_TYPE, 0, Asn1Integer.class),
-            new Asn1FieldInfo(AD_DATA, 1, Asn1OctetString.class)
+            new ExplicitField(AD_TYPE, 0, Asn1Integer.class),
+            new ExplicitField(AD_DATA, 1, Asn1OctetString.class)
     };
 
     public AuthorizationDataEntry() {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a8a07691/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/ap/ApRep.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/ap/ApRep.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/ap/ApRep.java
index 7433311..8e69400 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/ap/ApRep.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/ap/ApRep.java
@@ -21,8 +21,9 @@ package org.apache.kerby.kerberos.kerb.spec.ap;
 
 import org.apache.kerby.asn1.type.Asn1FieldInfo;
 import org.apache.kerby.asn1.type.Asn1Integer;
-import org.apache.kerby.kerberos.kerb.spec.base.KrbMessage;
+import org.apache.kerby.asn1.type.ExplicitField;
 import org.apache.kerby.kerberos.kerb.spec.base.EncryptedData;
+import org.apache.kerby.kerberos.kerb.spec.base.KrbMessage;
 import org.apache.kerby.kerberos.kerb.spec.base.KrbMessageType;
 
 /**
@@ -36,9 +37,9 @@ public class ApRep extends KrbMessage {
     private static final int ENC_PART = 2;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(PVNO, 0, Asn1Integer.class),
-            new Asn1FieldInfo(MSG_TYPE, 1, Asn1Integer.class),
-            new Asn1FieldInfo(ENC_PART, 2, EncryptedData.class)
+            new ExplicitField(PVNO, 0, Asn1Integer.class),
+            new ExplicitField(MSG_TYPE, 1, Asn1Integer.class),
+            new ExplicitField(ENC_PART, 2, EncryptedData.class)
     };
 
     public ApRep() {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a8a07691/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/ap/ApReq.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/ap/ApReq.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/ap/ApReq.java
index 9a0b994..23be6a4 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/ap/ApReq.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/ap/ApReq.java
@@ -21,8 +21,9 @@ package org.apache.kerby.kerberos.kerb.spec.ap;
 
 import org.apache.kerby.asn1.type.Asn1FieldInfo;
 import org.apache.kerby.asn1.type.Asn1Integer;
-import org.apache.kerby.kerberos.kerb.spec.base.KrbMessage;
+import org.apache.kerby.asn1.type.ExplicitField;
 import org.apache.kerby.kerberos.kerb.spec.base.EncryptedData;
+import org.apache.kerby.kerberos.kerb.spec.base.KrbMessage;
 import org.apache.kerby.kerberos.kerb.spec.base.KrbMessageType;
 import org.apache.kerby.kerberos.kerb.spec.ticket.Ticket;
 
@@ -41,11 +42,11 @@ public class ApReq extends KrbMessage {
     private static final int AUTHENTICATOR = 4;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(PVNO, Asn1Integer.class),
-            new Asn1FieldInfo(MSG_TYPE, Asn1Integer.class),
-            new Asn1FieldInfo(AP_OPTIONS, ApOptions.class),
-            new Asn1FieldInfo(TICKET, Ticket.class),
-            new Asn1FieldInfo(AUTHENTICATOR, EncryptedData.class)
+            new ExplicitField(PVNO, Asn1Integer.class),
+            new ExplicitField(MSG_TYPE, Asn1Integer.class),
+            new ExplicitField(AP_OPTIONS, ApOptions.class),
+            new ExplicitField(TICKET, Ticket.class),
+            new ExplicitField(AUTHENTICATOR, EncryptedData.class)
     };
 
     private Authenticator authenticator;

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a8a07691/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/ap/Authenticator.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/ap/Authenticator.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/ap/Authenticator.java
index 9705ecb..f40e031 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/ap/Authenticator.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/ap/Authenticator.java
@@ -21,6 +21,7 @@ package org.apache.kerby.kerberos.kerb.spec.ap;
 
 import org.apache.kerby.asn1.type.Asn1FieldInfo;
 import org.apache.kerby.asn1.type.Asn1Integer;
+import org.apache.kerby.asn1.type.ExplicitField;
 import org.apache.kerby.kerberos.kerb.spec.KerberosString;
 import org.apache.kerby.kerberos.kerb.spec.KerberosTime;
 import org.apache.kerby.kerberos.kerb.spec.KrbAppSequenceType;
@@ -55,15 +56,15 @@ public class Authenticator extends KrbAppSequenceType {
     private static final int AUTHORIZATION_DATA = 8;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(AUTHENTICATOR_VNO, 0, Asn1Integer.class),
-            new Asn1FieldInfo(CREALM, 1, KerberosString.class),
-            new Asn1FieldInfo(CNAME, 2, PrincipalName.class),
-            new Asn1FieldInfo(CKSUM, 3, CheckSum.class),
-            new Asn1FieldInfo(CUSEC, 4, Asn1Integer.class),
-            new Asn1FieldInfo(CTIME, 5, KerberosTime.class),
-            new Asn1FieldInfo(SUBKEY, 6, EncryptionKey.class),
-            new Asn1FieldInfo(SEQ_NUMBER, 7, Asn1Integer.class),
-            new Asn1FieldInfo(AUTHORIZATION_DATA, 8, AuthorizationData.class)
+            new ExplicitField(AUTHENTICATOR_VNO, 0, Asn1Integer.class),
+            new ExplicitField(CREALM, 1, KerberosString.class),
+            new ExplicitField(CNAME, 2, PrincipalName.class),
+            new ExplicitField(CKSUM, 3, CheckSum.class),
+            new ExplicitField(CUSEC, 4, Asn1Integer.class),
+            new ExplicitField(CTIME, 5, KerberosTime.class),
+            new ExplicitField(SUBKEY, 6, EncryptionKey.class),
+            new ExplicitField(SEQ_NUMBER, 7, Asn1Integer.class),
+            new ExplicitField(AUTHORIZATION_DATA, 8, AuthorizationData.class)
     };
 
     public Authenticator() {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a8a07691/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/ap/EncAPRepPart.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/ap/EncAPRepPart.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/ap/EncAPRepPart.java
index dd3b5ef..5b6826d 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/ap/EncAPRepPart.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/ap/EncAPRepPart.java
@@ -21,6 +21,7 @@ package org.apache.kerby.kerberos.kerb.spec.ap;
 
 import org.apache.kerby.asn1.type.Asn1FieldInfo;
 import org.apache.kerby.asn1.type.Asn1Integer;
+import org.apache.kerby.asn1.type.ExplicitField;
 import org.apache.kerby.kerberos.kerb.spec.KerberosTime;
 import org.apache.kerby.kerberos.kerb.spec.KrbAppSequenceType;
 import org.apache.kerby.kerberos.kerb.spec.base.EncryptionKey;
@@ -41,10 +42,10 @@ public class EncAPRepPart extends KrbAppSequenceType {
     private static final int SEQ_NUMBER = 3;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(CTIME, 0, KerberosTime.class),
-            new Asn1FieldInfo(CUSEC, 1, Asn1Integer.class),
-            new Asn1FieldInfo(SUBKEY, 2, EncryptionKey.class),
-            new Asn1FieldInfo(SEQ_NUMBER, 3, Asn1Integer.class)
+            new ExplicitField(CTIME, 0, KerberosTime.class),
+            new ExplicitField(CUSEC, 1, Asn1Integer.class),
+            new ExplicitField(SUBKEY, 2, EncryptionKey.class),
+            new ExplicitField(SEQ_NUMBER, 3, Asn1Integer.class)
     };
 
     public EncAPRepPart() {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a8a07691/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/CheckSum.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/CheckSum.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/CheckSum.java
index b0ec6b8..ce975a8 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/CheckSum.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/CheckSum.java
@@ -22,6 +22,7 @@ package org.apache.kerby.kerberos.kerb.spec.base;
 import org.apache.kerby.asn1.type.Asn1FieldInfo;
 import org.apache.kerby.asn1.type.Asn1Integer;
 import org.apache.kerby.asn1.type.Asn1OctetString;
+import org.apache.kerby.asn1.type.ExplicitField;
 import org.apache.kerby.kerberos.kerb.spec.KrbSequenceType;
 
 import java.util.Arrays;
@@ -37,8 +38,8 @@ public class CheckSum extends KrbSequenceType {
     private static final int CHECK_SUM = 1;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-        new Asn1FieldInfo(CKSUM_TYPE, 0, Asn1Integer.class),
-        new Asn1FieldInfo(CHECK_SUM, 1, Asn1OctetString.class)
+        new ExplicitField(CKSUM_TYPE, 0, Asn1Integer.class),
+        new ExplicitField(CHECK_SUM, 1, Asn1OctetString.class)
     };
 
     public CheckSum() {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a8a07691/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/EncryptedData.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/EncryptedData.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/EncryptedData.java
index 2092560..4ccc5a4 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/EncryptedData.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/EncryptedData.java
@@ -22,6 +22,7 @@ package org.apache.kerby.kerberos.kerb.spec.base;
 import org.apache.kerby.asn1.type.Asn1FieldInfo;
 import org.apache.kerby.asn1.type.Asn1Integer;
 import org.apache.kerby.asn1.type.Asn1OctetString;
+import org.apache.kerby.asn1.type.ExplicitField;
 import org.apache.kerby.kerberos.kerb.spec.KrbSequenceType;
 
 import java.util.Arrays;
@@ -39,9 +40,9 @@ public class EncryptedData extends KrbSequenceType {
     private static final int CIPHER = 2;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(ETYPE, 0, Asn1Integer.class),
-            new Asn1FieldInfo(KVNO, 1, Asn1Integer.class),
-            new Asn1FieldInfo(CIPHER, 2, Asn1OctetString.class)
+            new ExplicitField(ETYPE, 0, Asn1Integer.class),
+            new ExplicitField(KVNO, 1, Asn1Integer.class),
+            new ExplicitField(CIPHER, 2, Asn1OctetString.class)
     };
 
     public EncryptedData() {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a8a07691/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/EncryptionKey.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/EncryptionKey.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/EncryptionKey.java
index 4f00a46..9c00bee 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/EncryptionKey.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/EncryptionKey.java
@@ -22,6 +22,7 @@ package org.apache.kerby.kerberos.kerb.spec.base;
 import org.apache.kerby.asn1.type.Asn1FieldInfo;
 import org.apache.kerby.asn1.type.Asn1Integer;
 import org.apache.kerby.asn1.type.Asn1OctetString;
+import org.apache.kerby.asn1.type.ExplicitField;
 import org.apache.kerby.kerberos.kerb.spec.KrbSequenceType;
 
 import java.util.Arrays;
@@ -39,8 +40,8 @@ public class EncryptionKey extends KrbSequenceType {
     private int kvno = -1;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(KEY_TYPE, 0, Asn1Integer.class),
-            new Asn1FieldInfo(KEY_VALUE, 1, Asn1OctetString.class)
+            new ExplicitField(KEY_TYPE, 0, Asn1Integer.class),
+            new ExplicitField(KEY_VALUE, 1, Asn1OctetString.class)
     };
 
     public EncryptionKey() {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a8a07691/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/EtypeInfo2Entry.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/EtypeInfo2Entry.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/EtypeInfo2Entry.java
index a2071c7..aac940d 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/EtypeInfo2Entry.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/EtypeInfo2Entry.java
@@ -22,6 +22,7 @@ package org.apache.kerby.kerberos.kerb.spec.base;
 import org.apache.kerby.asn1.type.Asn1FieldInfo;
 import org.apache.kerby.asn1.type.Asn1Integer;
 import org.apache.kerby.asn1.type.Asn1OctetString;
+import org.apache.kerby.asn1.type.ExplicitField;
 import org.apache.kerby.kerberos.kerb.spec.KerberosString;
 import org.apache.kerby.kerberos.kerb.spec.KrbSequenceType;
 
@@ -38,9 +39,9 @@ public class EtypeInfo2Entry extends KrbSequenceType {
     private static final int S2KPARAMS = 2;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(ETYPE, 0, Asn1Integer.class),
-            new Asn1FieldInfo(SALT, 1, KerberosString.class),
-            new Asn1FieldInfo(S2KPARAMS, 2, Asn1OctetString.class)
+            new ExplicitField(ETYPE, 0, Asn1Integer.class),
+            new ExplicitField(SALT, 1, KerberosString.class),
+            new ExplicitField(S2KPARAMS, 2, Asn1OctetString.class)
     };
 
     public EtypeInfo2Entry() {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a8a07691/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/EtypeInfoEntry.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/EtypeInfoEntry.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/EtypeInfoEntry.java
index 0adb7b3..176a212 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/EtypeInfoEntry.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/EtypeInfoEntry.java
@@ -22,6 +22,7 @@ package org.apache.kerby.kerberos.kerb.spec.base;
 import org.apache.kerby.asn1.type.Asn1FieldInfo;
 import org.apache.kerby.asn1.type.Asn1Integer;
 import org.apache.kerby.asn1.type.Asn1OctetString;
+import org.apache.kerby.asn1.type.ExplicitField;
 import org.apache.kerby.kerberos.kerb.spec.KrbSequenceType;
 
 /**
@@ -35,8 +36,8 @@ public class EtypeInfoEntry extends KrbSequenceType {
     private static final int SALT = 1;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(ETYPE, 0, Asn1Integer.class),
-            new Asn1FieldInfo(SALT, 1, Asn1OctetString.class)
+            new ExplicitField(ETYPE, 0, Asn1Integer.class),
+            new ExplicitField(SALT, 1, Asn1OctetString.class)
     };
 
     public EtypeInfoEntry() {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a8a07691/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/HostAddress.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/HostAddress.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/HostAddress.java
index 2c2a1b8..404d803 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/HostAddress.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/HostAddress.java
@@ -22,6 +22,7 @@ package org.apache.kerby.kerberos.kerb.spec.base;
 import org.apache.kerby.asn1.type.Asn1FieldInfo;
 import org.apache.kerby.asn1.type.Asn1Integer;
 import org.apache.kerby.asn1.type.Asn1OctetString;
+import org.apache.kerby.asn1.type.ExplicitField;
 import org.apache.kerby.kerberos.kerb.spec.KrbSequenceType;
 
 import java.net.InetAddress;
@@ -38,8 +39,8 @@ public class HostAddress extends KrbSequenceType {
     private static final int ADDRESS = 1;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(ADDR_TYPE, 0, Asn1Integer.class),
-            new Asn1FieldInfo(ADDRESS, 1, Asn1OctetString.class)
+            new ExplicitField(ADDR_TYPE, 0, Asn1Integer.class),
+            new ExplicitField(ADDRESS, 1, Asn1OctetString.class)
     };
 
     public HostAddress() {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a8a07691/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/KrbError.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/KrbError.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/KrbError.java
index 5ff4e62..31938f9 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/KrbError.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/KrbError.java
@@ -22,6 +22,7 @@ package org.apache.kerby.kerberos.kerb.spec.base;
 import org.apache.kerby.asn1.type.Asn1FieldInfo;
 import org.apache.kerby.asn1.type.Asn1Integer;
 import org.apache.kerby.asn1.type.Asn1OctetString;
+import org.apache.kerby.asn1.type.ExplicitField;
 import org.apache.kerby.kerberos.kerb.KrbErrorCode;
 import org.apache.kerby.kerberos.kerb.spec.KerberosString;
 import org.apache.kerby.kerberos.kerb.spec.KerberosTime;
@@ -57,19 +58,19 @@ public class KrbError extends KrbMessage {
     private static final int EDATA = 12;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(PVNO, Asn1Integer.class),
-            new Asn1FieldInfo(MSG_TYPE, Asn1Integer.class),
-            new Asn1FieldInfo(CTIME, KerberosTime.class),
-            new Asn1FieldInfo(CUSEC, Asn1Integer.class),
-            new Asn1FieldInfo(STIME, KerberosTime.class),
-            new Asn1FieldInfo(SUSEC, Asn1Integer.class),
-            new Asn1FieldInfo(ERROR_CODE, Asn1Integer.class),
-            new Asn1FieldInfo(CREALM, KerberosString.class),
-            new Asn1FieldInfo(CNAME, PrincipalName.class),
-            new Asn1FieldInfo(REALM, KerberosString.class),
-            new Asn1FieldInfo(SNAME, PrincipalName.class),
-            new Asn1FieldInfo(ETEXT, KerberosString.class),
-            new Asn1FieldInfo(EDATA, Asn1OctetString.class)
+            new ExplicitField(PVNO, Asn1Integer.class),
+            new ExplicitField(MSG_TYPE, Asn1Integer.class),
+            new ExplicitField(CTIME, KerberosTime.class),
+            new ExplicitField(CUSEC, Asn1Integer.class),
+            new ExplicitField(STIME, KerberosTime.class),
+            new ExplicitField(SUSEC, Asn1Integer.class),
+            new ExplicitField(ERROR_CODE, Asn1Integer.class),
+            new ExplicitField(CREALM, KerberosString.class),
+            new ExplicitField(CNAME, PrincipalName.class),
+            new ExplicitField(REALM, KerberosString.class),
+            new ExplicitField(SNAME, PrincipalName.class),
+            new ExplicitField(ETEXT, KerberosString.class),
+            new ExplicitField(EDATA, Asn1OctetString.class)
     };
 
     public KrbError() {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a8a07691/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/KrbToken.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/KrbToken.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/KrbToken.java
index c40b7bb..e0ccd52 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/KrbToken.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/KrbToken.java
@@ -22,6 +22,7 @@ package org.apache.kerby.kerberos.kerb.spec.base;
 import org.apache.kerby.asn1.type.Asn1FieldInfo;
 import org.apache.kerby.asn1.type.Asn1Integer;
 import org.apache.kerby.asn1.type.Asn1OctetString;
+import org.apache.kerby.asn1.type.ExplicitField;
 import org.apache.kerby.kerberos.kerb.KrbConstant;
 import org.apache.kerby.kerberos.kerb.KrbException;
 import org.apache.kerby.kerberos.kerb.KrbRuntime;
@@ -51,8 +52,8 @@ public class KrbToken extends KrbSequenceType implements AuthToken {
     private AuthToken innerToken = null;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[]{
-            new Asn1FieldInfo(TOKEN_FORMAT, 0, Asn1Integer.class),
-            new Asn1FieldInfo(TOKEN_VALUE, 1, Asn1OctetString.class)
+            new ExplicitField(TOKEN_FORMAT, 0, Asn1Integer.class),
+            new ExplicitField(TOKEN_VALUE, 1, Asn1OctetString.class)
     };
 
 

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a8a07691/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/LastReqEntry.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/LastReqEntry.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/LastReqEntry.java
index c2553d8..816821a 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/LastReqEntry.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/LastReqEntry.java
@@ -21,6 +21,7 @@ package org.apache.kerby.kerberos.kerb.spec.base;
 
 import org.apache.kerby.asn1.type.Asn1FieldInfo;
 import org.apache.kerby.asn1.type.Asn1Integer;
+import org.apache.kerby.asn1.type.ExplicitField;
 import org.apache.kerby.kerberos.kerb.spec.KerberosTime;
 import org.apache.kerby.kerberos.kerb.spec.KrbSequenceType;
 
@@ -35,8 +36,8 @@ public class LastReqEntry extends KrbSequenceType {
     private static final int LR_VALUE = 1;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(LR_TYPE, 0, Asn1Integer.class),
-            new Asn1FieldInfo(LR_VALUE, 1, KerberosTime.class)
+            new ExplicitField(LR_TYPE, 0, Asn1Integer.class),
+            new ExplicitField(LR_VALUE, 1, KerberosTime.class)
     };
 
     public LastReqEntry() {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a8a07691/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/PrincipalName.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/PrincipalName.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/PrincipalName.java
index 4bf6e0f..4f9b45c 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/PrincipalName.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/PrincipalName.java
@@ -21,6 +21,7 @@ package org.apache.kerby.kerberos.kerb.spec.base;
 
 import org.apache.kerby.asn1.type.Asn1FieldInfo;
 import org.apache.kerby.asn1.type.Asn1Integer;
+import org.apache.kerby.asn1.type.ExplicitField;
 import org.apache.kerby.kerberos.kerb.spec.KerberosStrings;
 import org.apache.kerby.kerberos.kerb.spec.KrbSequenceType;
 
@@ -38,8 +39,8 @@ public class PrincipalName extends KrbSequenceType {
     private static final int NAME_TYPE = 0;
     private static final int NAME_STRING = 1;
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(NAME_TYPE, Asn1Integer.class),
-            new Asn1FieldInfo(NAME_STRING, KerberosStrings.class)
+            new ExplicitField(NAME_TYPE, Asn1Integer.class),
+            new ExplicitField(NAME_STRING, KerberosStrings.class)
     };
     private String realm;
 

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a8a07691/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/TransitedEncoding.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/TransitedEncoding.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/TransitedEncoding.java
index 1d69bd0..06d3cbe 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/TransitedEncoding.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/TransitedEncoding.java
@@ -22,6 +22,7 @@ package org.apache.kerby.kerberos.kerb.spec.base;
 import org.apache.kerby.asn1.type.Asn1FieldInfo;
 import org.apache.kerby.asn1.type.Asn1Integer;
 import org.apache.kerby.asn1.type.Asn1OctetString;
+import org.apache.kerby.asn1.type.ExplicitField;
 import org.apache.kerby.kerberos.kerb.spec.KrbSequenceType;
 
 /**
@@ -35,8 +36,8 @@ public class TransitedEncoding extends KrbSequenceType {
     private static final int CONTENTS = 1;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(TR_TYPE, 0, Asn1Integer.class),
-            new Asn1FieldInfo(CONTENTS, 1, Asn1OctetString.class)
+            new ExplicitField(TR_TYPE, 0, Asn1Integer.class),
+            new ExplicitField(CONTENTS, 1, Asn1OctetString.class)
     };
 
     public TransitedEncoding() {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a8a07691/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/fast/KrbFastArmor.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/fast/KrbFastArmor.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/fast/KrbFastArmor.java
index 71227ba..b1e5318 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/fast/KrbFastArmor.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/fast/KrbFastArmor.java
@@ -22,6 +22,7 @@ package org.apache.kerby.kerberos.kerb.spec.fast;
 import org.apache.kerby.asn1.type.Asn1FieldInfo;
 import org.apache.kerby.asn1.type.Asn1Integer;
 import org.apache.kerby.asn1.type.Asn1OctetString;
+import org.apache.kerby.asn1.type.ExplicitField;
 import org.apache.kerby.kerberos.kerb.spec.KrbSequenceType;
 
 /**
@@ -37,8 +38,8 @@ public class KrbFastArmor extends KrbSequenceType {
     private static final int ARMOR_VALUE = 1;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(ARMOR_TYPE, Asn1Integer.class),
-            new Asn1FieldInfo(ARMOR_VALUE, Asn1OctetString.class)
+            new ExplicitField(ARMOR_TYPE, Asn1Integer.class),
+            new ExplicitField(ARMOR_VALUE, Asn1OctetString.class)
     };
 
     public KrbFastArmor() {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a8a07691/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/fast/KrbFastArmoredRep.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/fast/KrbFastArmoredRep.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/fast/KrbFastArmoredRep.java
index 380f76f..e034d46 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/fast/KrbFastArmoredRep.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/fast/KrbFastArmoredRep.java
@@ -20,6 +20,7 @@
 package org.apache.kerby.kerberos.kerb.spec.fast;
 
 import org.apache.kerby.asn1.type.Asn1FieldInfo;
+import org.apache.kerby.asn1.type.ExplicitField;
 import org.apache.kerby.kerberos.kerb.spec.KrbSequenceType;
 import org.apache.kerby.kerberos.kerb.spec.base.EncryptedData;
 
@@ -35,7 +36,7 @@ public class KrbFastArmoredRep extends KrbSequenceType {
 
     //private
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(ENC_FAST_REP, EncryptedData.class)
+            new ExplicitField(ENC_FAST_REP, EncryptedData.class)
     };
 
     public KrbFastArmoredRep() {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a8a07691/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/fast/KrbFastArmoredReq.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/fast/KrbFastArmoredReq.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/fast/KrbFastArmoredReq.java
index dfef6d6..f1057b1 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/fast/KrbFastArmoredReq.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/fast/KrbFastArmoredReq.java
@@ -20,6 +20,7 @@
 package org.apache.kerby.kerberos.kerb.spec.fast;
 
 import org.apache.kerby.asn1.type.Asn1FieldInfo;
+import org.apache.kerby.asn1.type.ExplicitField;
 import org.apache.kerby.kerberos.kerb.spec.KrbSequenceType;
 import org.apache.kerby.kerberos.kerb.spec.base.CheckSum;
 import org.apache.kerby.kerberos.kerb.spec.base.EncryptedData;
@@ -52,9 +53,9 @@ public class KrbFastArmoredReq extends KrbSequenceType {
     private KrbFastReq fastReq;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(ARMOR, KrbFastArmor.class),
-            new Asn1FieldInfo(REQ_CHECKSUM, CheckSum.class),
-            new Asn1FieldInfo(ENC_FAST_REQ, EncryptedData.class),
+            new ExplicitField(ARMOR, KrbFastArmor.class),
+            new ExplicitField(REQ_CHECKSUM, CheckSum.class),
+            new ExplicitField(ENC_FAST_REQ, EncryptedData.class),
     };
 
     public KrbFastArmoredReq() {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a8a07691/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/fast/KrbFastFinished.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/fast/KrbFastFinished.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/fast/KrbFastFinished.java
index 12f120e..a2df6fe 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/fast/KrbFastFinished.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/fast/KrbFastFinished.java
@@ -20,6 +20,7 @@
 package org.apache.kerby.kerberos.kerb.spec.fast;
 
 import org.apache.kerby.asn1.type.Asn1FieldInfo;
+import org.apache.kerby.asn1.type.ExplicitField;
 import org.apache.kerby.kerberos.kerb.spec.KrbSequenceType;
 import org.apache.kerby.kerberos.kerb.spec.base.CheckSum;
 import org.apache.kerby.kerberos.kerb.spec.base.EncryptedData;
@@ -47,9 +48,9 @@ public class KrbFastFinished extends KrbSequenceType {
     private static final int REQ_BODY = 2;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(FAST_OPTIONS, KrbFastArmor.class),
-            new Asn1FieldInfo(PADATA, PaData.class),
-            new Asn1FieldInfo(REQ_BODY, EncryptedData.class),
+            new ExplicitField(FAST_OPTIONS, KrbFastArmor.class),
+            new ExplicitField(PADATA, PaData.class),
+            new ExplicitField(REQ_BODY, EncryptedData.class),
     };
 
     public KrbFastFinished() {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a8a07691/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/fast/KrbFastReq.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/fast/KrbFastReq.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/fast/KrbFastReq.java
index 9cbd15c..90cff9b 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/fast/KrbFastReq.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/fast/KrbFastReq.java
@@ -20,6 +20,7 @@
 package org.apache.kerby.kerberos.kerb.spec.fast;
 
 import org.apache.kerby.asn1.type.Asn1FieldInfo;
+import org.apache.kerby.asn1.type.ExplicitField;
 import org.apache.kerby.kerberos.kerb.spec.KrbSequenceType;
 import org.apache.kerby.kerberos.kerb.spec.kdc.KdcReqBody;
 import org.apache.kerby.kerberos.kerb.spec.pa.PaData;
@@ -43,9 +44,9 @@ public class KrbFastReq extends KrbSequenceType {
     private static final int REQ_BODY = 2;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(FAST_OPTIONS, FastOptions.class),
-            new Asn1FieldInfo(PADATA, PaData.class),
-            new Asn1FieldInfo(REQ_BODY, KdcReqBody.class),
+            new ExplicitField(FAST_OPTIONS, FastOptions.class),
+            new ExplicitField(PADATA, PaData.class),
+            new ExplicitField(REQ_BODY, KdcReqBody.class),
     };
 
     public KrbFastReq() {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a8a07691/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/fast/KrbFastResponse.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/fast/KrbFastResponse.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/fast/KrbFastResponse.java
index 98ee83c..eafaa82 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/fast/KrbFastResponse.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/fast/KrbFastResponse.java
@@ -21,6 +21,7 @@ package org.apache.kerby.kerberos.kerb.spec.fast;
 
 import org.apache.kerby.asn1.type.Asn1FieldInfo;
 import org.apache.kerby.asn1.type.Asn1Integer;
+import org.apache.kerby.asn1.type.ExplicitField;
 import org.apache.kerby.kerberos.kerb.spec.KrbSequenceType;
 import org.apache.kerby.kerberos.kerb.spec.base.EncryptionKey;
 import org.apache.kerby.kerberos.kerb.spec.pa.PaData;
@@ -46,10 +47,10 @@ public class KrbFastResponse extends KrbSequenceType {
     private static final int NONCE = 3;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(PADATA, PaData.class),
-            new Asn1FieldInfo(STRENGTHEN_KEY, EncryptionKey.class),
-            new Asn1FieldInfo(FINISHED, KrbFastFinished.class),
-            new Asn1FieldInfo(NONCE, Asn1Integer.class)
+            new ExplicitField(PADATA, PaData.class),
+            new ExplicitField(STRENGTHEN_KEY, EncryptionKey.class),
+            new ExplicitField(FINISHED, KrbFastFinished.class),
+            new ExplicitField(NONCE, Asn1Integer.class)
     };
 
     public KrbFastResponse() {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a8a07691/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/fast/PaAuthnEntry.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/fast/PaAuthnEntry.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/fast/PaAuthnEntry.java
index 34f60fa..6e78a7a 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/fast/PaAuthnEntry.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/fast/PaAuthnEntry.java
@@ -22,6 +22,7 @@ package org.apache.kerby.kerberos.kerb.spec.fast;
 import org.apache.kerby.asn1.type.Asn1FieldInfo;
 import org.apache.kerby.asn1.type.Asn1Integer;
 import org.apache.kerby.asn1.type.Asn1OctetString;
+import org.apache.kerby.asn1.type.ExplicitField;
 import org.apache.kerby.kerberos.kerb.spec.KrbSequenceType;
 import org.apache.kerby.kerberos.kerb.spec.pa.PaDataType;
 
@@ -38,9 +39,9 @@ public class PaAuthnEntry extends KrbSequenceType {
     private static final int PA_VALUE = 2;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(PA_TYPE, Asn1Integer.class),
-            new Asn1FieldInfo(PA_HINT, Asn1OctetString.class),
-            new Asn1FieldInfo(PA_VALUE, Asn1OctetString.class)
+            new ExplicitField(PA_TYPE, Asn1Integer.class),
+            new ExplicitField(PA_HINT, Asn1OctetString.class),
+            new ExplicitField(PA_VALUE, Asn1OctetString.class)
     };
 
     public PaAuthnEntry() {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a8a07691/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/fast/PaFxFastReply.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/fast/PaFxFastReply.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/fast/PaFxFastReply.java
index d8768a5..41d95bc 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/fast/PaFxFastReply.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/fast/PaFxFastReply.java
@@ -21,6 +21,7 @@ package org.apache.kerby.kerberos.kerb.spec.fast;
 
 import org.apache.kerby.asn1.type.Asn1Choice;
 import org.apache.kerby.asn1.type.Asn1FieldInfo;
+import org.apache.kerby.asn1.type.ExplicitField;
 
 /**
  PA-FX-FAST-REPLY ::= CHOICE {
@@ -31,7 +32,7 @@ public class PaFxFastReply extends Asn1Choice {
     private static final int ARMORED_DATA = 0;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(ARMORED_DATA, KrbFastArmoredRep.class)
+            new ExplicitField(ARMORED_DATA, KrbFastArmoredRep.class)
     };
 
     public PaFxFastReply() {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a8a07691/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/fast/PaFxFastRequest.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/fast/PaFxFastRequest.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/fast/PaFxFastRequest.java
index 4036ad2..5a24cd5 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/fast/PaFxFastRequest.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/fast/PaFxFastRequest.java
@@ -21,6 +21,7 @@ package org.apache.kerby.kerberos.kerb.spec.fast;
 
 import org.apache.kerby.asn1.type.Asn1Choice;
 import org.apache.kerby.asn1.type.Asn1FieldInfo;
+import org.apache.kerby.asn1.type.ExplicitField;
 
 /**
  PA-FX-FAST-REQUEST ::= CHOICE {
@@ -31,7 +32,7 @@ public class PaFxFastRequest extends Asn1Choice {
     private static final int ARMORED_DATA = 0;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(ARMORED_DATA, KrbFastArmoredReq.class)
+            new ExplicitField(ARMORED_DATA, KrbFastArmoredReq.class)
     };
 
     public PaFxFastRequest() {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a8a07691/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/kdc/EncKdcRepPart.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/kdc/EncKdcRepPart.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/kdc/EncKdcRepPart.java
index 32ab96b..dfccf18 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/kdc/EncKdcRepPart.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/kdc/EncKdcRepPart.java
@@ -21,6 +21,7 @@ package org.apache.kerby.kerberos.kerb.spec.kdc;
 
 import org.apache.kerby.asn1.type.Asn1FieldInfo;
 import org.apache.kerby.asn1.type.Asn1Integer;
+import org.apache.kerby.asn1.type.ExplicitField;
 import org.apache.kerby.kerberos.kerb.spec.KerberosString;
 import org.apache.kerby.kerberos.kerb.spec.KerberosTime;
 import org.apache.kerby.kerberos.kerb.spec.KrbAppSequenceType;
@@ -61,18 +62,18 @@ public abstract class EncKdcRepPart extends KrbAppSequenceType {
     private static final int CADDR = 11;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(KEY, EncryptionKey.class),
-            new Asn1FieldInfo(LAST_REQ, LastReq.class),
-            new Asn1FieldInfo(NONCE, Asn1Integer.class),
-            new Asn1FieldInfo(KEY_EXPIRATION, KerberosTime.class),
-            new Asn1FieldInfo(FLAGS, TicketFlags.class),
-            new Asn1FieldInfo(AUTHTIME, KerberosTime.class),
-            new Asn1FieldInfo(STARTTIME, KerberosTime.class),
-            new Asn1FieldInfo(ENDTIME, KerberosTime.class),
-            new Asn1FieldInfo(RENEW_TILL, KerberosTime.class),
-            new Asn1FieldInfo(SREALM, KerberosString.class),
-            new Asn1FieldInfo(SNAME, PrincipalName.class),
-            new Asn1FieldInfo(CADDR, HostAddresses.class)
+            new ExplicitField(KEY, EncryptionKey.class),
+            new ExplicitField(LAST_REQ, LastReq.class),
+            new ExplicitField(NONCE, Asn1Integer.class),
+            new ExplicitField(KEY_EXPIRATION, KerberosTime.class),
+            new ExplicitField(FLAGS, TicketFlags.class),
+            new ExplicitField(AUTHTIME, KerberosTime.class),
+            new ExplicitField(STARTTIME, KerberosTime.class),
+            new ExplicitField(ENDTIME, KerberosTime.class),
+            new ExplicitField(RENEW_TILL, KerberosTime.class),
+            new ExplicitField(SREALM, KerberosString.class),
+            new ExplicitField(SNAME, PrincipalName.class),
+            new ExplicitField(CADDR, HostAddresses.class)
     };
 
     public EncKdcRepPart(int tagNo) {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a8a07691/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/kdc/KdcRep.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/kdc/KdcRep.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/kdc/KdcRep.java
index 87a160a..fa92cd2 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/kdc/KdcRep.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/kdc/KdcRep.java
@@ -21,6 +21,7 @@ package org.apache.kerby.kerberos.kerb.spec.kdc;
 
 import org.apache.kerby.asn1.type.Asn1FieldInfo;
 import org.apache.kerby.asn1.type.Asn1Integer;
+import org.apache.kerby.asn1.type.ExplicitField;
 import org.apache.kerby.kerberos.kerb.spec.KerberosString;
 import org.apache.kerby.kerberos.kerb.spec.base.EncryptedData;
 import org.apache.kerby.kerberos.kerb.spec.base.KrbMessage;
@@ -51,13 +52,13 @@ public class KdcRep extends KrbMessage {
     private static final int ENC_PART = 6;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(PVNO, Asn1Integer.class),
-            new Asn1FieldInfo(MSG_TYPE, Asn1Integer.class),
-            new Asn1FieldInfo(PADATA, PaData.class),
-            new Asn1FieldInfo(CREALM, KerberosString.class),
-            new Asn1FieldInfo(CNAME, PrincipalName.class),
-            new Asn1FieldInfo(TICKET, Ticket.class),
-            new Asn1FieldInfo(ENC_PART, EncryptedData.class)
+            new ExplicitField(PVNO, Asn1Integer.class),
+            new ExplicitField(MSG_TYPE, Asn1Integer.class),
+            new ExplicitField(PADATA, PaData.class),
+            new ExplicitField(CREALM, KerberosString.class),
+            new ExplicitField(CNAME, PrincipalName.class),
+            new ExplicitField(TICKET, Ticket.class),
+            new ExplicitField(ENC_PART, EncryptedData.class)
     };
 
     private EncKdcRepPart encPart;

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a8a07691/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/kdc/KdcReq.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/kdc/KdcReq.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/kdc/KdcReq.java
index 96a9f10..b0417b4 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/kdc/KdcReq.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/kdc/KdcReq.java
@@ -21,6 +21,7 @@ package org.apache.kerby.kerberos.kerb.spec.kdc;
 
 import org.apache.kerby.asn1.type.Asn1FieldInfo;
 import org.apache.kerby.asn1.type.Asn1Integer;
+import org.apache.kerby.asn1.type.ExplicitField;
 import org.apache.kerby.kerberos.kerb.spec.base.KrbMessage;
 import org.apache.kerby.kerberos.kerb.spec.base.KrbMessageType;
 import org.apache.kerby.kerberos.kerb.spec.pa.PaData;
@@ -41,10 +42,10 @@ public class KdcReq extends KrbMessage {
     private static final int REQ_BODY = 3;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(PVNO, 1, Asn1Integer.class),
-            new Asn1FieldInfo(MSG_TYPE, 2, Asn1Integer.class),
-            new Asn1FieldInfo(PADATA, 3, PaData.class),
-            new Asn1FieldInfo(REQ_BODY, 4, KdcReqBody.class)
+            new ExplicitField(PVNO, 1, Asn1Integer.class),
+            new ExplicitField(MSG_TYPE, 2, Asn1Integer.class),
+            new ExplicitField(PADATA, 3, PaData.class),
+            new ExplicitField(REQ_BODY, 4, KdcReqBody.class)
     };
 
     public KdcReq(KrbMessageType msgType) {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a8a07691/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/kdc/KdcReqBody.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/kdc/KdcReqBody.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/kdc/KdcReqBody.java
index a9b3c48..9afadd6 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/kdc/KdcReqBody.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/kdc/KdcReqBody.java
@@ -21,6 +21,7 @@ package org.apache.kerby.kerberos.kerb.spec.kdc;
 
 import org.apache.kerby.asn1.type.Asn1FieldInfo;
 import org.apache.kerby.asn1.type.Asn1Integer;
+import org.apache.kerby.asn1.type.ExplicitField;
 import org.apache.kerby.kerberos.kerb.spec.KerberosString;
 import org.apache.kerby.kerberos.kerb.spec.KerberosTime;
 import org.apache.kerby.kerberos.kerb.spec.KrbIntegers;
@@ -73,18 +74,18 @@ public class KdcReqBody extends KrbSequenceType {
     private static final int ADDITIONAL_TICKETS = 11;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(KDC_OPTIONS, KdcOptions.class),
-            new Asn1FieldInfo(CNAME, PrincipalName.class),
-            new Asn1FieldInfo(REALM, KerberosString.class),
-            new Asn1FieldInfo(SNAME, PrincipalName.class),
-            new Asn1FieldInfo(FROM, KerberosTime.class),
-            new Asn1FieldInfo(TILL, KerberosTime.class),
-            new Asn1FieldInfo(RTIME, KerberosTime.class),
-            new Asn1FieldInfo(NONCE, Asn1Integer.class),
-            new Asn1FieldInfo(ETYPE, KrbIntegers.class),
-            new Asn1FieldInfo(ADDRESSES, HostAddresses.class),
-            new Asn1FieldInfo(ENC_AUTHORIZATION_DATA, AuthorizationData.class),
-            new Asn1FieldInfo(ADDITIONAL_TICKETS, Tickets.class)
+            new ExplicitField(KDC_OPTIONS, KdcOptions.class),
+            new ExplicitField(CNAME, PrincipalName.class),
+            new ExplicitField(REALM, KerberosString.class),
+            new ExplicitField(SNAME, PrincipalName.class),
+            new ExplicitField(FROM, KerberosTime.class),
+            new ExplicitField(TILL, KerberosTime.class),
+            new ExplicitField(RTIME, KerberosTime.class),
+            new ExplicitField(NONCE, Asn1Integer.class),
+            new ExplicitField(ETYPE, KrbIntegers.class),
+            new ExplicitField(ADDRESSES, HostAddresses.class),
+            new ExplicitField(ENC_AUTHORIZATION_DATA, AuthorizationData.class),
+            new ExplicitField(ADDITIONAL_TICKETS, Tickets.class)
     };
 
     public KdcReqBody() {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a8a07691/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/PaAuthenticationSetElem.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/PaAuthenticationSetElem.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/PaAuthenticationSetElem.java
index 48fbef9..9a3ca09 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/PaAuthenticationSetElem.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/PaAuthenticationSetElem.java
@@ -22,6 +22,7 @@ package org.apache.kerby.kerberos.kerb.spec.pa;
 import org.apache.kerby.asn1.type.Asn1FieldInfo;
 import org.apache.kerby.asn1.type.Asn1Integer;
 import org.apache.kerby.asn1.type.Asn1OctetString;
+import org.apache.kerby.asn1.type.ExplicitField;
 import org.apache.kerby.kerberos.kerb.spec.KrbSequenceType;
 
 /**
@@ -38,9 +39,9 @@ public class PaAuthenticationSetElem extends KrbSequenceType {
     private static final int PA_VALUE = 2;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(PA_TYPE, Asn1Integer.class),
-            new Asn1FieldInfo(PA_HINT, Asn1OctetString.class),
-            new Asn1FieldInfo(PA_VALUE, Asn1OctetString.class)
+            new ExplicitField(PA_TYPE, Asn1Integer.class),
+            new ExplicitField(PA_HINT, Asn1OctetString.class),
+            new ExplicitField(PA_VALUE, Asn1OctetString.class)
     };
 
     public PaAuthenticationSetElem() {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a8a07691/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/PaDataEntry.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/PaDataEntry.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/PaDataEntry.java
index 901eb06..5dd6e59 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/PaDataEntry.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/PaDataEntry.java
@@ -22,6 +22,7 @@ package org.apache.kerby.kerberos.kerb.spec.pa;
 import org.apache.kerby.asn1.type.Asn1FieldInfo;
 import org.apache.kerby.asn1.type.Asn1Integer;
 import org.apache.kerby.asn1.type.Asn1OctetString;
+import org.apache.kerby.asn1.type.ExplicitField;
 import org.apache.kerby.kerberos.kerb.spec.KrbSequenceType;
 
 /**
@@ -36,8 +37,8 @@ public class PaDataEntry extends KrbSequenceType {
     private static final int PADATA_VALUE = 1;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(PADATA_TYPE, 1, Asn1Integer.class),
-            new Asn1FieldInfo(PADATA_VALUE, 2, Asn1OctetString.class)
+            new ExplicitField(PADATA_TYPE, 1, Asn1Integer.class),
+            new ExplicitField(PADATA_VALUE, 2, Asn1OctetString.class)
     };
 
     public PaDataEntry() {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a8a07691/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/PaEncTsEnc.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/PaEncTsEnc.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/PaEncTsEnc.java
index 7eb0b56..1107919 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/PaEncTsEnc.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/PaEncTsEnc.java
@@ -21,6 +21,7 @@ package org.apache.kerby.kerberos.kerb.spec.pa;
 
 import org.apache.kerby.asn1.type.Asn1FieldInfo;
 import org.apache.kerby.asn1.type.Asn1Integer;
+import org.apache.kerby.asn1.type.ExplicitField;
 import org.apache.kerby.kerberos.kerb.spec.KerberosTime;
 import org.apache.kerby.kerberos.kerb.spec.KrbSequenceType;
 
@@ -35,8 +36,8 @@ public class PaEncTsEnc extends KrbSequenceType {
     private static final int PAUSEC = 1;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(PATIMESTAMP, 0, KerberosTime.class),
-            new Asn1FieldInfo(PAUSEC, 1, Asn1Integer.class)
+            new ExplicitField(PATIMESTAMP, 0, KerberosTime.class),
+            new ExplicitField(PAUSEC, 1, Asn1Integer.class)
     };
 
     public PaEncTsEnc() {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a8a07691/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/otp/OtpTokenInfo.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/otp/OtpTokenInfo.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/otp/OtpTokenInfo.java
index fa29244..b2a6a6a 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/otp/OtpTokenInfo.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/otp/OtpTokenInfo.java
@@ -23,6 +23,7 @@ import org.apache.kerby.asn1.type.Asn1FieldInfo;
 import org.apache.kerby.asn1.type.Asn1Integer;
 import org.apache.kerby.asn1.type.Asn1OctetString;
 import org.apache.kerby.asn1.type.Asn1Utf8String;
+import org.apache.kerby.asn1.type.ExplicitField;
 import org.apache.kerby.kerberos.kerb.spec.KerberosString;
 import org.apache.kerby.kerberos.kerb.spec.KrbSequenceType;
 import org.apache.kerby.kerberos.kerb.spec.pa.pkinit.AlgorithmIdentifiers;
@@ -52,15 +53,15 @@ public class OtpTokenInfo extends KrbSequenceType {
     private static final int ITERATION_COUNT = 8;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(FLAGS, Asn1OctetString.class, true),
-            new Asn1FieldInfo(OTP_VENDOR, Asn1Utf8String.class),
-            new Asn1FieldInfo(OTP_CHALLENGE, Asn1OctetString.class, true),
-            new Asn1FieldInfo(OTP_LENGTH, KerberosString.class),
-            new Asn1FieldInfo(OTP_FORMAT, Asn1OctetString.class, true),
-            new Asn1FieldInfo(OTP_TOKEN_ID, Asn1Utf8String.class),
-            new Asn1FieldInfo(OTP_ALG_ID, Asn1OctetString.class, true),
-            new Asn1FieldInfo(SUPPORTED_HASH_ALG, AlgorithmIdentifiers.class),
-            new Asn1FieldInfo(ITERATION_COUNT, Asn1Integer.class, true)
+            new ExplicitField(FLAGS, Asn1OctetString.class),
+            new ExplicitField(OTP_VENDOR, Asn1Utf8String.class),
+            new ExplicitField(OTP_CHALLENGE, Asn1OctetString.class),
+            new ExplicitField(OTP_LENGTH, KerberosString.class),
+            new ExplicitField(OTP_FORMAT, Asn1OctetString.class),
+            new ExplicitField(OTP_TOKEN_ID, Asn1Utf8String.class),
+            new ExplicitField(OTP_ALG_ID, Asn1OctetString.class),
+            new ExplicitField(SUPPORTED_HASH_ALG, AlgorithmIdentifiers.class),
+            new ExplicitField(ITERATION_COUNT, Asn1Integer.class)
     };
 
     public OtpTokenInfo() {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a8a07691/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/otp/PaOtpChallenge.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/otp/PaOtpChallenge.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/otp/PaOtpChallenge.java
index 58140a9..a146552 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/otp/PaOtpChallenge.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/otp/PaOtpChallenge.java
@@ -22,6 +22,7 @@ package org.apache.kerby.kerberos.kerb.spec.pa.otp;
 import org.apache.kerby.asn1.type.Asn1FieldInfo;
 import org.apache.kerby.asn1.type.Asn1OctetString;
 import org.apache.kerby.asn1.type.Asn1Utf8String;
+import org.apache.kerby.asn1.type.ExplicitField;
 import org.apache.kerby.kerberos.kerb.spec.KerberosString;
 import org.apache.kerby.kerberos.kerb.spec.KrbSequenceType;
 
@@ -42,11 +43,11 @@ public class PaOtpChallenge extends KrbSequenceType {
     private static final int S2KPARAMS = 4;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(NONCE, Asn1OctetString.class, true),
-            new Asn1FieldInfo(OTP_SERVICE, Asn1Utf8String.class),
-            new Asn1FieldInfo(OTP_TOKEN_INFO, Asn1OctetString.class, true),
-            new Asn1FieldInfo(SALT, KerberosString.class),
-            new Asn1FieldInfo(S2KPARAMS, Asn1OctetString.class, true)
+            new ExplicitField(NONCE, Asn1OctetString.class),
+            new ExplicitField(OTP_SERVICE, Asn1Utf8String.class),
+            new ExplicitField(OTP_TOKEN_INFO, Asn1OctetString.class),
+            new ExplicitField(SALT, KerberosString.class),
+            new ExplicitField(S2KPARAMS, Asn1OctetString.class)
     };
 
     public PaOtpChallenge() {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a8a07691/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/pkinit/AuthPack.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/pkinit/AuthPack.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/pkinit/AuthPack.java
index 8ca1f9c..c3e429a 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/pkinit/AuthPack.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/pkinit/AuthPack.java
@@ -20,6 +20,7 @@
 package org.apache.kerby.kerberos.kerb.spec.pa.pkinit;
 
 import org.apache.kerby.asn1.type.Asn1FieldInfo;
+import org.apache.kerby.asn1.type.ExplicitField;
 import org.apache.kerby.kerberos.kerb.spec.KrbSequenceType;
 import org.apache.kerby.kerberos.kerb.spec.x509.SubjectPublicKeyInfo;
 
@@ -38,10 +39,10 @@ public class AuthPack extends KrbSequenceType {
     private static final int CLIENT_DH_NONCE = 3;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(PK_AUTHENTICATOR, PkAuthenticator.class),
-            new Asn1FieldInfo(CLIENT_PUBLIC_VALUE, SubjectPublicKeyInfo.class),
-            new Asn1FieldInfo(SUPPORTED_CMS_TYPES, AlgorithmIdentifiers.class),
-            new Asn1FieldInfo(CLIENT_DH_NONCE, DHNonce.class)
+            new ExplicitField(PK_AUTHENTICATOR, PkAuthenticator.class),
+            new ExplicitField(CLIENT_PUBLIC_VALUE, SubjectPublicKeyInfo.class),
+            new ExplicitField(SUPPORTED_CMS_TYPES, AlgorithmIdentifiers.class),
+            new ExplicitField(CLIENT_DH_NONCE, DHNonce.class)
     };
 
     public AuthPack() {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a8a07691/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/pkinit/DHRepInfo.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/pkinit/DHRepInfo.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/pkinit/DHRepInfo.java
index 721e87a..85072fb 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/pkinit/DHRepInfo.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/pkinit/DHRepInfo.java
@@ -21,6 +21,8 @@ package org.apache.kerby.kerberos.kerb.spec.pa.pkinit;
 
 import org.apache.kerby.asn1.type.Asn1FieldInfo;
 import org.apache.kerby.asn1.type.Asn1OctetString;
+import org.apache.kerby.asn1.type.ExplicitField;
+import org.apache.kerby.asn1.type.ImplicitField;
 import org.apache.kerby.kerberos.kerb.spec.KrbSequenceType;
 
 /**
@@ -34,8 +36,8 @@ public class DHRepInfo extends KrbSequenceType {
     private static final int SERVER_DH_NONCE = 1;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(DH_SIGNED_DATA, Asn1OctetString.class, true),
-            new Asn1FieldInfo(SERVER_DH_NONCE, DHNonce.class)
+            new ImplicitField(DH_SIGNED_DATA, Asn1OctetString.class),
+            new ExplicitField(SERVER_DH_NONCE, DHNonce.class)
     };
 
     public DHRepInfo() {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a8a07691/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/pkinit/ExternalPrincipalIdentifier.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/pkinit/ExternalPrincipalIdentifier.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/pkinit/ExternalPrincipalIdentifier.java
index 08be503..5e03253 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/pkinit/ExternalPrincipalIdentifier.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/pkinit/ExternalPrincipalIdentifier.java
@@ -21,6 +21,7 @@ package org.apache.kerby.kerberos.kerb.spec.pa.pkinit;
 
 import org.apache.kerby.asn1.type.Asn1FieldInfo;
 import org.apache.kerby.asn1.type.Asn1OctetString;
+import org.apache.kerby.asn1.type.ImplicitField;
 import org.apache.kerby.kerberos.kerb.spec.KrbSequenceType;
 
 /**
@@ -36,9 +37,9 @@ public class ExternalPrincipalIdentifier extends KrbSequenceType {
     private static final int SUBJECT_KEY_IDENTIFIER = 2;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(SUBJECT_NAME, Asn1OctetString.class, true),
-            new Asn1FieldInfo(ISSUER_AND_SERIAL_NUMBER, Asn1OctetString.class, true),
-            new Asn1FieldInfo(SUBJECT_KEY_IDENTIFIER, Asn1OctetString.class, true)
+            new ImplicitField(SUBJECT_NAME, Asn1OctetString.class),
+            new ImplicitField(ISSUER_AND_SERIAL_NUMBER, Asn1OctetString.class),
+            new ImplicitField(SUBJECT_KEY_IDENTIFIER, Asn1OctetString.class)
     };
 
     public ExternalPrincipalIdentifier() {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a8a07691/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/pkinit/KdcDHKeyInfo.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/pkinit/KdcDHKeyInfo.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/pkinit/KdcDHKeyInfo.java
index 0e9504e..b5e23f4 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/pkinit/KdcDHKeyInfo.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/pkinit/KdcDHKeyInfo.java
@@ -22,6 +22,7 @@ package org.apache.kerby.kerberos.kerb.spec.pa.pkinit;
 import org.apache.kerby.asn1.type.Asn1BitString;
 import org.apache.kerby.asn1.type.Asn1FieldInfo;
 import org.apache.kerby.asn1.type.Asn1Integer;
+import org.apache.kerby.asn1.type.ExplicitField;
 import org.apache.kerby.kerberos.kerb.spec.KerberosTime;
 import org.apache.kerby.kerberos.kerb.spec.KrbSequenceType;
 
@@ -38,9 +39,9 @@ public class KdcDHKeyInfo extends KrbSequenceType {
     private static final int DH_KEY_EXPIRATION = 2;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(SUBJECT_PUBLICK_KEY, Asn1BitString.class),
-            new Asn1FieldInfo(NONCE, Asn1Integer.class),
-            new Asn1FieldInfo(DH_KEY_EXPIRATION, KerberosTime.class)
+            new ExplicitField(SUBJECT_PUBLICK_KEY, Asn1BitString.class),
+            new ExplicitField(NONCE, Asn1Integer.class),
+            new ExplicitField(DH_KEY_EXPIRATION, KerberosTime.class)
     };
 
     public KdcDHKeyInfo() {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a8a07691/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/pkinit/Krb5PrincipalName.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/pkinit/Krb5PrincipalName.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/pkinit/Krb5PrincipalName.java
index 347af0b..eb210e2 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/pkinit/Krb5PrincipalName.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/pkinit/Krb5PrincipalName.java
@@ -20,6 +20,7 @@
 package org.apache.kerby.kerberos.kerb.spec.pa.pkinit;
 
 import org.apache.kerby.asn1.type.Asn1FieldInfo;
+import org.apache.kerby.asn1.type.ExplicitField;
 import org.apache.kerby.kerberos.kerb.spec.KrbSequenceType;
 import org.apache.kerby.kerberos.kerb.spec.base.PrincipalName;
 import org.apache.kerby.kerberos.kerb.spec.base.Realm;
@@ -35,8 +36,8 @@ public class Krb5PrincipalName extends KrbSequenceType {
     private static final int PRINCIPAL_NAME = 1;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(REALM, Realm.class),
-            new Asn1FieldInfo(PRINCIPAL_NAME, PrincipalName.class)
+            new ExplicitField(REALM, Realm.class),
+            new ExplicitField(PRINCIPAL_NAME, PrincipalName.class)
     };
 
     public Krb5PrincipalName() {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a8a07691/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/pkinit/PaPkAsRep.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/pkinit/PaPkAsRep.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/pkinit/PaPkAsRep.java
index 5c6000e..49cc980 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/pkinit/PaPkAsRep.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/pkinit/PaPkAsRep.java
@@ -22,6 +22,8 @@ package org.apache.kerby.kerberos.kerb.spec.pa.pkinit;
 import org.apache.kerby.asn1.type.Asn1Choice;
 import org.apache.kerby.asn1.type.Asn1FieldInfo;
 import org.apache.kerby.asn1.type.Asn1OctetString;
+import org.apache.kerby.asn1.type.ExplicitField;
+import org.apache.kerby.asn1.type.ImplicitField;
 
 /**
  PA-PK-AS-REP ::= CHOICE {
@@ -34,8 +36,8 @@ public class PaPkAsRep extends Asn1Choice {
     private static final int ENCKEY_PACK = 1;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(DH_INFO, DHRepInfo.class),
-            new Asn1FieldInfo(ENCKEY_PACK, Asn1OctetString.class, true)
+            new ExplicitField(DH_INFO, DHRepInfo.class),
+            new ImplicitField(ENCKEY_PACK, Asn1OctetString.class)
     };
 
     public PaPkAsRep() {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a8a07691/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/pkinit/PaPkAsReq.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/pkinit/PaPkAsReq.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/pkinit/PaPkAsReq.java
index 53c1b0d..7e740c2 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/pkinit/PaPkAsReq.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/pkinit/PaPkAsReq.java
@@ -21,6 +21,8 @@ package org.apache.kerby.kerberos.kerb.spec.pa.pkinit;
 
 import org.apache.kerby.asn1.type.Asn1FieldInfo;
 import org.apache.kerby.asn1.type.Asn1OctetString;
+import org.apache.kerby.asn1.type.ExplicitField;
+import org.apache.kerby.asn1.type.ImplicitField;
 import org.apache.kerby.kerberos.kerb.spec.KrbSequenceType;
 
 /**
@@ -36,9 +38,9 @@ public class PaPkAsReq extends KrbSequenceType {
     private static final int KDC_PKID = 2;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(SIGNED_AUTH_PACK, Asn1OctetString.class, true),
-            new Asn1FieldInfo(TRUSTED_CERTIFIERS, TrustedCertifiers.class),
-            new Asn1FieldInfo(KDC_PKID, Asn1OctetString.class, true)
+            new ImplicitField(SIGNED_AUTH_PACK, Asn1OctetString.class),
+            new ExplicitField(TRUSTED_CERTIFIERS, TrustedCertifiers.class),
+            new ImplicitField(KDC_PKID, Asn1OctetString.class)
     };
 
     public PaPkAsReq() {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a8a07691/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/pkinit/PkAuthenticator.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/pkinit/PkAuthenticator.java b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/pkinit/PkAuthenticator.java
index 4d3909e..c24fad2 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/pkinit/PkAuthenticator.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/pkinit/PkAuthenticator.java
@@ -22,6 +22,7 @@ package org.apache.kerby.kerberos.kerb.spec.pa.pkinit;
 import org.apache.kerby.asn1.type.Asn1FieldInfo;
 import org.apache.kerby.asn1.type.Asn1Integer;
 import org.apache.kerby.asn1.type.Asn1OctetString;
+import org.apache.kerby.asn1.type.ExplicitField;
 import org.apache.kerby.kerberos.kerb.spec.KerberosTime;
 import org.apache.kerby.kerberos.kerb.spec.KrbSequenceType;
 
@@ -47,10 +48,10 @@ public class PkAuthenticator extends KrbSequenceType {
     private static final int PA_CHECKSUM = 3;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(CUSEC, Asn1Integer.class),
-            new Asn1FieldInfo(CTIME, KerberosTime.class),
-            new Asn1FieldInfo(NONCE, Asn1Integer.class),
-            new Asn1FieldInfo(PA_CHECKSUM, Asn1OctetString.class)
+            new ExplicitField(CUSEC, Asn1Integer.class),
+            new ExplicitField(CTIME, KerberosTime.class),
+            new ExplicitField(NONCE, Asn1Integer.class),
+            new ExplicitField(PA_CHECKSUM, Asn1OctetString.class)
     };
 
     public PkAuthenticator() {


Mime
View raw message