Examples of EncTgsRepPart


Examples of org.apache.directory.shared.kerberos.messages.EncTgsRepPart

        catch ( DecoderException de )
        {
            fail( de.getMessage() );
        }

        EncTgsRepPart encTgsRepPart = encTgsRepPartContainer.getEncTgsRepPart();

        // Check the encoding
        int length = encTgsRepPart.computeLength();

        // Check the length
        assertEquals( 0xA2, length );

        // Check the encoding
        ByteBuffer encodedPdu = ByteBuffer.allocate( length );

        try
        {
            encodedPdu = encTgsRepPart.encode( encodedPdu );

            // Check the length
            assertEquals( 0xA2, encodedPdu.limit() );
        }
        catch ( EncoderException ee )
View Full Code Here

Examples of org.apache.directory.shared.kerberos.messages.EncTgsRepPart

        {
            throw new ChangePasswordException( ChangePasswdErrorType.KRB5_KPASSWD_MALFORMED, de );
        }

        // get the decoded EncTgsRepPart
        EncTgsRepPart encTgsRepPart = ( ( EncTgsRepPartContainer ) encTgsRepPartContainer ).getEncTgsRepPart();

        return encTgsRepPart;
    }
View Full Code Here

Examples of org.apache.directory.shared.kerberos.messages.EncTgsRepPart

                encKdcRepPart = encAsRepPart.getEncKdcRepPart();
            }
            catch( KerberosException e )
            {
                LOG.info("Trying an encTgsRepPart instead");
                EncTgsRepPart encTgsRepPart = KerberosDecoder.decodeEncTgsRepPart( decryptedEncAsRepPart );
                encKdcRepPart = encTgsRepPart.getEncKdcRepPart();
            }
           
            if ( currentNonce != encKdcRepPart.getNonce() )
            {
                throw new KerberosException( ErrorType.KRB_ERR_GENERIC, "received nonce didn't match with the nonce sent in the request" );
View Full Code Here

Examples of org.apache.directory.shared.kerberos.messages.EncTgsRepPart

                throw new KerberosException( ( KrbError ) kdcRep );
            }

            TgsRep rep = ( TgsRep ) kdcRep;
            byte[] decryptedData = cipherTextHandler.decrypt( sessionKey, rep.getEncPart(), KeyUsage.TGS_REP_ENC_PART_TGS_SESS_KEY );
            EncTgsRepPart encTgsRepPart = KerberosDecoder.decodeEncTgsRepPart( decryptedData );
           
            if ( currentNonce != encTgsRepPart.getEncKdcRepPart().getNonce() )
            {
                throw new KerberosException( ErrorType.KRB_ERR_GENERIC, "received nonce didn't match with the nonce sent in the request" );
            }
           
           
            // Everything is fine, return the response
            LOG.debug( "TGT request successful : {}", rep );

            ServiceTicket srvTkt = new ServiceTicket( rep.getTicket(), encTgsRepPart.getEncKdcRepPart() );
           
            return srvTkt;
        }
        catch( KerberosException e )
        {
View Full Code Here

Examples of org.apache.directory.shared.kerberos.messages.EncTgsRepPart

        {
            monitorContext( tgsContext );
            monitorReply( reply, encKdcRepPart );
        }

        EncTgsRepPart encTgsRepPart = new EncTgsRepPart();
        encTgsRepPart.setEncKdcRepPart( encKdcRepPart );

        Authenticator authenticator = tgsContext.getAuthenticator();

        EncryptedData encryptedData;
View Full Code Here

Examples of org.apache.directory.shared.kerberos.messages.EncTgsRepPart

        {
            monitorContext( tgsContext );
            monitorReply( reply, encKdcRepPart );
        }

        EncTgsRepPart encTgsRepPart = new EncTgsRepPart();
        encTgsRepPart.setEncKdcRepPart( encKdcRepPart );
       
        Authenticator authenticator = tgsContext.getAuthenticator();
       
        EncryptedData encryptedData;
       
View Full Code Here

Examples of org.apache.directory.shared.kerberos.messages.EncTgsRepPart

        {
            monitorContext( tgsContext );
            monitorReply( reply, encKdcRepPart );
        }

        EncTgsRepPart encTgsRepPart = new EncTgsRepPart();
        encTgsRepPart.setEncKdcRepPart( encKdcRepPart );

        Authenticator authenticator = tgsContext.getAuthenticator();

        EncryptedData encryptedData;
View Full Code Here

Examples of org.apache.directory.shared.kerberos.messages.EncTgsRepPart

        {
            monitorContext( tgsContext );
            monitorReply( reply, encKdcRepPart );
        }

        EncTgsRepPart encTgsRepPart = new EncTgsRepPart();
        encTgsRepPart.setEncKdcRepPart( encKdcRepPart );

        Authenticator authenticator = tgsContext.getAuthenticator();

        EncryptedData encryptedData;
View Full Code Here

Examples of org.apache.directory.shared.kerberos.messages.EncTgsRepPart

                encKdcRepPart = encAsRepPart.getEncKdcRepPart();
            }
            catch( KerberosException e )
            {
                LOG.info("Trying an encTgsRepPart instead");
                EncTgsRepPart encTgsRepPart = KerberosDecoder.decodeEncTgsRepPart( decryptedEncAsRepPart );
                encKdcRepPart = encTgsRepPart.getEncKdcRepPart();
            }
           
            if ( currentNonce != encKdcRepPart.getNonce() )
            {
                throw new KerberosException( ErrorType.KRB_ERR_GENERIC, "received nonce didn't match with the nonce sent in the request" );
View Full Code Here

Examples of org.apache.directory.shared.kerberos.messages.EncTgsRepPart

                throw new KerberosException( ( KrbError ) kdcRep );
            }

            TgsRep rep = ( TgsRep ) kdcRep;
            byte[] decryptedData = cipherTextHandler.decrypt( sessionKey, rep.getEncPart(), KeyUsage.TGS_REP_ENC_PART_TGS_SESS_KEY );
            EncTgsRepPart encTgsRepPart = KerberosDecoder.decodeEncTgsRepPart( decryptedData );
           
            if ( currentNonce != encTgsRepPart.getEncKdcRepPart().getNonce() )
            {
                throw new KerberosException( ErrorType.KRB_ERR_GENERIC, "received nonce didn't match with the nonce sent in the request" );
            }
           
           
            // Everything is fine, return the response
            LOG.debug( "TGT request successful : {}", rep );

            ServiceTicket srvTkt = new ServiceTicket( rep.getTicket(), encTgsRepPart.getEncKdcRepPart() );
           
            return srvTkt;
        }
        catch( KerberosException e )
        {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.