Package sun.security.krb5.internal.ccache

Examples of sun.security.krb5.internal.ccache.CredentialsCache


        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 = Realm.parse(der.getData(), (byte)0x01, false);
        sname = PrincipalName.parse(der.getData(), (byte)0x02, false);
        encPart = EncryptedData.parse(der.getData(), (byte)0x03, false);
        if (der.getData().available() > 0)
            throw new Asn1Exception(Krb5.ASN1_BAD_ID);
    }
View Full Code Here


    public static Ticket parse(DerInputStream data, byte explicitTag, boolean optional) throws Asn1Exception, IOException, RealmException, KrbApErrException {
        if ((optional) && (((byte)data.peekByte() & (byte)0x1F)!= explicitTag))
            return null;
        DerValue der = data.getDerValue();
        if (explicitTag != (der.getTag() & (byte)0x1F))  {
            throw new Asn1Exception(Krb5.ASN1_BAD_ID);
        }
        else {
            DerValue subDer = der.getData().getDerValue();
            return new Ticket(subDer);
        }
View Full Code Here

     */

    public LastReq(DerValue encoding) throws Asn1Exception, IOException {
        Vector<LastReqEntry> v= new Vector<LastReqEntry> ();
        if (encoding.getTag() != DerValue.tag_Sequence) {
            throw new Asn1Exception(Krb5.ASN1_BAD_ID);
        }
        while (encoding.getData().available() > 0) {
            v.addElement(new LastReqEntry(encoding.getData().getDerValue()));
        }
        if (v.size() > 0) {
View Full Code Here

    public static LastReq parse(DerInputStream data, byte explicitTag, boolean optional) throws Asn1Exception, IOException {
        if ((optional) && (((byte)data.peekByte() & (byte)0x1F) != explicitTag))
            return null;
        DerValue der = data.getDerValue();
        if (explicitTag != (der.getTag() & (byte)0x1F))  {
            throw new Asn1Exception(Krb5.ASN1_BAD_ID);
        }
        else {
            DerValue subDer = der.getData().getDerValue();
            return new LastReq(subDer);
        }
View Full Code Here

         * @param encoding a single DER-encoded value.
         */
        public AuthorizationDataEntry(DerValue encoding) throws Asn1Exception, IOException {
                DerValue der;
        if (encoding.getTag() != DerValue.tag_Sequence) {
            throw new Asn1Exception(Krb5.ASN1_BAD_ID);
                }
                der = encoding.getData().getDerValue();
        if ((der.getTag() & (byte)0x1F) == (byte)0x00) {
                        adType = der.getData().getBigInteger().intValue();
                }
                else
                        throw new Asn1Exception(Krb5.ASN1_BAD_ID);
        der = encoding.getData().getDerValue();
        if ((der.getTag() & (byte)0x1F) == (byte)0x01) {
                        adData = der.getData().getOctetString();
                }
                else
                        throw new Asn1Exception(Krb5.ASN1_BAD_ID);
        if (encoding.getData().available() > 0)
                        throw new Asn1Exception(Krb5.ASN1_BAD_ID);
        }
View Full Code Here

    KrbApErrException, IOException {
        DerValue der, subDer;
        if (((encoding.getTag() & (byte)0x1F) != (byte)0x15)
            || (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() & 0x1F) == 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() & 0x1F) == 0x01) {
            msgType = subDer.getData().getBigInteger().intValue();
            if (msgType != Krb5.KRB_PRIV)
                throw new KrbApErrException(Krb5.KRB_AP_ERR_MSG_TYPE);
        }
        else
            throw new Asn1Exception(Krb5.ASN1_BAD_ID);
        encPart = EncryptedData.parse(der.getData(), (byte)0x03, false);
        if (der.getData().available() >0)
            throw new Asn1Exception(Krb5.ASN1_BAD_ID);
    }
View Full Code Here

         */
        public AuthorizationData(DerValue der) throws Asn1Exception, IOException {
                Vector<AuthorizationDataEntry> v =
                    new Vector<AuthorizationDataEntry> ();
                if (der.getTag() != DerValue.tag_Sequence) {
                        throw new Asn1Exception(Krb5.ASN1_BAD_ID);
                }
                while (der.getData().available() > 0) {
                        v.addElement(new AuthorizationDataEntry(der.getData().getDerValue()));
                }
                if (v.size() > 0) {
View Full Code Here

                if ((optional) && (((byte)data.peekByte() & (byte)0x1F) != explicitTag)) {
                        return null;
                }
                DerValue der = data.getDerValue();
                if (explicitTag != (der.getTag() & (byte)0x1F))  {
                        throw new Asn1Exception(Krb5.ASN1_BAD_ID);
                }
                else {
                        DerValue subDer = der.getData().getDerValue();
                        return new AuthorizationData(subDer);
                }
View Full Code Here

        private void init(DerValue encoding) throws Asn1Exception, IOException {
        DerValue der, subDer;
                if (((encoding.getTag() & (byte)0x1F) != (byte)0x1C)
                        || (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) {
                        userData = subDer.getData().getOctetString();
                }
        else
                        throw new Asn1Exception(Krb5.ASN1_BAD_ID);
                timestamp = KerberosTime.parse(der.getData(), (byte)0x01, true);
                if ((der.getData().peekByte() & 0x1F) == 0x02) {
                        subDer = der.getData().getDerValue();
                        usec = new Integer(subDer.getData().getBigInteger().intValue());
                }
                else usec = null;
                if ((der.getData().peekByte() & 0x1F) == 0x03 ) {
                        subDer = der.getData().getDerValue();
                        seqNumber = new Integer(subDer.getData().getBigInteger().intValue());
                }
                else seqNumber = null;
                sAddress = HostAddress.parse(der.getData(), (byte)0x04, false);
                if (der.getData().available() > 0) {
                        rAddress = HostAddress.parse(der.getData(), (byte)0x05, true);
                }
                if (der.getData().available() > 0)
                        throw new Asn1Exception(Krb5.ASN1_BAD_ID);
        }
View Full Code Here

     * @exception IOException if an I/O error occurs while reading encoded data.
     */
    public PAEncTSEnc(DerValue encoding) throws Asn1Exception, IOException {
        DerValue der;
        if (encoding.getTag() != DerValue.tag_Sequence) {
            throw new Asn1Exception(Krb5.ASN1_BAD_ID);
        }
        pATimeStamp = KerberosTime.parse(encoding.getData(), (byte)0x00, false);
        if (encoding.getData().available() > 0) {
            der = encoding.getData().getDerValue();
            if ((der.getTag() & 0x1F) == 0x01) {
                pAUSec = new Integer(der.getData().getBigInteger().intValue());
            }
            else throw new Asn1Exception(Krb5.ASN1_BAD_ID);
        }
        if (encoding.getData().available() > 0)
            throw new Asn1Exception(Krb5.ASN1_BAD_ID);
    }
View Full Code Here

TOP

Related Classes of sun.security.krb5.internal.ccache.CredentialsCache

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.