MD5PasswordStorageSchemeTestCase.java revision 454d4f38619c6059331fea929c5136528ace3c5e
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis/*
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * CDDL HEADER START
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis *
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * The contents of this file are subject to the terms of the
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * Common Development and Distribution License, Version 1.0 only
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * (the "License"). You may not use this file except in compliance
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * with the License.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis *
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * You can obtain a copy of the license at
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * trunk/opends/resource/legal-notices/OpenDS.LICENSE
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * See the License for the specific language governing permissions
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * and limitations under the License.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis *
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * When distributing Covered Code, include this CDDL HEADER in each
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * file and include the License file at
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * add the following below this CDDL HEADER, with the fields enclosed
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * by brackets "[]" replaced with your own identifying information:
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * Portions Copyright [yyyy] [name of copyright owner]
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis *
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * CDDL HEADER END
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis *
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis *
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * Portions Copyright 2006-2007 Sun Microsystems, Inc.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis */
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtispackage org.opends.server.extensions;
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtisimport org.opends.server.admin.server.AdminTestCaseUtils;
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtisimport org.opends.server.admin.std.meta.PasswordStorageSchemeCfgDefn;
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtisimport org.opends.server.admin.std.server.PasswordStorageSchemeCfg;
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtisimport org.opends.server.api.PasswordStorageScheme;
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis/**
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * A set of test cases for the MD5 password storage scheme.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis */
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtispublic class MD5PasswordStorageSchemeTestCase
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis extends PasswordStorageSchemeTestCase
{
/**
* Creates a new instance of this storage scheme test case.
*/
public MD5PasswordStorageSchemeTestCase()
{
super("cn=MD5,cn=Password Storage Schemes,cn=config");
}
/**
* Retrieves an initialized instance of this password storage scheme.
*
* @param configEntry The configuration entry for the password storage
* scheme, or <CODE>null</CODE> if none is available.
*
* @return An initialized instance of this password storage scheme.
*
* @throws Exception If an unexpected problem occurs.
*/
public PasswordStorageScheme getScheme()
throws Exception
{
MD5PasswordStorageScheme scheme = new MD5PasswordStorageScheme();
PasswordStorageSchemeCfg configuration =
AdminTestCaseUtils.getConfiguration(
PasswordStorageSchemeCfgDefn.getInstance(),
configEntry.getEntry()
);
scheme.initializePasswordStorageScheme(configuration);
return scheme;
}
}