< prev index next >

jdk/src/java.security.jgss/share/classes/javax/security/auth/kerberos/KerberosCredMessage.java

Print this page




  28 import javax.security.auth.Destroyable;
  29 import java.util.Arrays;
  30 import java.util.Base64;
  31 import java.util.Objects;
  32 
  33 /**
  34  * This class encapsulates a Kerberos 5 KRB_CRED message which can be used to
  35  * send Kerberos credentials from one principal to another.<p>
  36  *
  37  * A KRB_CRED message is defined in Section 5.8.1 of the Kerberos Protocol
  38  * Specification (<a href=http://www.ietf.org/rfc/rfc4120.txt>RFC 4120</a>) as:
  39  * <pre>
  40  *    KRB-CRED        ::= [APPLICATION 22] SEQUENCE {
  41  *            pvno            [0] INTEGER (5),
  42  *            msg-type        [1] INTEGER (22),
  43  *            tickets         [2] SEQUENCE OF Ticket,
  44  *            enc-part        [3] EncryptedData -- EncKrbCredPart
  45  *    }
  46  * </pre>
  47  *
  48  * @since 1.9
  49  */
  50 public final class KerberosCredMessage implements Destroyable {
  51 
  52     final private KerberosPrincipal sender;
  53     final private KerberosPrincipal recipient;
  54     final private byte[] message;
  55 
  56     private boolean destroyed = false;
  57 
  58     /**
  59      * Constructs a {@code KerberosCredMessage} object.
  60      * <p>
  61      * The contents of the {@code message} argument are copied; subsequent
  62      * modification of the byte array does not affect the newly created object.
  63      *
  64      * @param sender the sender of the message
  65      * @param recipient the recipient of the message
  66      * @param message the DER encoded KRB_CRED message
  67      * @throws NullPointerException if any of sender, recipient
  68      *                              or message is null




  28 import javax.security.auth.Destroyable;
  29 import java.util.Arrays;
  30 import java.util.Base64;
  31 import java.util.Objects;
  32 
  33 /**
  34  * This class encapsulates a Kerberos 5 KRB_CRED message which can be used to
  35  * send Kerberos credentials from one principal to another.<p>
  36  *
  37  * A KRB_CRED message is defined in Section 5.8.1 of the Kerberos Protocol
  38  * Specification (<a href=http://www.ietf.org/rfc/rfc4120.txt>RFC 4120</a>) as:
  39  * <pre>
  40  *    KRB-CRED        ::= [APPLICATION 22] SEQUENCE {
  41  *            pvno            [0] INTEGER (5),
  42  *            msg-type        [1] INTEGER (22),
  43  *            tickets         [2] SEQUENCE OF Ticket,
  44  *            enc-part        [3] EncryptedData -- EncKrbCredPart
  45  *    }
  46  * </pre>
  47  *
  48  * @since 9
  49  */
  50 public final class KerberosCredMessage implements Destroyable {
  51 
  52     final private KerberosPrincipal sender;
  53     final private KerberosPrincipal recipient;
  54     final private byte[] message;
  55 
  56     private boolean destroyed = false;
  57 
  58     /**
  59      * Constructs a {@code KerberosCredMessage} object.
  60      * <p>
  61      * The contents of the {@code message} argument are copied; subsequent
  62      * modification of the byte array does not affect the newly created object.
  63      *
  64      * @param sender the sender of the message
  65      * @param recipient the recipient of the message
  66      * @param message the DER encoded KRB_CRED message
  67      * @throws NullPointerException if any of sender, recipient
  68      *                              or message is null


< prev index next >