directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From plusplusjia...@apache.org
Subject [07/17] directory-kerby git commit: DIRKRB-476 Allow to define explicit and implicit fields more easily for collection types
Date Fri, 27 Nov 2015 08:18:17 GMT
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/ReplyKeyPack.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/pkinit/ReplyKeyPack.java
b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/pkinit/ReplyKeyPack.java
index 77f133b..406a4df 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/pkinit/ReplyKeyPack.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/pkinit/ReplyKeyPack.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.CheckSum;
 import org.apache.kerby.kerberos.kerb.spec.base.EncryptionKey;
@@ -35,8 +36,8 @@ public class ReplyKeyPack extends KrbSequenceType {
     private static final int AS_CHECKSUM = 1;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(REPLY_KEY, EncryptionKey.class),
-            new Asn1FieldInfo(AS_CHECKSUM, CheckSum.class)
+            new ExplicitField(REPLY_KEY, EncryptionKey.class),
+            new ExplicitField(AS_CHECKSUM, CheckSum.class)
     };
 
     public ReplyKeyPack() {

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/token/PaTokenChallenge.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/token/PaTokenChallenge.java
b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/token/PaTokenChallenge.java
index 77810bc..5f70174 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/token/PaTokenChallenge.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/token/PaTokenChallenge.java
@@ -20,6 +20,7 @@
 package org.apache.kerby.kerberos.kerb.spec.pa.token;
 
 import org.apache.kerby.asn1.type.Asn1FieldInfo;
+import org.apache.kerby.asn1.type.ExplicitField;
 import org.apache.kerby.kerberos.kerb.spec.KrbSequenceType;
 
 /**
@@ -31,7 +32,7 @@ public class PaTokenChallenge extends KrbSequenceType {
     private static final int TOKENINFOS = 0;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(TOKENINFOS, TokenInfos.class)
+            new ExplicitField(TOKENINFOS, TokenInfos.class)
     };
 
     public PaTokenChallenge() {

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/token/PaTokenRequest.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/token/PaTokenRequest.java
b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/token/PaTokenRequest.java
index 969f4db..8add888 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/token/PaTokenRequest.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/token/PaTokenRequest.java
@@ -20,6 +20,7 @@
 package org.apache.kerby.kerberos.kerb.spec.pa.token;
 
 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;
 
@@ -34,8 +35,8 @@ public class PaTokenRequest extends KrbSequenceType {
     private static final int TOKEN = 1;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(TOKEN_INFO, TokenInfo.class),
-            new Asn1FieldInfo(TOKEN, KrbToken.class)
+            new ExplicitField(TOKEN_INFO, TokenInfo.class),
+            new ExplicitField(TOKEN, KrbToken.class)
     };
 
     public PaTokenRequest() {

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/token/TokenInfo.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/token/TokenInfo.java
b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/token/TokenInfo.java
index 12abfef..ff56f13 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/token/TokenInfo.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/pa/token/TokenInfo.java
@@ -22,6 +22,7 @@ package org.apache.kerby.kerberos.kerb.spec.pa.token;
 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.KrbSequenceType;
 
 /**
@@ -35,8 +36,8 @@ public class TokenInfo extends KrbSequenceType {
     private static final int TOKEN_VENDOR = 1;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(FLAGS, Asn1OctetString.class, true),
-            new Asn1FieldInfo(TOKEN_VENDOR, Asn1Utf8String.class),
+            new ExplicitField(FLAGS, Asn1OctetString.class),
+            new ExplicitField(TOKEN_VENDOR, Asn1Utf8String.class),
     };
 
     public TokenInfo() {

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/ticket/EncTicketPart.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/ticket/EncTicketPart.java
b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/ticket/EncTicketPart.java
index df19da1..0fe3bcb 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/ticket/EncTicketPart.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/ticket/EncTicketPart.java
@@ -20,6 +20,7 @@
 package org.apache.kerby.kerberos.kerb.spec.ticket;
 
 import org.apache.kerby.asn1.type.Asn1FieldInfo;
+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,17 +62,17 @@ public class EncTicketPart extends KrbAppSequenceType {
     private static final int AUTHORIZATION_DATA = 10;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(FLAGS, 0, TicketFlags.class),
-            new Asn1FieldInfo(KEY, 1, EncryptionKey.class),
-            new Asn1FieldInfo(CREALM, 2, KerberosString.class),
-            new Asn1FieldInfo(CNAME, 3, PrincipalName.class),
-            new Asn1FieldInfo(TRANSITED, 4, TransitedEncoding.class),
-            new Asn1FieldInfo(AUTHTIME, 5, KerberosTime.class),
-            new Asn1FieldInfo(STARTTIME, 6, KerberosTime.class),
-            new Asn1FieldInfo(ENDTIME, 7, KerberosTime.class),
-            new Asn1FieldInfo(ENDTIME, 8, KerberosTime.class),
-            new Asn1FieldInfo(CADDR, 9, HostAddresses.class),
-            new Asn1FieldInfo(AUTHORIZATION_DATA, 10, AuthorizationData.class)
+            new ExplicitField(FLAGS, 0, TicketFlags.class),
+            new ExplicitField(KEY, 1, EncryptionKey.class),
+            new ExplicitField(CREALM, 2, KerberosString.class),
+            new ExplicitField(CNAME, 3, PrincipalName.class),
+            new ExplicitField(TRANSITED, 4, TransitedEncoding.class),
+            new ExplicitField(AUTHTIME, 5, KerberosTime.class),
+            new ExplicitField(STARTTIME, 6, KerberosTime.class),
+            new ExplicitField(ENDTIME, 7, KerberosTime.class),
+            new ExplicitField(ENDTIME, 8, KerberosTime.class),
+            new ExplicitField(CADDR, 9, HostAddresses.class),
+            new ExplicitField(AUTHORIZATION_DATA, 10, AuthorizationData.class)
     };
 
     public EncTicketPart() {

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/ticket/Ticket.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/ticket/Ticket.java
b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/ticket/Ticket.java
index 75213f1..a660210 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/ticket/Ticket.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/ticket/Ticket.java
@@ -21,6 +21,7 @@ package org.apache.kerby.kerberos.kerb.spec.ticket;
 
 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.KrbConstant;
 import org.apache.kerby.kerberos.kerb.spec.KerberosString;
 import org.apache.kerby.kerberos.kerb.spec.KrbAppSequenceType;
@@ -45,10 +46,10 @@ public class Ticket extends KrbAppSequenceType {
     private static final int ENC_PART = 3;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(TKT_VNO, 0, Asn1Integer.class),
-            new Asn1FieldInfo(REALM, 1, KerberosString.class),
-            new Asn1FieldInfo(SNAME, 2, PrincipalName.class),
-            new Asn1FieldInfo(ENC_PART, 3, EncryptedData.class)
+            new ExplicitField(TKT_VNO, 0, Asn1Integer.class),
+            new ExplicitField(REALM, 1, KerberosString.class),
+            new ExplicitField(SNAME, 2, PrincipalName.class),
+            new ExplicitField(ENC_PART, 3, EncryptedData.class)
     };
 
     public Ticket() {

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/x509/AlgorithmIdentifier.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/x509/AlgorithmIdentifier.java
b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/x509/AlgorithmIdentifier.java
index 7ee86c6..6731a29 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/x509/AlgorithmIdentifier.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/x509/AlgorithmIdentifier.java
@@ -25,6 +25,7 @@ import org.apache.kerby.asn1.type.Asn1FieldInfo;
 import org.apache.kerby.asn1.type.Asn1ObjectIdentifier;
 import org.apache.kerby.asn1.type.Asn1SequenceType;
 import org.apache.kerby.asn1.type.Asn1Type;
+import org.apache.kerby.asn1.type.ExplicitField;
 
 /**
  AlgorithmIdentifier  ::=  SEQUENCE  {
@@ -37,8 +38,8 @@ public class AlgorithmIdentifier extends Asn1SequenceType {
     private static final int PARAMETERS = 1;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(ALGORITHM, -1, Asn1ObjectIdentifier.class),
-            new Asn1FieldInfo(PARAMETERS, -1, Asn1Any.class)
+            new ExplicitField(ALGORITHM, -1, Asn1ObjectIdentifier.class),
+            new ExplicitField(PARAMETERS, -1, Asn1Any.class)
     };
 
     public AlgorithmIdentifier() {

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/x509/SubjectPublicKeyInfo.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/x509/SubjectPublicKeyInfo.java
b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/x509/SubjectPublicKeyInfo.java
index 499104e..28db296 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/x509/SubjectPublicKeyInfo.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/x509/SubjectPublicKeyInfo.java
@@ -22,6 +22,7 @@ package org.apache.kerby.kerberos.kerb.spec.x509;
 import org.apache.kerby.asn1.type.Asn1BitString;
 import org.apache.kerby.asn1.type.Asn1FieldInfo;
 import org.apache.kerby.asn1.type.Asn1SequenceType;
+import org.apache.kerby.asn1.type.ExplicitField;
 
 /**
  SubjectPublicKeyInfo  ::=  SEQUENCE  {
@@ -34,8 +35,8 @@ public class SubjectPublicKeyInfo extends Asn1SequenceType {
     private static final int SUBJECT_PUBLIC_KEY = 1;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(ALGORITHM, -1, AlgorithmIdentifier.class),
-            new Asn1FieldInfo(SUBJECT_PUBLIC_KEY, -1, Asn1BitString.class)
+            new ExplicitField(ALGORITHM, -1, AlgorithmIdentifier.class),
+            new ExplicitField(SUBJECT_PUBLIC_KEY, -1, Asn1BitString.class)
     };
 
     public SubjectPublicKeyInfo() {


Mime
View raw message