Package org.apache.directory.shared.kerberos.components

Examples of org.apache.directory.shared.kerberos.components.Checksum


        }

        // Check the decoded AdKdcIssued
        AdKdcIssued adKdcIssued = ( ( AdKdcIssuedContainer ) adKdcIssuedContainer).getAdKdcIssued();

        Checksum checksum = adKdcIssued.getAdChecksum();
       
        assertEquals( ChecksumType.getTypeByValue( 2 ), checksum.getChecksumType() );
        assertTrue( Arrays.equals( Strings.getBytesUtf8("chksum"), checksum.getChecksumValue() ) );

        assertEquals( "EXAMPLE.COM", adKdcIssued.getIRealm() );
       
        PrincipalName principalName = adKdcIssued.getISName();
View Full Code Here


        // Check the decoded AdKdcIssued
        AdKdcIssued adKdcIssued = ( ( AdKdcIssuedContainer ) adKdcIssuedContainer).getAdKdcIssued();

        // The checksum
        Checksum checksum = adKdcIssued.getAdChecksum();
       
        assertEquals( ChecksumType.getTypeByValue( 2 ), checksum.getChecksumType() );
        assertTrue( Arrays.equals( Strings.getBytesUtf8("chksum"), checksum.getChecksumValue() ) );

        // The realm
        assertNull( adKdcIssued.getIRealm() );
       
        // The sname
View Full Code Here

            // This will generate a PROTOCOL_ERROR
            throw new DecoderException( I18n.err( I18n.ERR_04067 ) );
        }

        Checksum checksum = new Checksum();
        checksumContainer.setChecksum( checksum );

        if ( IS_DEBUG )
        {
            LOG.debug( "Checksum created" );
View Full Code Here

        authenticator.setCTime( now );
        authenticator.setCusec( clientMicroSeconds );
        authenticator.setSubKey( subSessionKey );
        authenticator.setSeqNumber( sequenceNumber );

        Checksum checksum = getBodyChecksum( requestBody, checksumType );
        authenticator.setCksum( checksum );

        EncryptedData encryptedAuthenticator = lockBox.seal( sessionKey, authenticator,
            KeyUsage.TGS_REQ_PA_TGS_REQ_PADATA_AP_REQ_TGS_SESS_KEY );
View Full Code Here

     * Initialize name instances
     */
    @BeforeClass
    public static void initNames() throws Exception
    {
        checksumA = new Checksum ( ChecksumType.RSA_MD5, CHECKSUM_VALUE_A );
        checksumACopy = new Checksum ( ChecksumType.RSA_MD5, CHECKSUM_VALUE_A );
        checksumB = new Checksum ( ChecksumType.RSA_MD5, CHECKSUM_VALUE_B );
        checksumC = new Checksum ( ChecksumType.RSA_MD5, CHECKSUM_VALUE_C );
        checksumD = new Checksum ( ChecksumType.RSA_MD4, CHECKSUM_VALUE_A );

    }
View Full Code Here

    }
   
    @Test
    public void testEncodingChecksum() throws Exception
    {
        Checksum chk = new Checksum( ChecksumType.CRC32, new byte[]
            { 0x01, 0x02, 0x03 } );

        ByteBuffer encoded = ByteBuffer.allocate( chk.computeLength() );

        chk.encode( encoded );

        byte[] expectedResult = new byte[]
            {
            0x30, 0x0c,
              (byte)0xA0, 0x03,
View Full Code Here


    @Test
    public void testEncodingNullChecksum() throws Exception
    {
        Checksum chk = new Checksum( ChecksumType.CRC32, null );

        ByteBuffer encoded = ByteBuffer.allocate( chk.computeLength() );

        chk.encode( encoded );

        byte[] expectedResult = new byte[]
            {
                0x30, 0x09,
                  ( byte ) 0xA0,
View Full Code Here

        authenticator.setCTime( now );
        authenticator.setCusec( clientMicroSeconds );
        authenticator.setSubKey( subSessionKey );
        authenticator.setSeqNumber( sequenceNumber );

        Checksum checksum = getBodyChecksum( requestBody, checksumType );
        authenticator.setCksum( checksum );

        EncryptedData encryptedAuthenticator = lockBox.seal( sessionKey, authenticator, KeyUsage.TGS_REQ_PA_TGS_REQ_PADATA_AP_REQ_TGS_SESS_KEY );

        return encryptedAuthenticator;
View Full Code Here

TOP

Related Classes of org.apache.directory.shared.kerberos.components.Checksum

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.