directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject [5/5] directory-kerby git commit: o Added some Javadoc o Commented the decrypted parts, explaining that they are not used atm
Date Mon, 04 Jan 2016 11:46:08 GMT
o Added some Javadoc
o Commented the decrypted parts, explaining that they are not used atm

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

Branch: refs/heads/trunk
Commit: 82a7bdaa2b65cef956fa2c7c2ce9fe4463d3cd9c
Parents: 1ccb003
Author: Emmanuel L├ęcharny <elecharny@symas.com>
Authored: Mon Jan 4 12:45:11 2016 +0100
Committer: Emmanuel L├ęcharny <elecharny@symas.com>
Committed: Mon Jan 4 12:45:11 2016 +0100

----------------------------------------------------------------------
 .../kerby/kerberos/kerb/type/ap/ApRep.java      | 53 ++++++++++++++---
 .../kerby/kerberos/kerb/type/ap/ApReq.java      | 60 +++++++++++++++++---
 2 files changed, 98 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/82a7bdaa/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/type/ap/ApRep.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/type/ap/ApRep.java
b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/type/ap/ApRep.java
index 9d9728e..ff91af6 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/type/ap/ApRep.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/type/ap/ApRep.java
@@ -28,54 +28,91 @@ import org.apache.kerby.kerberos.kerb.type.base.KrbMessage;
 import org.apache.kerby.kerberos.kerb.type.base.KrbMessageType;
 
 /**
- AP-REP          ::= [APPLICATION 15] SEQUENCE {
- pvno            [0] INTEGER (5),
- msg-type        [1] INTEGER (15),
- enc-part        [2] EncryptedData -- EncAPRepPart
- }
+ * The AP-REP message, as defined in RFC 4120 :
+ * 
+ * <pre>
+ * AP-REP          ::= [APPLICATION 15] SEQUENCE {
+ *         pvno            [0] INTEGER (5),
+ *         msg-type        [1] INTEGER (15),
+ *         enc-part        [2] EncryptedData -- EncAPRepPart
+ * }
+ * </pre>
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public class ApRep extends KrbMessage {
+    /**
+     * The possible fields
+     */
     protected enum ApRepField implements EnumType {
         PVNO,
         MSG_TYPE,
         ENC_PART;
 
+        /**
+         * {@inheritDoc}
+         */
         @Override
         public int getValue() {
             return ordinal();
         }
 
+        /**
+         * {@inheritDoc}
+         */
         @Override
         public String getName() {
             return name();
         }
     }
 
+    /** The ApRep's fields */
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
             new ExplicitField(ApRepField.PVNO, Asn1Integer.class),
             new ExplicitField(ApRepField.MSG_TYPE, Asn1Integer.class),
             new ExplicitField(ApRepField.ENC_PART, EncryptedData.class)
     };
 
+    /** The decrypted part of this message (Not used atm) */
+    private EncAPRepPart encRepPart;
+
+    /**
+     * Creates an instance of ApRep
+     */
     public ApRep() {
         super(KrbMessageType.AP_REP, fieldInfos);
     }
 
-    private EncAPRepPart encRepPart;
 
+    /**
+     * @return The decrypted EncRepPart 
+     */
     public EncAPRepPart getEncRepPart() {
         return encRepPart;
     }
 
+    /**
+     * Set the decrypted EncRepPart into the message 
+     * 
+     * @param encRepPart The decrypted EncRepPart to store
+     */
     public void setEncRepPart(EncAPRepPart encRepPart) {
         this.encRepPart = encRepPart;
     }
 
+    /**
+     * @return The encrypted part 
+     */
     public EncryptedData getEncryptedEncPart() {
         return getFieldAs(ApRepField.ENC_PART, EncryptedData.class);
     }
 
-    public void setEncryptedEncPart(EncryptedData encryptedEncPart) {
-        setFieldAs(ApRepField.ENC_PART, encryptedEncPart);
+    /**
+     * Set the encrypted part into the message 
+     * 
+     * @param encPart The encrypted part to store
+     */
+    public void setEncryptedEncPart(EncryptedData encPart) {
+        setFieldAs(ApRepField.ENC_PART, encPart);
     }
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/82a7bdaa/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/type/ap/ApReq.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/type/ap/ApReq.java
b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/type/ap/ApReq.java
index df31e9a..a225e4a 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/type/ap/ApReq.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/type/ap/ApReq.java
@@ -29,15 +29,22 @@ import org.apache.kerby.kerberos.kerb.type.base.KrbMessageType;
 import org.apache.kerby.kerberos.kerb.type.ticket.Ticket;
 
 /**
- AP-REQ          ::= [APPLICATION 14] SEQUENCE {
- pvno            [0] INTEGER (5),
- msg-type        [1] INTEGER (14),
- ap-options      [2] APOptions,
- ticket          [3] Ticket,
- authenticator   [4] EncryptedData -- Authenticator
- }
+ * The AP-REQ message, as defined in RFC 4120 :
+ * <pre>
+ * AP-REQ          ::= [APPLICATION 14] SEQUENCE {
+ *         pvno            [0] INTEGER (5),
+ *         msg-type        [1] INTEGER (14),
+ *         ap-options      [2] APOptions,
+ *         ticket          [3] Ticket,
+ *         authenticator   [4] EncryptedData -- Authenticator
+ * }
+ * </pre>
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public class ApReq extends KrbMessage {
+    /**
+     * The possible fields
+     */
     protected enum ApReqField implements EnumType {
         PVNO,
         MSG_TYPE,
@@ -45,17 +52,24 @@ public class ApReq extends KrbMessage {
         TICKET,
         AUTHENTICATOR;
 
+        /**
+         * {@inheritDoc}
+         */
         @Override
         public int getValue() {
             return ordinal();
         }
 
+        /**
+         * {@inheritDoc}
+         */
         @Override
         public String getName() {
             return name();
         }
     }
 
+    /** The ApReq's fields */
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
             new ExplicitField(ApReqField.PVNO, Asn1Integer.class),
             new ExplicitField(ApReqField.MSG_TYPE, Asn1Integer.class),
@@ -64,40 +78,72 @@ public class ApReq extends KrbMessage {
             new ExplicitField(ApReqField.AUTHENTICATOR, EncryptedData.class)
     };
 
+    /** The decrypted authenticator. Not used atm*/
     private Authenticator authenticator;
 
+    /**
+     * Creates a new instance of a AP-REQ message
+     */
     public ApReq() {
         super(KrbMessageType.AP_REQ, fieldInfos);
     }
 
+    /**
+     * @return The AP-OPTIONS set
+     */
     public ApOptions getApOptions() {
         return getFieldAs(ApReqField.AP_OPTIONS, ApOptions.class);
     }
 
+    /**
+     * Stores the AP-OPTIONS in the message
+     * @param apOptions The AP-OPTIPNS to set
+     */
     public void setApOptions(ApOptions apOptions) {
         setFieldAs(ApReqField.AP_OPTIONS, apOptions);
     }
 
+    /**
+     * @return The Ticket
+     */
     public Ticket getTicket() {
         return getFieldAs(ApReqField.TICKET, Ticket.class);
     }
 
+    /**
+     * Stores the ticket in the message
+     * @param ticket The ticket
+     */
     public void setTicket(Ticket ticket) {
         setFieldAs(ApReqField.TICKET, ticket);
     }
 
+    /**
+     * @return the decrypted Authenticator
+     */
     public Authenticator getAuthenticator() {
         return authenticator;
     }
 
+    /**
+     * Stores the decrypted Authenticator
+     * @param authenticator the decrypted Authenticator
+     */
     public void setAuthenticator(Authenticator authenticator) {
         this.authenticator = authenticator;
     }
 
+    /**
+     * @return The encrypted Authenticator
+     */
     public EncryptedData getEncryptedAuthenticator() {
         return getFieldAs(ApReqField.AUTHENTICATOR, EncryptedData.class);
     }
 
+    /**
+     * Stores the encrypted authenticator in the message
+     * @param encryptedAuthenticator The encrypted authenticator
+     */
     public void setEncryptedAuthenticator(EncryptedData encryptedAuthenticator) {
         setFieldAs(ApReqField.AUTHENTICATOR, encryptedAuthenticator);
     }


Mime
View raw message