< prev index next >

src/java.security.jgss/share/classes/sun/security/krb5/internal/KRBError.java

Print this page




  68  * METHOD-DATA     ::= SEQUENCE OF PA-DATA
  69  *
  70  * TYPED-DATA      ::= SEQUENCE SIZE (1..MAX) OF SEQUENCE {
  71  *         data-type       [0] Int32,
  72  *         data-value      [1] OCTET STRING OPTIONAL
  73  * }
  74  * }</pre>
  75  *
  76  * <p>
  77  * This definition reflects the Network Working Group RFC 4120
  78  * specification available at
  79  * <a href="http://www.ietf.org/rfc/rfc4120.txt">
  80  * http://www.ietf.org/rfc/rfc4120.txt</a>.
  81  */
  82 
  83 public class KRBError implements java.io.Serializable {
  84     static final long serialVersionUID = 3643809337475284503L;
  85 
  86     private int pvno;
  87     private int msgType;



  88     private KerberosTime cTime; //optional
  89     private Integer cuSec; //optional

  90     private KerberosTime sTime;
  91     private Integer suSec;
  92     private int errorCode;

  93     private Realm crealm; //optional

  94     private PrincipalName cname; //optional

  95     private PrincipalName sname;
  96     private String eText; //optional
  97     private byte[] eData; //optional

  98     private Checksum eCksum; //optional
  99 

 100     private PAData[] pa;    // PA-DATA in eData
 101 
 102     private static boolean DEBUG = Krb5.DEBUG;
 103 
 104     private void readObject(ObjectInputStream is)
 105             throws IOException, ClassNotFoundException {
 106         try {
 107             init(new DerValue((byte[])is.readObject()));
 108             parseEData(eData);
 109         } catch (Exception e) {
 110             throw new IOException(e);
 111         }
 112     }
 113 
 114     private void writeObject(ObjectOutputStream os)
 115             throws IOException {
 116         try {
 117             os.writeObject(asn1Encode());
 118         } catch (Exception e) {
 119             throw new IOException(e);




  68  * METHOD-DATA     ::= SEQUENCE OF PA-DATA
  69  *
  70  * TYPED-DATA      ::= SEQUENCE SIZE (1..MAX) OF SEQUENCE {
  71  *         data-type       [0] Int32,
  72  *         data-value      [1] OCTET STRING OPTIONAL
  73  * }
  74  * }</pre>
  75  *
  76  * <p>
  77  * This definition reflects the Network Working Group RFC 4120
  78  * specification available at
  79  * <a href="http://www.ietf.org/rfc/rfc4120.txt">
  80  * http://www.ietf.org/rfc/rfc4120.txt</a>.
  81  */
  82 
  83 public class KRBError implements java.io.Serializable {
  84     static final long serialVersionUID = 3643809337475284503L;
  85 
  86     private int pvno;
  87     private int msgType;
  88     // The instance fields not statically typed as Serializable are
  89     // asn1 encoded and written by the writeObject method.
  90     @SuppressWarnings("serial") // Not statically typed as Serializable
  91     private KerberosTime cTime; //optional
  92     private Integer cuSec; //optional
  93     @SuppressWarnings("serial") // Not statically typed as Serializable
  94     private KerberosTime sTime;
  95     private Integer suSec;
  96     private int errorCode;
  97     @SuppressWarnings("serial") // Not statically typed as Serializable
  98     private Realm crealm; //optional
  99     @SuppressWarnings("serial") // Not statically typed as Serializable
 100     private PrincipalName cname; //optional
 101     @SuppressWarnings("serial") // Not statically typed as Serializable
 102     private PrincipalName sname;
 103     private String eText; //optional
 104     private byte[] eData; //optional
 105     @SuppressWarnings("serial") // Not statically typed as Serializable
 106     private Checksum eCksum; //optional
 107 
 108     @SuppressWarnings("serial") // Not statically typed as Serializable
 109     private PAData[] pa;    // PA-DATA in eData
 110 
 111     private static boolean DEBUG = Krb5.DEBUG;
 112 
 113     private void readObject(ObjectInputStream is)
 114             throws IOException, ClassNotFoundException {
 115         try {
 116             init(new DerValue((byte[])is.readObject()));
 117             parseEData(eData);
 118         } catch (Exception e) {
 119             throw new IOException(e);
 120         }
 121     }
 122 
 123     private void writeObject(ObjectOutputStream os)
 124             throws IOException {
 125         try {
 126             os.writeObject(asn1Encode());
 127         } catch (Exception e) {
 128             throw new IOException(e);


< prev index next >