This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,6 @@ public class CipherTextHandler
{
EnumMap<EncryptionType, Class<? extends EncryptionEngine>> map = new EnumMap<>( EncryptionType.class );

map.put( EncryptionType.DES_CBC_MD5, DesCbcMd5Encryption.class );
map.put( EncryptionType.DES3_CBC_SHA1_KD, Des3CbcSha1KdEncryption.class );
map.put( EncryptionType.AES128_CTS_HMAC_SHA1_96, Aes128CtsSha1Encryption.class );
map.put( EncryptionType.AES256_CTS_HMAC_SHA1_96, Aes256CtsSha1Encryption.class );
map.put( EncryptionType.RC4_HMAC, ArcFourHmacMd5Encryption.class );

DEFAULT_CIPHERS = Collections.unmodifiableMap( map );
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -115,134 +115,6 @@ public void testTestVectorLengths()
assertEquals( "RC4-HMAC length", 52, ARCFOUR_ENCRYPTED_TIME_STAMP.length );
}


/**
* Tests the unsealing of Kerberos CipherText with a good password. After decryption and
* an integrity check, an attempt is made to decode the bytes as an EncryptedTimestamp. The
* result is timestamp data.
*/
@Test
public void testDesGoodPasswordDecrypt()
{
CipherTextHandler lockBox = new CipherTextHandler();
KerberosPrincipal principal = new KerberosPrincipal( "erodriguez@EXAMPLE.COM" );
KerberosKey kerberosKey = new KerberosKey( principal, "kerby".toCharArray(), "DES" );
EncryptionKey key = new EncryptionKey( EncryptionType.DES_CBC_MD5, kerberosKey.getEncoded() );
EncryptedData data = new EncryptedData( EncryptionType.DES_CBC_MD5, 0, DES_ENCRYPTED_TIME_STAMP );

try
{
byte[] paEncTsEncData = lockBox.decrypt( key, data, KeyUsage.AS_REQ_PA_ENC_TIMESTAMP_WITH_CKEY );
PaEncTsEnc object = KerberosDecoder.decodePaEncTsEnc( paEncTsEncData );
assertEquals( "TimeStamp", "20070322233107Z", object.getPaTimestamp().toString() );
assertEquals( "MicroSeconds", 291067, object.getPausec() );
}
catch ( KerberosException ke )
{
fail( "Should not have caught exception." );
}
}


/**
* Tests the unsealing of Kerberos CipherText with a bad password. After decryption, the
* checksum is tested and should fail on comparison, resulting in an integrity check error.
*/
@Test
public void testDesBadPasswordDecrypt()
{
CipherTextHandler lockBox = new CipherTextHandler();
KerberosPrincipal principal = new KerberosPrincipal( "erodriguez@EXAMPLE.COM" );
KerberosKey kerberosKey = new KerberosKey( principal, "badpassword".toCharArray(), "DES" );
EncryptionKey key = new EncryptionKey( EncryptionType.DES_CBC_MD5, kerberosKey.getEncoded() );
EncryptedData data = new EncryptedData( EncryptionType.DES_CBC_MD5, 0, DES_ENCRYPTED_TIME_STAMP );

try
{
lockBox.decrypt( key, data, KeyUsage.AS_REQ_PA_ENC_TIMESTAMP_WITH_CKEY );
fail( "Should have thrown exception." );
}
catch ( KerberosException ke )
{
assertEquals( "ErrorCode", 31, ke.getErrorCode() );
}
}


/**
* Tests the unsealing of Kerberos CipherText with a good password. After decryption and
* an integrity check, an attempt is made to decode the bytes as an EncryptedTimestamp. The
* result is timestamp data.
*/
@Test
public void testTripleDesGoodPasswordDecrypt()
{
CipherTextHandler lockBox = new CipherTextHandler();
KerberosPrincipal principal = new KerberosPrincipal( "hnelson@EXAMPLE.COM" );
String algorithm = VendorHelper.getTripleDesAlgorithm();
KerberosKey kerberosKey = new KerberosKey( principal, "secret".toCharArray(), algorithm );
EncryptionKey key = new EncryptionKey( EncryptionType.DES3_CBC_SHA1_KD, kerberosKey.getEncoded() );
EncryptedData data = new EncryptedData( EncryptionType.DES3_CBC_SHA1_KD, 0, TRIPLE_DES_ENCRYPTED_TIME_STAMP );

try
{
byte[] paEncTsEncData = lockBox.decrypt( key, data, KeyUsage.AS_REQ_PA_ENC_TIMESTAMP_WITH_CKEY );
PaEncTsEnc object = KerberosDecoder.decodePaEncTsEnc( paEncTsEncData );
assertEquals( "TimeStamp", "20070410190400Z", object.getPaTimestamp().toString() );
assertEquals( "MicroSeconds", 460450, object.getPausec() );
}
catch ( KerberosException ke )
{
fail( "Should not have caught exception." );
}
}


/**
* Tests the encryption and subsequent unsealing of an ASN.1 encoded timestamp with a
* good password. After encryption, an attempt is made to unseal the encrypted bytes
* as an EncryptedTimestamp. The result is timestamp data.
*
* @throws ParseException
*/
@Test
public void testTripleDesGoodPasswordEncrypt() throws ParseException
{
CipherTextHandler lockBox = new CipherTextHandler();
KerberosPrincipal principal = new KerberosPrincipal( "hnelson@EXAMPLE.COM" );
String algorithm = VendorHelper.getTripleDesAlgorithm();
KerberosKey kerberosKey = new KerberosKey( principal, "secret".toCharArray(), algorithm );
EncryptionKey key = new EncryptionKey( EncryptionType.DES3_CBC_SHA1_KD, kerberosKey.getEncoded() );

String zuluTime = "20070410190400Z";
int microSeconds = 460450;
PaEncTsEnc encryptedTimeStamp = getEncryptedTimeStamp( zuluTime, microSeconds );

EncryptedData encryptedData = null;

try
{
encryptedData = lockBox.seal( key, encryptedTimeStamp, KeyUsage.AS_REQ_PA_ENC_TIMESTAMP_WITH_CKEY );
}
catch ( KerberosException ke )
{
fail( "Should not have caught exception." );
}

try
{
byte[] paEncTsEncData = lockBox.decrypt( key, encryptedData, KeyUsage.AS_REQ_PA_ENC_TIMESTAMP_WITH_CKEY );
PaEncTsEnc object = KerberosDecoder.decodePaEncTsEnc( paEncTsEncData );
assertEquals( "TimeStamp", zuluTime, object.getPaTimestamp().toString() );
assertEquals( "MicroSeconds", microSeconds, object.getPausec() );
}
catch ( KerberosException ke )
{
fail( "Should not have caught exception." );
}
}


/**
* Tests the unsealing of Kerberos CipherText with a good password. After decryption and
* an integrity check, an attempt is made to decode the bytes as an EncryptedTimestamp. The
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

147 changes: 0 additions & 147 deletions kerberos-test/pom.xml

This file was deleted.

26 changes: 0 additions & 26 deletions kerberos-test/src/site/site.xml

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
31 changes: 0 additions & 31 deletions kerberos-test/src/test/resources/krb5.conf

This file was deleted.

25 changes: 0 additions & 25 deletions kerberos-test/src/test/resources/log4j.properties

This file was deleted.

This file was deleted.

7 changes: 0 additions & 7 deletions ldap-client-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,6 @@
<artifactId>apacheds-interceptor-kerberos</artifactId>
</dependency>

<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>apacheds-kerberos-test</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>

<!-- Shared dependencies -->
<dependency>
<groupId>org.apache.directory.api</groupId>
Expand Down
5 changes: 0 additions & 5 deletions osgi-integ/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,6 @@
<artifactId>apacheds-protocol-ldap</artifactId>
</dependency>

<dependency>
<groupId>org.apache.directory.server</groupId>
<artifactId>apacheds-protocol-kerberos</artifactId>
</dependency>

<dependency>
<groupId>org.apache.directory.server</groupId>
<artifactId>apacheds-protocol-dhcp</artifactId>
Expand Down

This file was deleted.

5 changes: 0 additions & 5 deletions osgi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,6 @@
<artifactId>apacheds-protocol-dhcp</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.directory.server</groupId>
<artifactId>apacheds-protocol-kerberos</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.directory.server</groupId>
<artifactId>apacheds-interceptor-kerberos</artifactId>
Expand Down
31 changes: 2 additions & 29 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
<name>ApacheDS</name>

<description>ApacheDS is an embbedable directory server entirely written in Java, which has been certified LDAPv3 compatible
by the Open Group. Besides LDAP it supports Kerberos 5 and the Change Password Protocol. It has been designed to introduce
triggers, stored procedures, queues and views to the world of LDAP which has lacked these rich constructs.
by the Open Group. It has been designed to introduce triggers, stored procedures, queues and views to the world of LDAP
which has lacked these rich constructs.
</description>

<properties>
Expand Down Expand Up @@ -137,12 +137,10 @@
<!--<module>osgi</module>-->
<module>server-jndi</module>
<module>interceptor-kerberos</module>
<!--module>kerberos-test</module-->
<module>http-directory-bridge</module>
<module>http-integration</module>
<module>test-framework</module>
<module>ldap-client-test</module>
<!--module>kerberos-client</module-->
<module>service</module>
<module>wrapper</module>
<module>installers-maven-plugin</module>
Expand Down Expand Up @@ -778,31 +776,12 @@
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>apacheds-kerberos-shared</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>apacheds-kerberos-codec</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>apacheds-kerberos-test</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>apacheds-kerberos-test</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
</dependency>

<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>apacheds-ldap-client-test</artifactId>
Expand Down Expand Up @@ -833,12 +812,6 @@
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>apacheds-protocol-kerberos</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>apacheds-protocol-ldap</artifactId>
Expand Down
186 changes: 0 additions & 186 deletions protocol-kerberos/pom.xml

This file was deleted.

This file was deleted.

Loading