Java Code Examples for sun.security.krb5.Realm#parse()
The following examples show how to use
sun.security.krb5.Realm#parse() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: dragonwell8_jdk File: Ticket.java License: GNU General Public License v2.0 | 6 votes |
/** * Initializes a Ticket object. * @param encoding a single DER-encoded value. * @exception Asn1Exception if an error occurs while decoding an ASN1 encoded data. * @exception IOException if an I/O error occurs while reading encoded data. * @exception KrbApErrException if the value read from the DER-encoded data stream does not match the pre-defined value. * @exception RealmException if an error occurs while parsing a Realm object. */ private void init(DerValue encoding) throws Asn1Exception, RealmException, KrbApErrException, IOException { DerValue der; DerValue subDer; if (((encoding.getTag() & (byte)0x1F) != Krb5.KRB_TKT) || (encoding.isApplication() != true) || (encoding.isConstructed() != true)) throw new Asn1Exception(Krb5.ASN1_BAD_ID); der = encoding.getData().getDerValue(); if (der.getTag() != DerValue.tag_Sequence) throw new Asn1Exception(Krb5.ASN1_BAD_ID); subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) != (byte)0x00) throw new Asn1Exception(Krb5.ASN1_BAD_ID); tkt_vno = subDer.getData().getBigInteger().intValue(); if (tkt_vno != Krb5.TICKET_VNO) throw new KrbApErrException(Krb5.KRB_AP_ERR_BADVERSION); Realm srealm = Realm.parse(der.getData(), (byte)0x01, false); sname = PrincipalName.parse(der.getData(), (byte)0x02, false, srealm); encPart = EncryptedData.parse(der.getData(), (byte)0x03, false); if (der.getData().available() > 0) throw new Asn1Exception(Krb5.ASN1_BAD_ID); }
Example 2
Source Project: jdk8u-jdk File: Ticket.java License: GNU General Public License v2.0 | 6 votes |
/** * Initializes a Ticket object. * @param encoding a single DER-encoded value. * @exception Asn1Exception if an error occurs while decoding an ASN1 encoded data. * @exception IOException if an I/O error occurs while reading encoded data. * @exception KrbApErrException if the value read from the DER-encoded data stream does not match the pre-defined value. * @exception RealmException if an error occurs while parsing a Realm object. */ private void init(DerValue encoding) throws Asn1Exception, RealmException, KrbApErrException, IOException { DerValue der; DerValue subDer; if (((encoding.getTag() & (byte)0x1F) != Krb5.KRB_TKT) || (encoding.isApplication() != true) || (encoding.isConstructed() != true)) throw new Asn1Exception(Krb5.ASN1_BAD_ID); der = encoding.getData().getDerValue(); if (der.getTag() != DerValue.tag_Sequence) throw new Asn1Exception(Krb5.ASN1_BAD_ID); subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) != (byte)0x00) throw new Asn1Exception(Krb5.ASN1_BAD_ID); tkt_vno = subDer.getData().getBigInteger().intValue(); if (tkt_vno != Krb5.TICKET_VNO) throw new KrbApErrException(Krb5.KRB_AP_ERR_BADVERSION); Realm srealm = Realm.parse(der.getData(), (byte)0x01, false); sname = PrincipalName.parse(der.getData(), (byte)0x02, false, srealm); encPart = EncryptedData.parse(der.getData(), (byte)0x03, false); if (der.getData().available() > 0) throw new Asn1Exception(Krb5.ASN1_BAD_ID); }
Example 3
Source Project: jdk8u60 File: Ticket.java License: GNU General Public License v2.0 | 6 votes |
/** * Initializes a Ticket object. * @param encoding a single DER-encoded value. * @exception Asn1Exception if an error occurs while decoding an ASN1 encoded data. * @exception IOException if an I/O error occurs while reading encoded data. * @exception KrbApErrException if the value read from the DER-encoded data stream does not match the pre-defined value. * @exception RealmException if an error occurs while parsing a Realm object. */ private void init(DerValue encoding) throws Asn1Exception, RealmException, KrbApErrException, IOException { DerValue der; DerValue subDer; if (((encoding.getTag() & (byte)0x1F) != Krb5.KRB_TKT) || (encoding.isApplication() != true) || (encoding.isConstructed() != true)) throw new Asn1Exception(Krb5.ASN1_BAD_ID); der = encoding.getData().getDerValue(); if (der.getTag() != DerValue.tag_Sequence) throw new Asn1Exception(Krb5.ASN1_BAD_ID); subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) != (byte)0x00) throw new Asn1Exception(Krb5.ASN1_BAD_ID); tkt_vno = subDer.getData().getBigInteger().intValue(); if (tkt_vno != Krb5.TICKET_VNO) throw new KrbApErrException(Krb5.KRB_AP_ERR_BADVERSION); Realm srealm = Realm.parse(der.getData(), (byte)0x01, false); sname = PrincipalName.parse(der.getData(), (byte)0x02, false, srealm); encPart = EncryptedData.parse(der.getData(), (byte)0x03, false); if (der.getData().available() > 0) throw new Asn1Exception(Krb5.ASN1_BAD_ID); }
Example 4
Source Project: openjdk-jdk8u File: Ticket.java License: GNU General Public License v2.0 | 6 votes |
/** * Initializes a Ticket object. * @param encoding a single DER-encoded value. * @exception Asn1Exception if an error occurs while decoding an ASN1 encoded data. * @exception IOException if an I/O error occurs while reading encoded data. * @exception KrbApErrException if the value read from the DER-encoded data stream does not match the pre-defined value. * @exception RealmException if an error occurs while parsing a Realm object. */ private void init(DerValue encoding) throws Asn1Exception, RealmException, KrbApErrException, IOException { DerValue der; DerValue subDer; if (((encoding.getTag() & (byte)0x1F) != Krb5.KRB_TKT) || (encoding.isApplication() != true) || (encoding.isConstructed() != true)) throw new Asn1Exception(Krb5.ASN1_BAD_ID); der = encoding.getData().getDerValue(); if (der.getTag() != DerValue.tag_Sequence) throw new Asn1Exception(Krb5.ASN1_BAD_ID); subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) != (byte)0x00) throw new Asn1Exception(Krb5.ASN1_BAD_ID); tkt_vno = subDer.getData().getBigInteger().intValue(); if (tkt_vno != Krb5.TICKET_VNO) throw new KrbApErrException(Krb5.KRB_AP_ERR_BADVERSION); Realm srealm = Realm.parse(der.getData(), (byte)0x01, false); sname = PrincipalName.parse(der.getData(), (byte)0x02, false, srealm); encPart = EncryptedData.parse(der.getData(), (byte)0x03, false); if (der.getData().available() > 0) throw new Asn1Exception(Krb5.ASN1_BAD_ID); }
Example 5
Source Project: jdk8u-dev-jdk File: Ticket.java License: GNU General Public License v2.0 | 6 votes |
/** * Initializes a Ticket object. * @param encoding a single DER-encoded value. * @exception Asn1Exception if an error occurs while decoding an ASN1 encoded data. * @exception IOException if an I/O error occurs while reading encoded data. * @exception KrbApErrException if the value read from the DER-encoded data stream does not match the pre-defined value. * @exception RealmException if an error occurs while parsing a Realm object. */ private void init(DerValue encoding) throws Asn1Exception, RealmException, KrbApErrException, IOException { DerValue der; DerValue subDer; if (((encoding.getTag() & (byte)0x1F) != Krb5.KRB_TKT) || (encoding.isApplication() != true) || (encoding.isConstructed() != true)) throw new Asn1Exception(Krb5.ASN1_BAD_ID); der = encoding.getData().getDerValue(); if (der.getTag() != DerValue.tag_Sequence) throw new Asn1Exception(Krb5.ASN1_BAD_ID); subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) != (byte)0x00) throw new Asn1Exception(Krb5.ASN1_BAD_ID); tkt_vno = subDer.getData().getBigInteger().intValue(); if (tkt_vno != Krb5.TICKET_VNO) throw new KrbApErrException(Krb5.KRB_AP_ERR_BADVERSION); Realm srealm = Realm.parse(der.getData(), (byte)0x01, false); sname = PrincipalName.parse(der.getData(), (byte)0x02, false, srealm); encPart = EncryptedData.parse(der.getData(), (byte)0x03, false); if (der.getData().available() > 0) throw new Asn1Exception(Krb5.ASN1_BAD_ID); }
Example 6
Source Project: jdk8u_jdk File: Ticket.java License: GNU General Public License v2.0 | 6 votes |
/** * Initializes a Ticket object. * @param encoding a single DER-encoded value. * @exception Asn1Exception if an error occurs while decoding an ASN1 encoded data. * @exception IOException if an I/O error occurs while reading encoded data. * @exception KrbApErrException if the value read from the DER-encoded data stream does not match the pre-defined value. * @exception RealmException if an error occurs while parsing a Realm object. */ private void init(DerValue encoding) throws Asn1Exception, RealmException, KrbApErrException, IOException { DerValue der; DerValue subDer; if (((encoding.getTag() & (byte)0x1F) != Krb5.KRB_TKT) || (encoding.isApplication() != true) || (encoding.isConstructed() != true)) throw new Asn1Exception(Krb5.ASN1_BAD_ID); der = encoding.getData().getDerValue(); if (der.getTag() != DerValue.tag_Sequence) throw new Asn1Exception(Krb5.ASN1_BAD_ID); subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) != (byte)0x00) throw new Asn1Exception(Krb5.ASN1_BAD_ID); tkt_vno = subDer.getData().getBigInteger().intValue(); if (tkt_vno != Krb5.TICKET_VNO) throw new KrbApErrException(Krb5.KRB_AP_ERR_BADVERSION); Realm srealm = Realm.parse(der.getData(), (byte)0x01, false); sname = PrincipalName.parse(der.getData(), (byte)0x02, false, srealm); encPart = EncryptedData.parse(der.getData(), (byte)0x03, false); if (der.getData().available() > 0) throw new Asn1Exception(Krb5.ASN1_BAD_ID); }
Example 7
Source Project: jdk8u-jdk File: Ticket.java License: GNU General Public License v2.0 | 6 votes |
/** * Initializes a Ticket object. * @param encoding a single DER-encoded value. * @exception Asn1Exception if an error occurs while decoding an ASN1 encoded data. * @exception IOException if an I/O error occurs while reading encoded data. * @exception KrbApErrException if the value read from the DER-encoded data stream does not match the pre-defined value. * @exception RealmException if an error occurs while parsing a Realm object. */ private void init(DerValue encoding) throws Asn1Exception, RealmException, KrbApErrException, IOException { DerValue der; DerValue subDer; if (((encoding.getTag() & (byte)0x1F) != Krb5.KRB_TKT) || (encoding.isApplication() != true) || (encoding.isConstructed() != true)) throw new Asn1Exception(Krb5.ASN1_BAD_ID); der = encoding.getData().getDerValue(); if (der.getTag() != DerValue.tag_Sequence) throw new Asn1Exception(Krb5.ASN1_BAD_ID); subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) != (byte)0x00) throw new Asn1Exception(Krb5.ASN1_BAD_ID); tkt_vno = subDer.getData().getBigInteger().intValue(); if (tkt_vno != Krb5.TICKET_VNO) throw new KrbApErrException(Krb5.KRB_AP_ERR_BADVERSION); Realm srealm = Realm.parse(der.getData(), (byte)0x01, false); sname = PrincipalName.parse(der.getData(), (byte)0x02, false, srealm); encPart = EncryptedData.parse(der.getData(), (byte)0x03, false); if (der.getData().available() > 0) throw new Asn1Exception(Krb5.ASN1_BAD_ID); }
Example 8
Source Project: hottub File: Ticket.java License: GNU General Public License v2.0 | 6 votes |
/** * Initializes a Ticket object. * @param encoding a single DER-encoded value. * @exception Asn1Exception if an error occurs while decoding an ASN1 encoded data. * @exception IOException if an I/O error occurs while reading encoded data. * @exception KrbApErrException if the value read from the DER-encoded data stream does not match the pre-defined value. * @exception RealmException if an error occurs while parsing a Realm object. */ private void init(DerValue encoding) throws Asn1Exception, RealmException, KrbApErrException, IOException { DerValue der; DerValue subDer; if (((encoding.getTag() & (byte)0x1F) != Krb5.KRB_TKT) || (encoding.isApplication() != true) || (encoding.isConstructed() != true)) throw new Asn1Exception(Krb5.ASN1_BAD_ID); der = encoding.getData().getDerValue(); if (der.getTag() != DerValue.tag_Sequence) throw new Asn1Exception(Krb5.ASN1_BAD_ID); subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) != (byte)0x00) throw new Asn1Exception(Krb5.ASN1_BAD_ID); tkt_vno = subDer.getData().getBigInteger().intValue(); if (tkt_vno != Krb5.TICKET_VNO) throw new KrbApErrException(Krb5.KRB_AP_ERR_BADVERSION); Realm srealm = Realm.parse(der.getData(), (byte)0x01, false); sname = PrincipalName.parse(der.getData(), (byte)0x02, false, srealm); encPart = EncryptedData.parse(der.getData(), (byte)0x03, false); if (der.getData().available() > 0) throw new Asn1Exception(Krb5.ASN1_BAD_ID); }
Example 9
Source Project: openjdk-8-source File: Ticket.java License: GNU General Public License v2.0 | 6 votes |
/** * Initializes a Ticket object. * @param encoding a single DER-encoded value. * @exception Asn1Exception if an error occurs while decoding an ASN1 encoded data. * @exception IOException if an I/O error occurs while reading encoded data. * @exception KrbApErrException if the value read from the DER-encoded data stream does not match the pre-defined value. * @exception RealmException if an error occurs while parsing a Realm object. */ private void init(DerValue encoding) throws Asn1Exception, RealmException, KrbApErrException, IOException { DerValue der; DerValue subDer; if (((encoding.getTag() & (byte)0x1F) != Krb5.KRB_TKT) || (encoding.isApplication() != true) || (encoding.isConstructed() != true)) throw new Asn1Exception(Krb5.ASN1_BAD_ID); der = encoding.getData().getDerValue(); if (der.getTag() != DerValue.tag_Sequence) throw new Asn1Exception(Krb5.ASN1_BAD_ID); subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) != (byte)0x00) throw new Asn1Exception(Krb5.ASN1_BAD_ID); tkt_vno = subDer.getData().getBigInteger().intValue(); if (tkt_vno != Krb5.TICKET_VNO) throw new KrbApErrException(Krb5.KRB_AP_ERR_BADVERSION); Realm srealm = Realm.parse(der.getData(), (byte)0x01, false); sname = PrincipalName.parse(der.getData(), (byte)0x02, false, srealm); encPart = EncryptedData.parse(der.getData(), (byte)0x03, false); if (der.getData().available() > 0) throw new Asn1Exception(Krb5.ASN1_BAD_ID); }
Example 10
Source Project: openjdk-8 File: Ticket.java License: GNU General Public License v2.0 | 6 votes |
/** * Initializes a Ticket object. * @param encoding a single DER-encoded value. * @exception Asn1Exception if an error occurs while decoding an ASN1 encoded data. * @exception IOException if an I/O error occurs while reading encoded data. * @exception KrbApErrException if the value read from the DER-encoded data stream does not match the pre-defined value. * @exception RealmException if an error occurs while parsing a Realm object. */ private void init(DerValue encoding) throws Asn1Exception, RealmException, KrbApErrException, IOException { DerValue der; DerValue subDer; if (((encoding.getTag() & (byte)0x1F) != Krb5.KRB_TKT) || (encoding.isApplication() != true) || (encoding.isConstructed() != true)) throw new Asn1Exception(Krb5.ASN1_BAD_ID); der = encoding.getData().getDerValue(); if (der.getTag() != DerValue.tag_Sequence) throw new Asn1Exception(Krb5.ASN1_BAD_ID); subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) != (byte)0x00) throw new Asn1Exception(Krb5.ASN1_BAD_ID); tkt_vno = subDer.getData().getBigInteger().intValue(); if (tkt_vno != Krb5.TICKET_VNO) throw new KrbApErrException(Krb5.KRB_AP_ERR_BADVERSION); Realm srealm = Realm.parse(der.getData(), (byte)0x01, false); sname = PrincipalName.parse(der.getData(), (byte)0x02, false, srealm); encPart = EncryptedData.parse(der.getData(), (byte)0x03, false); if (der.getData().available() > 0) throw new Asn1Exception(Krb5.ASN1_BAD_ID); }
Example 11
Source Project: dragonwell8_jdk File: KRBError.java License: GNU General Public License v2.0 | 4 votes |
/** * Initializes a KRBError object. * @param encoding a DER-encoded data. * @exception Asn1Exception if an error occurs while decoding an ASN1 encoded data. * @exception IOException if an I/O error occurs while reading encoded data. * @exception KrbApErrException if the value read from the DER-encoded data * stream does not match the pre-defined value. * @exception RealmException if an error occurs while parsing a Realm object. */ private void init(DerValue encoding) throws Asn1Exception, RealmException, KrbApErrException, IOException { DerValue der, subDer; if (((encoding.getTag() & (byte)0x1F) != (byte)0x1E) || (encoding.isApplication() != true) || (encoding.isConstructed() != true)) { throw new Asn1Exception(Krb5.ASN1_BAD_ID); } der = encoding.getData().getDerValue(); if (der.getTag() != DerValue.tag_Sequence) { throw new Asn1Exception(Krb5.ASN1_BAD_ID); } subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) == (byte)0x00) { pvno = subDer.getData().getBigInteger().intValue(); if (pvno != Krb5.PVNO) throw new KrbApErrException(Krb5.KRB_AP_ERR_BADVERSION); } else { throw new Asn1Exception(Krb5.ASN1_BAD_ID); } subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) == (byte)0x01) { msgType = subDer.getData().getBigInteger().intValue(); if (msgType != Krb5.KRB_ERROR) { throw new KrbApErrException(Krb5.KRB_AP_ERR_MSG_TYPE); } } else { throw new Asn1Exception(Krb5.ASN1_BAD_ID); } cTime = KerberosTime.parse(der.getData(), (byte)0x02, true); if ((der.getData().peekByte() & 0x1F) == 0x03) { subDer = der.getData().getDerValue(); cuSec = new Integer(subDer.getData().getBigInteger().intValue()); } else cuSec = null; sTime = KerberosTime.parse(der.getData(), (byte)0x04, false); subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) == (byte)0x05) { suSec = new Integer (subDer.getData().getBigInteger().intValue()); } else throw new Asn1Exception(Krb5.ASN1_BAD_ID); subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) == (byte)0x06) { errorCode = subDer.getData().getBigInteger().intValue(); } else throw new Asn1Exception(Krb5.ASN1_BAD_ID); crealm = Realm.parse(der.getData(), (byte)0x07, true); cname = PrincipalName.parse(der.getData(), (byte)0x08, true, crealm); Realm realm = Realm.parse(der.getData(), (byte)0x09, false); sname = PrincipalName.parse(der.getData(), (byte)0x0A, false, realm); eText = null; eData = null; eCksum = null; if (der.getData().available() >0) { if ((der.getData().peekByte() & 0x1F) == 0x0B) { subDer = der.getData().getDerValue(); eText = new KerberosString(subDer.getData().getDerValue()) .toString(); } } if (der.getData().available() >0) { if ((der.getData().peekByte() & 0x1F) == 0x0C) { subDer = der.getData().getDerValue(); eData = subDer.getData().getOctetString(); } } if (der.getData().available() >0) { eCksum = Checksum.parse(der.getData(), (byte)0x0D, true); } if (der.getData().available() >0) throw new Asn1Exception(Krb5.ASN1_BAD_ID); }
Example 12
Source Project: TencentKona-8 File: KRBError.java License: GNU General Public License v2.0 | 4 votes |
/** * Initializes a KRBError object. * @param encoding a DER-encoded data. * @exception Asn1Exception if an error occurs while decoding an ASN1 encoded data. * @exception IOException if an I/O error occurs while reading encoded data. * @exception KrbApErrException if the value read from the DER-encoded data * stream does not match the pre-defined value. * @exception RealmException if an error occurs while parsing a Realm object. */ private void init(DerValue encoding) throws Asn1Exception, RealmException, KrbApErrException, IOException { DerValue der, subDer; if (((encoding.getTag() & (byte)0x1F) != (byte)0x1E) || (encoding.isApplication() != true) || (encoding.isConstructed() != true)) { throw new Asn1Exception(Krb5.ASN1_BAD_ID); } der = encoding.getData().getDerValue(); if (der.getTag() != DerValue.tag_Sequence) { throw new Asn1Exception(Krb5.ASN1_BAD_ID); } subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) == (byte)0x00) { pvno = subDer.getData().getBigInteger().intValue(); if (pvno != Krb5.PVNO) throw new KrbApErrException(Krb5.KRB_AP_ERR_BADVERSION); } else { throw new Asn1Exception(Krb5.ASN1_BAD_ID); } subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) == (byte)0x01) { msgType = subDer.getData().getBigInteger().intValue(); if (msgType != Krb5.KRB_ERROR) { throw new KrbApErrException(Krb5.KRB_AP_ERR_MSG_TYPE); } } else { throw new Asn1Exception(Krb5.ASN1_BAD_ID); } cTime = KerberosTime.parse(der.getData(), (byte)0x02, true); if ((der.getData().peekByte() & 0x1F) == 0x03) { subDer = der.getData().getDerValue(); cuSec = new Integer(subDer.getData().getBigInteger().intValue()); } else cuSec = null; sTime = KerberosTime.parse(der.getData(), (byte)0x04, false); subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) == (byte)0x05) { suSec = new Integer (subDer.getData().getBigInteger().intValue()); } else throw new Asn1Exception(Krb5.ASN1_BAD_ID); subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) == (byte)0x06) { errorCode = subDer.getData().getBigInteger().intValue(); } else throw new Asn1Exception(Krb5.ASN1_BAD_ID); crealm = Realm.parse(der.getData(), (byte)0x07, true); cname = PrincipalName.parse(der.getData(), (byte)0x08, true, crealm); Realm realm = Realm.parse(der.getData(), (byte)0x09, false); sname = PrincipalName.parse(der.getData(), (byte)0x0A, false, realm); eText = null; eData = null; eCksum = null; if (der.getData().available() >0) { if ((der.getData().peekByte() & 0x1F) == 0x0B) { subDer = der.getData().getDerValue(); eText = new KerberosString(subDer.getData().getDerValue()) .toString(); } } if (der.getData().available() >0) { if ((der.getData().peekByte() & 0x1F) == 0x0C) { subDer = der.getData().getDerValue(); eData = subDer.getData().getOctetString(); } } if (der.getData().available() >0) { eCksum = Checksum.parse(der.getData(), (byte)0x0D, true); } if (der.getData().available() >0) throw new Asn1Exception(Krb5.ASN1_BAD_ID); }
Example 13
Source Project: jdk8u60 File: KRBError.java License: GNU General Public License v2.0 | 4 votes |
/** * Initializes a KRBError object. * @param encoding a DER-encoded data. * @exception Asn1Exception if an error occurs while decoding an ASN1 encoded data. * @exception IOException if an I/O error occurs while reading encoded data. * @exception KrbApErrException if the value read from the DER-encoded data * stream does not match the pre-defined value. * @exception RealmException if an error occurs while parsing a Realm object. */ private void init(DerValue encoding) throws Asn1Exception, RealmException, KrbApErrException, IOException { DerValue der, subDer; if (((encoding.getTag() & (byte)0x1F) != (byte)0x1E) || (encoding.isApplication() != true) || (encoding.isConstructed() != true)) { throw new Asn1Exception(Krb5.ASN1_BAD_ID); } der = encoding.getData().getDerValue(); if (der.getTag() != DerValue.tag_Sequence) { throw new Asn1Exception(Krb5.ASN1_BAD_ID); } subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) == (byte)0x00) { pvno = subDer.getData().getBigInteger().intValue(); if (pvno != Krb5.PVNO) throw new KrbApErrException(Krb5.KRB_AP_ERR_BADVERSION); } else { throw new Asn1Exception(Krb5.ASN1_BAD_ID); } subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) == (byte)0x01) { msgType = subDer.getData().getBigInteger().intValue(); if (msgType != Krb5.KRB_ERROR) { throw new KrbApErrException(Krb5.KRB_AP_ERR_MSG_TYPE); } } else { throw new Asn1Exception(Krb5.ASN1_BAD_ID); } cTime = KerberosTime.parse(der.getData(), (byte)0x02, true); if ((der.getData().peekByte() & 0x1F) == 0x03) { subDer = der.getData().getDerValue(); cuSec = new Integer(subDer.getData().getBigInteger().intValue()); } else cuSec = null; sTime = KerberosTime.parse(der.getData(), (byte)0x04, false); subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) == (byte)0x05) { suSec = new Integer (subDer.getData().getBigInteger().intValue()); } else throw new Asn1Exception(Krb5.ASN1_BAD_ID); subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) == (byte)0x06) { errorCode = subDer.getData().getBigInteger().intValue(); } else throw new Asn1Exception(Krb5.ASN1_BAD_ID); Realm crealm = Realm.parse(der.getData(), (byte)0x07, true); cname = PrincipalName.parse(der.getData(), (byte)0x08, true, crealm); Realm realm = Realm.parse(der.getData(), (byte)0x09, false); sname = PrincipalName.parse(der.getData(), (byte)0x0A, false, realm); eText = null; eData = null; eCksum = null; if (der.getData().available() >0) { if ((der.getData().peekByte() & 0x1F) == 0x0B) { subDer = der.getData().getDerValue(); eText = new KerberosString(subDer.getData().getDerValue()) .toString(); } } if (der.getData().available() >0) { if ((der.getData().peekByte() & 0x1F) == 0x0C) { subDer = der.getData().getDerValue(); eData = subDer.getData().getOctetString(); } } if (der.getData().available() >0) { eCksum = Checksum.parse(der.getData(), (byte)0x0D, true); } if (der.getData().available() >0) throw new Asn1Exception(Krb5.ASN1_BAD_ID); }
Example 14
Source Project: openjdk-jdk8u File: KRBError.java License: GNU General Public License v2.0 | 4 votes |
/** * Initializes a KRBError object. * @param encoding a DER-encoded data. * @exception Asn1Exception if an error occurs while decoding an ASN1 encoded data. * @exception IOException if an I/O error occurs while reading encoded data. * @exception KrbApErrException if the value read from the DER-encoded data * stream does not match the pre-defined value. * @exception RealmException if an error occurs while parsing a Realm object. */ private void init(DerValue encoding) throws Asn1Exception, RealmException, KrbApErrException, IOException { DerValue der, subDer; if (((encoding.getTag() & (byte)0x1F) != (byte)0x1E) || (encoding.isApplication() != true) || (encoding.isConstructed() != true)) { throw new Asn1Exception(Krb5.ASN1_BAD_ID); } der = encoding.getData().getDerValue(); if (der.getTag() != DerValue.tag_Sequence) { throw new Asn1Exception(Krb5.ASN1_BAD_ID); } subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) == (byte)0x00) { pvno = subDer.getData().getBigInteger().intValue(); if (pvno != Krb5.PVNO) throw new KrbApErrException(Krb5.KRB_AP_ERR_BADVERSION); } else { throw new Asn1Exception(Krb5.ASN1_BAD_ID); } subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) == (byte)0x01) { msgType = subDer.getData().getBigInteger().intValue(); if (msgType != Krb5.KRB_ERROR) { throw new KrbApErrException(Krb5.KRB_AP_ERR_MSG_TYPE); } } else { throw new Asn1Exception(Krb5.ASN1_BAD_ID); } cTime = KerberosTime.parse(der.getData(), (byte)0x02, true); if ((der.getData().peekByte() & 0x1F) == 0x03) { subDer = der.getData().getDerValue(); cuSec = new Integer(subDer.getData().getBigInteger().intValue()); } else cuSec = null; sTime = KerberosTime.parse(der.getData(), (byte)0x04, false); subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) == (byte)0x05) { suSec = new Integer (subDer.getData().getBigInteger().intValue()); } else throw new Asn1Exception(Krb5.ASN1_BAD_ID); subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) == (byte)0x06) { errorCode = subDer.getData().getBigInteger().intValue(); } else throw new Asn1Exception(Krb5.ASN1_BAD_ID); crealm = Realm.parse(der.getData(), (byte)0x07, true); cname = PrincipalName.parse(der.getData(), (byte)0x08, true, crealm); Realm realm = Realm.parse(der.getData(), (byte)0x09, false); sname = PrincipalName.parse(der.getData(), (byte)0x0A, false, realm); eText = null; eData = null; eCksum = null; if (der.getData().available() >0) { if ((der.getData().peekByte() & 0x1F) == 0x0B) { subDer = der.getData().getDerValue(); eText = new KerberosString(subDer.getData().getDerValue()) .toString(); } } if (der.getData().available() >0) { if ((der.getData().peekByte() & 0x1F) == 0x0C) { subDer = der.getData().getDerValue(); eData = subDer.getData().getOctetString(); } } if (der.getData().available() >0) { eCksum = Checksum.parse(der.getData(), (byte)0x0D, true); } if (der.getData().available() >0) throw new Asn1Exception(Krb5.ASN1_BAD_ID); }
Example 15
Source Project: openjdk-jdk9 File: KRBError.java License: GNU General Public License v2.0 | 4 votes |
/** * Initializes a KRBError object. * @param encoding a DER-encoded data. * @exception Asn1Exception if an error occurs while decoding an ASN1 encoded data. * @exception IOException if an I/O error occurs while reading encoded data. * @exception KrbApErrException if the value read from the DER-encoded data * stream does not match the pre-defined value. * @exception RealmException if an error occurs while parsing a Realm object. */ private void init(DerValue encoding) throws Asn1Exception, RealmException, KrbApErrException, IOException { DerValue der, subDer; if (((encoding.getTag() & (byte)0x1F) != (byte)0x1E) || (encoding.isApplication() != true) || (encoding.isConstructed() != true)) { throw new Asn1Exception(Krb5.ASN1_BAD_ID); } der = encoding.getData().getDerValue(); if (der.getTag() != DerValue.tag_Sequence) { throw new Asn1Exception(Krb5.ASN1_BAD_ID); } subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) == (byte)0x00) { pvno = subDer.getData().getBigInteger().intValue(); if (pvno != Krb5.PVNO) throw new KrbApErrException(Krb5.KRB_AP_ERR_BADVERSION); } else { throw new Asn1Exception(Krb5.ASN1_BAD_ID); } subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) == (byte)0x01) { msgType = subDer.getData().getBigInteger().intValue(); if (msgType != Krb5.KRB_ERROR) { throw new KrbApErrException(Krb5.KRB_AP_ERR_MSG_TYPE); } } else { throw new Asn1Exception(Krb5.ASN1_BAD_ID); } cTime = KerberosTime.parse(der.getData(), (byte)0x02, true); if ((der.getData().peekByte() & 0x1F) == 0x03) { subDer = der.getData().getDerValue(); cuSec = subDer.getData().getBigInteger().intValue(); } else cuSec = null; sTime = KerberosTime.parse(der.getData(), (byte)0x04, false); subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) == (byte)0x05) { suSec = subDer.getData().getBigInteger().intValue(); } else throw new Asn1Exception(Krb5.ASN1_BAD_ID); subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) == (byte)0x06) { errorCode = subDer.getData().getBigInteger().intValue(); } else throw new Asn1Exception(Krb5.ASN1_BAD_ID); Realm crealm = Realm.parse(der.getData(), (byte)0x07, true); cname = PrincipalName.parse(der.getData(), (byte)0x08, true, crealm); Realm realm = Realm.parse(der.getData(), (byte)0x09, false); sname = PrincipalName.parse(der.getData(), (byte)0x0A, false, realm); eText = null; eData = null; eCksum = null; if (der.getData().available() >0) { if ((der.getData().peekByte() & 0x1F) == 0x0B) { subDer = der.getData().getDerValue(); eText = new KerberosString(subDer.getData().getDerValue()) .toString(); } } if (der.getData().available() >0) { if ((der.getData().peekByte() & 0x1F) == 0x0C) { subDer = der.getData().getDerValue(); eData = subDer.getData().getOctetString(); } } if (der.getData().available() >0) { eCksum = Checksum.parse(der.getData(), (byte)0x0D, true); } if (der.getData().available() >0) throw new Asn1Exception(Krb5.ASN1_BAD_ID); }
Example 16
Source Project: jdk8u-jdk File: KRBError.java License: GNU General Public License v2.0 | 4 votes |
/** * Initializes a KRBError object. * @param encoding a DER-encoded data. * @exception Asn1Exception if an error occurs while decoding an ASN1 encoded data. * @exception IOException if an I/O error occurs while reading encoded data. * @exception KrbApErrException if the value read from the DER-encoded data * stream does not match the pre-defined value. * @exception RealmException if an error occurs while parsing a Realm object. */ private void init(DerValue encoding) throws Asn1Exception, RealmException, KrbApErrException, IOException { DerValue der, subDer; if (((encoding.getTag() & (byte)0x1F) != (byte)0x1E) || (encoding.isApplication() != true) || (encoding.isConstructed() != true)) { throw new Asn1Exception(Krb5.ASN1_BAD_ID); } der = encoding.getData().getDerValue(); if (der.getTag() != DerValue.tag_Sequence) { throw new Asn1Exception(Krb5.ASN1_BAD_ID); } subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) == (byte)0x00) { pvno = subDer.getData().getBigInteger().intValue(); if (pvno != Krb5.PVNO) throw new KrbApErrException(Krb5.KRB_AP_ERR_BADVERSION); } else { throw new Asn1Exception(Krb5.ASN1_BAD_ID); } subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) == (byte)0x01) { msgType = subDer.getData().getBigInteger().intValue(); if (msgType != Krb5.KRB_ERROR) { throw new KrbApErrException(Krb5.KRB_AP_ERR_MSG_TYPE); } } else { throw new Asn1Exception(Krb5.ASN1_BAD_ID); } cTime = KerberosTime.parse(der.getData(), (byte)0x02, true); if ((der.getData().peekByte() & 0x1F) == 0x03) { subDer = der.getData().getDerValue(); cuSec = new Integer(subDer.getData().getBigInteger().intValue()); } else cuSec = null; sTime = KerberosTime.parse(der.getData(), (byte)0x04, false); subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) == (byte)0x05) { suSec = new Integer (subDer.getData().getBigInteger().intValue()); } else throw new Asn1Exception(Krb5.ASN1_BAD_ID); subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) == (byte)0x06) { errorCode = subDer.getData().getBigInteger().intValue(); } else throw new Asn1Exception(Krb5.ASN1_BAD_ID); Realm crealm = Realm.parse(der.getData(), (byte)0x07, true); cname = PrincipalName.parse(der.getData(), (byte)0x08, true, crealm); Realm realm = Realm.parse(der.getData(), (byte)0x09, false); sname = PrincipalName.parse(der.getData(), (byte)0x0A, false, realm); eText = null; eData = null; eCksum = null; if (der.getData().available() >0) { if ((der.getData().peekByte() & 0x1F) == 0x0B) { subDer = der.getData().getDerValue(); eText = new KerberosString(subDer.getData().getDerValue()) .toString(); } } if (der.getData().available() >0) { if ((der.getData().peekByte() & 0x1F) == 0x0C) { subDer = der.getData().getDerValue(); eData = subDer.getData().getOctetString(); } } if (der.getData().available() >0) { eCksum = Checksum.parse(der.getData(), (byte)0x0D, true); } if (der.getData().available() >0) throw new Asn1Exception(Krb5.ASN1_BAD_ID); }
Example 17
Source Project: jdk8u-dev-jdk File: KRBError.java License: GNU General Public License v2.0 | 4 votes |
/** * Initializes a KRBError object. * @param encoding a DER-encoded data. * @exception Asn1Exception if an error occurs while decoding an ASN1 encoded data. * @exception IOException if an I/O error occurs while reading encoded data. * @exception KrbApErrException if the value read from the DER-encoded data * stream does not match the pre-defined value. * @exception RealmException if an error occurs while parsing a Realm object. */ private void init(DerValue encoding) throws Asn1Exception, RealmException, KrbApErrException, IOException { DerValue der, subDer; if (((encoding.getTag() & (byte)0x1F) != (byte)0x1E) || (encoding.isApplication() != true) || (encoding.isConstructed() != true)) { throw new Asn1Exception(Krb5.ASN1_BAD_ID); } der = encoding.getData().getDerValue(); if (der.getTag() != DerValue.tag_Sequence) { throw new Asn1Exception(Krb5.ASN1_BAD_ID); } subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) == (byte)0x00) { pvno = subDer.getData().getBigInteger().intValue(); if (pvno != Krb5.PVNO) throw new KrbApErrException(Krb5.KRB_AP_ERR_BADVERSION); } else { throw new Asn1Exception(Krb5.ASN1_BAD_ID); } subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) == (byte)0x01) { msgType = subDer.getData().getBigInteger().intValue(); if (msgType != Krb5.KRB_ERROR) { throw new KrbApErrException(Krb5.KRB_AP_ERR_MSG_TYPE); } } else { throw new Asn1Exception(Krb5.ASN1_BAD_ID); } cTime = KerberosTime.parse(der.getData(), (byte)0x02, true); if ((der.getData().peekByte() & 0x1F) == 0x03) { subDer = der.getData().getDerValue(); cuSec = new Integer(subDer.getData().getBigInteger().intValue()); } else cuSec = null; sTime = KerberosTime.parse(der.getData(), (byte)0x04, false); subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) == (byte)0x05) { suSec = new Integer (subDer.getData().getBigInteger().intValue()); } else throw new Asn1Exception(Krb5.ASN1_BAD_ID); subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) == (byte)0x06) { errorCode = subDer.getData().getBigInteger().intValue(); } else throw new Asn1Exception(Krb5.ASN1_BAD_ID); Realm crealm = Realm.parse(der.getData(), (byte)0x07, true); cname = PrincipalName.parse(der.getData(), (byte)0x08, true, crealm); Realm realm = Realm.parse(der.getData(), (byte)0x09, false); sname = PrincipalName.parse(der.getData(), (byte)0x0A, false, realm); eText = null; eData = null; eCksum = null; if (der.getData().available() >0) { if ((der.getData().peekByte() & 0x1F) == 0x0B) { subDer = der.getData().getDerValue(); eText = new KerberosString(subDer.getData().getDerValue()) .toString(); } } if (der.getData().available() >0) { if ((der.getData().peekByte() & 0x1F) == 0x0C) { subDer = der.getData().getDerValue(); eData = subDer.getData().getOctetString(); } } if (der.getData().available() >0) { eCksum = Checksum.parse(der.getData(), (byte)0x0D, true); } if (der.getData().available() >0) throw new Asn1Exception(Krb5.ASN1_BAD_ID); }
Example 18
Source Project: hottub File: KRBError.java License: GNU General Public License v2.0 | 4 votes |
/** * Initializes a KRBError object. * @param encoding a DER-encoded data. * @exception Asn1Exception if an error occurs while decoding an ASN1 encoded data. * @exception IOException if an I/O error occurs while reading encoded data. * @exception KrbApErrException if the value read from the DER-encoded data * stream does not match the pre-defined value. * @exception RealmException if an error occurs while parsing a Realm object. */ private void init(DerValue encoding) throws Asn1Exception, RealmException, KrbApErrException, IOException { DerValue der, subDer; if (((encoding.getTag() & (byte)0x1F) != (byte)0x1E) || (encoding.isApplication() != true) || (encoding.isConstructed() != true)) { throw new Asn1Exception(Krb5.ASN1_BAD_ID); } der = encoding.getData().getDerValue(); if (der.getTag() != DerValue.tag_Sequence) { throw new Asn1Exception(Krb5.ASN1_BAD_ID); } subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) == (byte)0x00) { pvno = subDer.getData().getBigInteger().intValue(); if (pvno != Krb5.PVNO) throw new KrbApErrException(Krb5.KRB_AP_ERR_BADVERSION); } else { throw new Asn1Exception(Krb5.ASN1_BAD_ID); } subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) == (byte)0x01) { msgType = subDer.getData().getBigInteger().intValue(); if (msgType != Krb5.KRB_ERROR) { throw new KrbApErrException(Krb5.KRB_AP_ERR_MSG_TYPE); } } else { throw new Asn1Exception(Krb5.ASN1_BAD_ID); } cTime = KerberosTime.parse(der.getData(), (byte)0x02, true); if ((der.getData().peekByte() & 0x1F) == 0x03) { subDer = der.getData().getDerValue(); cuSec = new Integer(subDer.getData().getBigInteger().intValue()); } else cuSec = null; sTime = KerberosTime.parse(der.getData(), (byte)0x04, false); subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) == (byte)0x05) { suSec = new Integer (subDer.getData().getBigInteger().intValue()); } else throw new Asn1Exception(Krb5.ASN1_BAD_ID); subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) == (byte)0x06) { errorCode = subDer.getData().getBigInteger().intValue(); } else throw new Asn1Exception(Krb5.ASN1_BAD_ID); Realm crealm = Realm.parse(der.getData(), (byte)0x07, true); cname = PrincipalName.parse(der.getData(), (byte)0x08, true, crealm); Realm realm = Realm.parse(der.getData(), (byte)0x09, false); sname = PrincipalName.parse(der.getData(), (byte)0x0A, false, realm); eText = null; eData = null; eCksum = null; if (der.getData().available() >0) { if ((der.getData().peekByte() & 0x1F) == 0x0B) { subDer = der.getData().getDerValue(); eText = new KerberosString(subDer.getData().getDerValue()) .toString(); } } if (der.getData().available() >0) { if ((der.getData().peekByte() & 0x1F) == 0x0C) { subDer = der.getData().getDerValue(); eData = subDer.getData().getOctetString(); } } if (der.getData().available() >0) { eCksum = Checksum.parse(der.getData(), (byte)0x0D, true); } if (der.getData().available() >0) throw new Asn1Exception(Krb5.ASN1_BAD_ID); }
Example 19
Source Project: openjdk-8-source File: KRBError.java License: GNU General Public License v2.0 | 4 votes |
/** * Initializes a KRBError object. * @param encoding a DER-encoded data. * @exception Asn1Exception if an error occurs while decoding an ASN1 encoded data. * @exception IOException if an I/O error occurs while reading encoded data. * @exception KrbApErrException if the value read from the DER-encoded data * stream does not match the pre-defined value. * @exception RealmException if an error occurs while parsing a Realm object. */ private void init(DerValue encoding) throws Asn1Exception, RealmException, KrbApErrException, IOException { DerValue der, subDer; if (((encoding.getTag() & (byte)0x1F) != (byte)0x1E) || (encoding.isApplication() != true) || (encoding.isConstructed() != true)) { throw new Asn1Exception(Krb5.ASN1_BAD_ID); } der = encoding.getData().getDerValue(); if (der.getTag() != DerValue.tag_Sequence) { throw new Asn1Exception(Krb5.ASN1_BAD_ID); } subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) == (byte)0x00) { pvno = subDer.getData().getBigInteger().intValue(); if (pvno != Krb5.PVNO) throw new KrbApErrException(Krb5.KRB_AP_ERR_BADVERSION); } else { throw new Asn1Exception(Krb5.ASN1_BAD_ID); } subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) == (byte)0x01) { msgType = subDer.getData().getBigInteger().intValue(); if (msgType != Krb5.KRB_ERROR) { throw new KrbApErrException(Krb5.KRB_AP_ERR_MSG_TYPE); } } else { throw new Asn1Exception(Krb5.ASN1_BAD_ID); } cTime = KerberosTime.parse(der.getData(), (byte)0x02, true); if ((der.getData().peekByte() & 0x1F) == 0x03) { subDer = der.getData().getDerValue(); cuSec = new Integer(subDer.getData().getBigInteger().intValue()); } else cuSec = null; sTime = KerberosTime.parse(der.getData(), (byte)0x04, false); subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) == (byte)0x05) { suSec = new Integer (subDer.getData().getBigInteger().intValue()); } else throw new Asn1Exception(Krb5.ASN1_BAD_ID); subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) == (byte)0x06) { errorCode = subDer.getData().getBigInteger().intValue(); } else throw new Asn1Exception(Krb5.ASN1_BAD_ID); Realm crealm = Realm.parse(der.getData(), (byte)0x07, true); cname = PrincipalName.parse(der.getData(), (byte)0x08, true, crealm); Realm realm = Realm.parse(der.getData(), (byte)0x09, false); sname = PrincipalName.parse(der.getData(), (byte)0x0A, false, realm); eText = null; eData = null; eCksum = null; if (der.getData().available() >0) { if ((der.getData().peekByte() & 0x1F) == 0x0B) { subDer = der.getData().getDerValue(); eText = new KerberosString(subDer.getData().getDerValue()) .toString(); } } if (der.getData().available() >0) { if ((der.getData().peekByte() & 0x1F) == 0x0C) { subDer = der.getData().getDerValue(); eData = subDer.getData().getOctetString(); } } if (der.getData().available() >0) { eCksum = Checksum.parse(der.getData(), (byte)0x0D, true); } if (der.getData().available() >0) throw new Asn1Exception(Krb5.ASN1_BAD_ID); }
Example 20
Source Project: jdk8u_jdk File: KRBError.java License: GNU General Public License v2.0 | 4 votes |
/** * Initializes a KRBError object. * @param encoding a DER-encoded data. * @exception Asn1Exception if an error occurs while decoding an ASN1 encoded data. * @exception IOException if an I/O error occurs while reading encoded data. * @exception KrbApErrException if the value read from the DER-encoded data * stream does not match the pre-defined value. * @exception RealmException if an error occurs while parsing a Realm object. */ private void init(DerValue encoding) throws Asn1Exception, RealmException, KrbApErrException, IOException { DerValue der, subDer; if (((encoding.getTag() & (byte)0x1F) != (byte)0x1E) || (encoding.isApplication() != true) || (encoding.isConstructed() != true)) { throw new Asn1Exception(Krb5.ASN1_BAD_ID); } der = encoding.getData().getDerValue(); if (der.getTag() != DerValue.tag_Sequence) { throw new Asn1Exception(Krb5.ASN1_BAD_ID); } subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) == (byte)0x00) { pvno = subDer.getData().getBigInteger().intValue(); if (pvno != Krb5.PVNO) throw new KrbApErrException(Krb5.KRB_AP_ERR_BADVERSION); } else { throw new Asn1Exception(Krb5.ASN1_BAD_ID); } subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) == (byte)0x01) { msgType = subDer.getData().getBigInteger().intValue(); if (msgType != Krb5.KRB_ERROR) { throw new KrbApErrException(Krb5.KRB_AP_ERR_MSG_TYPE); } } else { throw new Asn1Exception(Krb5.ASN1_BAD_ID); } cTime = KerberosTime.parse(der.getData(), (byte)0x02, true); if ((der.getData().peekByte() & 0x1F) == 0x03) { subDer = der.getData().getDerValue(); cuSec = new Integer(subDer.getData().getBigInteger().intValue()); } else cuSec = null; sTime = KerberosTime.parse(der.getData(), (byte)0x04, false); subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) == (byte)0x05) { suSec = new Integer (subDer.getData().getBigInteger().intValue()); } else throw new Asn1Exception(Krb5.ASN1_BAD_ID); subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) == (byte)0x06) { errorCode = subDer.getData().getBigInteger().intValue(); } else throw new Asn1Exception(Krb5.ASN1_BAD_ID); crealm = Realm.parse(der.getData(), (byte)0x07, true); cname = PrincipalName.parse(der.getData(), (byte)0x08, true, crealm); Realm realm = Realm.parse(der.getData(), (byte)0x09, false); sname = PrincipalName.parse(der.getData(), (byte)0x0A, false, realm); eText = null; eData = null; eCksum = null; if (der.getData().available() >0) { if ((der.getData().peekByte() & 0x1F) == 0x0B) { subDer = der.getData().getDerValue(); eText = new KerberosString(subDer.getData().getDerValue()) .toString(); } } if (der.getData().available() >0) { if ((der.getData().peekByte() & 0x1F) == 0x0C) { subDer = der.getData().getDerValue(); eData = subDer.getData().getOctetString(); } } if (der.getData().available() >0) { eCksum = Checksum.parse(der.getData(), (byte)0x0D, true); } if (der.getData().available() >0) throw new Asn1Exception(Krb5.ASN1_BAD_ID); }