From 7e3280dfd59ea8775d4c20aa85b18044d545435d Mon Sep 17 00:00:00 2001
From: el_kaboing <el_kaboing@localhost>
Date: Tue, 05 Dec 2006 20:39:19 +0000
Subject: [PATCH] Added functional tests for Issues 309-310 and 312-314, Password Storage Schemes.

---
 opends/tests/functional-tests/shared/data/security/pwd_storage/admin_change_CLEAR.ldif      |   29 
 opends/tests/functional-tests/shared/data/security/pwd_storage/user_change_pwd_SSHA256.ldif |   29 
 opends/tests/functional-tests/testcases/security/pwd_storage/security_pwd_SSHA256.xml       |  150 +++
 opends/tests/functional-tests/testcases/security/pwd_storage/security_pwd_SSHA.xml          |  180 ++++
 opends/tests/functional-tests/shared/data/security/pwd_storage/user_change_pwd_SSHA384.ldif |   29 
 opends/tests/functional-tests/testcases/security/pwd_storage/security_pwd_SSHA384.xml       |  150 +++
 opends/tests/functional-tests/shared/data/security/pwd_storage/user_change_pwd_CLEAR.ldif   |   29 
 opends/tests/functional-tests/testcases/security/pwd_storage/security_pwd_BASE64.xml        |  150 +++
 opends/tests/functional-tests/shared/data/security/pwd_storage/admin_reset_SSHA.ldif        |   29 
 opends/tests/functional-tests/shared/data/security/pwd_storage/admin_change_SSHA384.ldif    |   29 
 opends/tests/functional-tests/testcases/security/pwd_storage/security_setup_pwd_storage.xml |   65 +
 opends/tests/functional-tests/shared/data/security/pwd_storage/admin_change_BASE64.ldif     |   29 
 opends/tests/functional-tests/shared/data/security/pwd_storage/user_change_pwd_MD5.ldif     |   29 
 opends/tests/functional-tests/shared/data/security/pwd_storage/user_change_pwd_SMD5.ldif    |   29 
 opends/tests/functional-tests/shared/data/security/pwd_storage/user_change_pwd_SSHA.ldif    |   29 
 opends/tests/functional-tests/shared/data/security/pwd_storage/admin_change_SSHA512.ldif    |   29 
 opends/tests/functional-tests/shared/data/security/pwd_storage/admin_change_BAD.ldif        |   29 
 opends/tests/functional-tests/testcases/security/security.xml                               |    4 
 opends/tests/functional-tests/testcases/security/pwd_storage/security_pwd_SSHA512.xml       |  150 +++
 opends/tests/functional-tests/shared/data/security/pwd_storage/user_change_pwd_SHA.ldif     |   29 
 opends/tests/functional-tests/testcases/security/pwd_storage/security_pwd_storage.xml       |  140 +++
 opends/tests/functional-tests/testcases/security/pwd_storage/security_pwd_SHA.xml           |  150 +++
 opends/tests/functional-tests/shared/data/security/pwd_storage/pwd_storage_startup.ldif     |  348 ++++++++
 opends/tests/functional-tests/shared/data/security/pwd_storage/user_change_pwd_SSHA512.ldif |   29 
 opends/tests/functional-tests/shared/data/security/pwd_storage/admin_change_MD5.ldif        |   29 
 opends/tests/functional-tests/shared/data/security/pwd_storage/admin_change_SSHA256.ldif    |   29 
 opends/tests/functional-tests/testcases/security/pwd_storage/security_pwd_MD5.xml           |  150 +++
 opends/tests/functional-tests/testcases/security/pwd_storage/security_pwd_SMD5.xml          |  150 +++
 opends/tests/functional-tests/shared/data/security/pwd_storage/admin_change_SHA.ldif        |   29 
 opends/tests/functional-tests/testcases/security/pwd_storage/security_pwd_CLEAR.xml         |  150 +++
 opends/tests/functional-tests/shared/data/security/pwd_storage/admin_change_SMD5.ldif       |   29 
 opends/tests/functional-tests/shared/data/security/pwd_storage/user_change_pwd_BASE64.ldif  |   29 
 32 files changed, 2,488 insertions(+), 0 deletions(-)

diff --git a/opends/tests/functional-tests/shared/data/security/pwd_storage/admin_change_BAD.ldif b/opends/tests/functional-tests/shared/data/security/pwd_storage/admin_change_BAD.ldif
new file mode 100644
index 0000000..dc8243e
--- /dev/null
+++ b/opends/tests/functional-tests/shared/data/security/pwd_storage/admin_change_BAD.ldif
@@ -0,0 +1,29 @@
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License").  You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE
+# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
+# add the following below this CDDL HEADER, with the fields enclosed
+# by brackets "[]" replaced with your own identifying * information:
+#      Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#      Portions Copyright 2006 Sun Microsystems, Inc.
+#
+
+dn: cn=Default Password Policy,cn=Password Policies,cn=config
+changetype: modify
+replace: ds-cfg-default-password-storage-scheme
+ds-cfg-default-password-storage-scheme: BAD
diff --git a/opends/tests/functional-tests/shared/data/security/pwd_storage/admin_change_BASE64.ldif b/opends/tests/functional-tests/shared/data/security/pwd_storage/admin_change_BASE64.ldif
new file mode 100644
index 0000000..15f2819
--- /dev/null
+++ b/opends/tests/functional-tests/shared/data/security/pwd_storage/admin_change_BASE64.ldif
@@ -0,0 +1,29 @@
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License").  You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE
+# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
+# add the following below this CDDL HEADER, with the fields enclosed
+# by brackets "[]" replaced with your own identifying * information:
+#      Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#      Portions Copyright 2006 Sun Microsystems, Inc.
+#
+
+dn: cn=Default Password Policy,cn=Password Policies,cn=config
+changetype: modify
+replace: ds-cfg-default-password-storage-scheme
+ds-cfg-default-password-storage-scheme: BASE64
diff --git a/opends/tests/functional-tests/shared/data/security/pwd_storage/admin_change_CLEAR.ldif b/opends/tests/functional-tests/shared/data/security/pwd_storage/admin_change_CLEAR.ldif
new file mode 100644
index 0000000..5382219
--- /dev/null
+++ b/opends/tests/functional-tests/shared/data/security/pwd_storage/admin_change_CLEAR.ldif
@@ -0,0 +1,29 @@
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License").  You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE
+# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
+# add the following below this CDDL HEADER, with the fields enclosed
+# by brackets "[]" replaced with your own identifying * information:
+#      Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#      Portions Copyright 2006 Sun Microsystems, Inc.
+#
+
+dn: cn=Default Password Policy,cn=Password Policies,cn=config
+changetype: modify
+replace: ds-cfg-default-password-storage-scheme
+ds-cfg-default-password-storage-scheme: CLEAR
diff --git a/opends/tests/functional-tests/shared/data/security/pwd_storage/admin_change_MD5.ldif b/opends/tests/functional-tests/shared/data/security/pwd_storage/admin_change_MD5.ldif
new file mode 100644
index 0000000..bec4bd0
--- /dev/null
+++ b/opends/tests/functional-tests/shared/data/security/pwd_storage/admin_change_MD5.ldif
@@ -0,0 +1,29 @@
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License").  You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE
+# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
+# add the following below this CDDL HEADER, with the fields enclosed
+# by brackets "[]" replaced with your own identifying * information:
+#      Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#      Portions Copyright 2006 Sun Microsystems, Inc.
+#
+
+dn: cn=Default Password Policy,cn=Password Policies,cn=config
+changetype: modify
+replace: ds-cfg-default-password-storage-scheme
+ds-cfg-default-password-storage-scheme: MD5
diff --git a/opends/tests/functional-tests/shared/data/security/pwd_storage/admin_change_SHA.ldif b/opends/tests/functional-tests/shared/data/security/pwd_storage/admin_change_SHA.ldif
new file mode 100644
index 0000000..34b5d54
--- /dev/null
+++ b/opends/tests/functional-tests/shared/data/security/pwd_storage/admin_change_SHA.ldif
@@ -0,0 +1,29 @@
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License").  You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE
+# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
+# add the following below this CDDL HEADER, with the fields enclosed
+# by brackets "[]" replaced with your own identifying * information:
+#      Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#      Portions Copyright 2006 Sun Microsystems, Inc.
+#
+
+dn: cn=Default Password Policy,cn=Password Policies,cn=config
+changetype: modify
+replace: ds-cfg-default-password-storage-scheme
+ds-cfg-default-password-storage-scheme: SHA
diff --git a/opends/tests/functional-tests/shared/data/security/pwd_storage/admin_change_SMD5.ldif b/opends/tests/functional-tests/shared/data/security/pwd_storage/admin_change_SMD5.ldif
new file mode 100644
index 0000000..1aa8639
--- /dev/null
+++ b/opends/tests/functional-tests/shared/data/security/pwd_storage/admin_change_SMD5.ldif
@@ -0,0 +1,29 @@
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License").  You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE
+# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
+# add the following below this CDDL HEADER, with the fields enclosed
+# by brackets "[]" replaced with your own identifying * information:
+#      Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#      Portions Copyright 2006 Sun Microsystems, Inc.
+#
+
+dn: cn=Default Password Policy,cn=Password Policies,cn=config
+changetype: modify
+replace: ds-cfg-default-password-storage-scheme
+ds-cfg-default-password-storage-scheme: SMD5
diff --git a/opends/tests/functional-tests/shared/data/security/pwd_storage/admin_change_SSHA256.ldif b/opends/tests/functional-tests/shared/data/security/pwd_storage/admin_change_SSHA256.ldif
new file mode 100644
index 0000000..ed7661e
--- /dev/null
+++ b/opends/tests/functional-tests/shared/data/security/pwd_storage/admin_change_SSHA256.ldif
@@ -0,0 +1,29 @@
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License").  You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE
+# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
+# add the following below this CDDL HEADER, with the fields enclosed
+# by brackets "[]" replaced with your own identifying * information:
+#      Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#      Portions Copyright 2006 Sun Microsystems, Inc.
+#
+
+dn: cn=Default Password Policy,cn=Password Policies,cn=config
+changetype: modify
+replace: ds-cfg-default-password-storage-scheme
+ds-cfg-default-password-storage-scheme: SSHA256
diff --git a/opends/tests/functional-tests/shared/data/security/pwd_storage/admin_change_SSHA384.ldif b/opends/tests/functional-tests/shared/data/security/pwd_storage/admin_change_SSHA384.ldif
new file mode 100644
index 0000000..b1684c5
--- /dev/null
+++ b/opends/tests/functional-tests/shared/data/security/pwd_storage/admin_change_SSHA384.ldif
@@ -0,0 +1,29 @@
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License").  You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE
+# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
+# add the following below this CDDL HEADER, with the fields enclosed
+# by brackets "[]" replaced with your own identifying * information:
+#      Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#      Portions Copyright 2006 Sun Microsystems, Inc.
+#
+
+dn: cn=Default Password Policy,cn=Password Policies,cn=config
+changetype: modify
+replace: ds-cfg-default-password-storage-scheme
+ds-cfg-default-password-storage-scheme: SSHA384
diff --git a/opends/tests/functional-tests/shared/data/security/pwd_storage/admin_change_SSHA512.ldif b/opends/tests/functional-tests/shared/data/security/pwd_storage/admin_change_SSHA512.ldif
new file mode 100644
index 0000000..16e5206
--- /dev/null
+++ b/opends/tests/functional-tests/shared/data/security/pwd_storage/admin_change_SSHA512.ldif
@@ -0,0 +1,29 @@
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License").  You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE
+# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
+# add the following below this CDDL HEADER, with the fields enclosed
+# by brackets "[]" replaced with your own identifying * information:
+#      Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#      Portions Copyright 2006 Sun Microsystems, Inc.
+#
+
+dn: cn=Default Password Policy,cn=Password Policies,cn=config
+changetype: modify
+replace: ds-cfg-default-password-storage-scheme
+ds-cfg-default-password-storage-scheme: SSHA512
diff --git a/opends/tests/functional-tests/shared/data/security/pwd_storage/admin_reset_SSHA.ldif b/opends/tests/functional-tests/shared/data/security/pwd_storage/admin_reset_SSHA.ldif
new file mode 100644
index 0000000..455fc42
--- /dev/null
+++ b/opends/tests/functional-tests/shared/data/security/pwd_storage/admin_reset_SSHA.ldif
@@ -0,0 +1,29 @@
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License").  You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE
+# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
+# add the following below this CDDL HEADER, with the fields enclosed
+# by brackets "[]" replaced with your own identifying * information:
+#      Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#      Portions Copyright 2006 Sun Microsystems, Inc.
+#
+
+dn: cn=Default Password Policy,cn=Password Policies,cn=config
+changetype: modify
+replace: ds-cfg-default-password-storage-scheme
+ds-cfg-default-password-storage-scheme: SSHA
diff --git a/opends/tests/functional-tests/shared/data/security/pwd_storage/pwd_storage_startup.ldif b/opends/tests/functional-tests/shared/data/security/pwd_storage/pwd_storage_startup.ldif
new file mode 100644
index 0000000..a230200
--- /dev/null
+++ b/opends/tests/functional-tests/shared/data/security/pwd_storage/pwd_storage_startup.ldif
@@ -0,0 +1,348 @@
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License").  You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE
+# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
+# add the following below this CDDL HEADER, with the fields enclosed
+# by brackets "[]" replaced with your own identifying * information:
+#      Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#      Portions Copyright 2006 Sun Microsystems, Inc.
+#
+
+dn:  o=Pwd Storage Tests, dc=example,dc=com
+o: Pwd Storage Tests
+objectclass: top
+objectclass: organization
+
+dn: ou=password tests,  o=Pwd Storage Tests, dc=example,dc=com
+ou: password tests
+objectclass: top
+objectclass: organizationalunit
+
+dn: ou=Groups, ou=password tests,  o=Pwd Storage Tests, dc=example,dc=com
+objectclass: top
+objectclass: organizationalunit
+ou: Groups
+
+dn: cn=Directory Administrators, ou=Groups, ou=password tests,  o=Pwd Storage Tests, dc=example,dc=com
+cn: Directory Administrators
+objectclass: top
+objectclass: groupofuniquenames
+ou: Groups
+uniquemember: uid=kvaughan, ou=People, ou=password tests,  o=Pwd Storage Tests, dc=example,dc=com
+uniquemember: uid=rdaugherty, ou=People, ou=password tests,  o=Pwd Storage Tests, dc=example,dc=com
+uniquemember: uid=hmiller, ou=People, ou=password tests,  o=Pwd Storage Tests, dc=example,dc=com
+
+dn: ou=People, ou=password tests,  o=Pwd Storage Tests, dc=example,dc=com
+objectclass: top
+objectclass: organizationalunit
+ou: People
+
+dn: ou=Special Users,ou=password tests,  o=Pwd Storage Tests, dc=example,dc=com
+objectclass: top
+objectclass: organizationalUnit
+ou: Special Users
+description: Special Administrative Accounts
+
+dn: uid=scarter, ou=People, ou=password tests,  o=Pwd Storage Tests, dc=example,dc=com
+cn: Sam Carter
+sn: Carter
+givenname: Sam
+objectclass: top
+objectclass: person
+objectclass: organizationalPerson
+objectclass: inetOrgPerson
+ou: Accounting
+ou: People
+l: Sunnyvale
+uid: scarter
+mail: scarter@example.com
+telephonenumber: +1 408 555 4798
+facsimiletelephonenumber: +1 408 555 9751
+roomnumber: 4612
+userpassword: sprain
+
+dn: uid=tmorris, ou=People, ou=password tests,  o=Pwd Storage Tests, dc=example,dc=com
+cn: Ted Morris
+sn: Morris
+givenname: Ted
+objectclass: top
+objectclass: person
+objectclass: organizationalPerson
+objectclass: inetOrgPerson
+ou: Accounting
+ou: People
+l: Santa Clara
+uid: tmorris
+mail: tmorris@example.com
+telephonenumber: +1 408 555 9187
+facsimiletelephonenumber: +1 408 555 8473
+roomnumber: 4117
+userpassword: irrefutable
+
+dn: uid=kvaughan, ou=People, ou=password tests,  o=Pwd Storage Tests, dc=example,dc=com
+cn: Kirsten Vaughan
+sn: Vaughan
+givenname: Kirsten
+objectclass: top
+objectclass: person
+objectclass: organizationalPerson
+objectclass: inetOrgPerson
+ou: Human Resources
+ou: People
+l: Sunnyvale
+uid: kvaughan
+mail: kvaughan@example.com
+telephonenumber: +1 408 555 5625
+facsimiletelephonenumber: +1 408 555 3372
+roomnumber: 2871
+userpassword: bribery
+
+dn: uid=abergin, ou=People, ou=password tests,  o=Pwd Storage Tests, dc=example,dc=com
+cn: Andy Bergin
+sn: Bergin
+givenname: Andy
+objectclass: top
+objectclass: person
+objectclass: organizationalPerson
+objectclass: inetOrgPerson
+ou: Product Testing
+ou: People
+l: Cupertino
+uid: abergin
+mail: abergin@example.com
+telephonenumber: +1 408 555 8585
+facsimiletelephonenumber: +1 408 555 7472
+roomnumber: 3472
+userpassword: inflict
+
+dn: uid=dmiller, ou=People, ou=password tests,  o=Pwd Storage Tests, dc=example,dc=com
+cn: David Miller
+sn: Miller
+givenname: David
+objectclass: top
+objectclass: person
+objectclass: organizationalPerson
+objectclass: inetOrgPerson
+ou: Accounting
+ou: People
+l: Sunnyvale
+uid: dmiller
+mail: dmiller@example.com
+telephonenumber: +1 408 555 9423
+facsimiletelephonenumber: +1 408 555 0111
+roomnumber: 4135
+userpassword: gosling
+
+dn: uid=gfarmer, ou=People, ou=password tests,  o=Pwd Storage Tests, dc=example,dc=com
+cn: Gern Farmer
+sn: Farmer
+givenname: Gern
+objectclass: top
+objectclass: person
+objectclass: organizationalPerson
+objectclass: inetOrgPerson
+ou: Accounting
+ou: People
+l: Cupertino
+uid: gfarmer
+mail: gfarmer@example.com
+telephonenumber: +1 408 555 6201
+facsimiletelephonenumber: +1 408 555 8473
+roomnumber: 1269
+userpassword: ruling
+
+dn: uid=kwinters, ou=People, ou=password tests,  o=Pwd Storage Tests, dc=example,dc=com
+cn: Kelly Winters
+sn: Winters
+givenname: Kelly
+objectclass: top
+objectclass: person
+objectclass: organizationalPerson
+objectclass: inetOrgPerson
+ou: Product Development
+ou: People
+l: Santa Clara
+uid: kwinters
+mail: kwinters@example.com
+telephonenumber: +1 408 555 9069
+facsimiletelephonenumber: +1 408 555 1992
+roomnumber: 4178
+userpassword: forsook
+
+dn: uid=trigden, ou=People, ou=password tests,  o=Pwd Storage Tests, dc=example,dc=com
+cn: Torrey Rigden
+sn: Rigden
+givenname: Torrey
+objectclass: top
+objectclass: person
+objectclass: organizationalPerson
+objectclass: inetOrgPerson
+ou: Product Development
+ou: People
+l: Santa Clara
+uid: trigden
+mail: trigden@example.com
+telephonenumber: +1 408 555 9280
+facsimiletelephonenumber: +1 408 555 8473
+roomnumber: 3584
+userpassword: sensitive
+
+dn: uid=cschmith, ou=People, ou=password tests,  o=Pwd Storage Tests, dc=example,dc=com
+cn: Chris Schmith
+sn: Schmith
+givenname: Chris
+objectclass: top
+objectclass: person
+objectclass: organizationalPerson
+objectclass: inetOrgPerson
+ou: Human Resources
+ou: People
+l: Santa Clara
+uid: cschmith
+mail: cschmith@example.com
+telephonenumber: +1 408 555 8011
+facsimiletelephonenumber: +1 408 555 4774
+roomnumber: 0416
+userpassword: hypotenuse
+
+dn: uid=jwallace, ou=People, ou=password tests,  o=Pwd Storage Tests, dc=example,dc=com
+cn: Judy Wallace
+sn: Wallace
+givenname: Judy
+objectclass: top
+objectclass: person
+objectclass: organizationalPerson
+objectclass: inetOrgPerson
+ou: Accounting
+ou: People
+l: Sunnyvale
+uid: jwallace
+mail: jwallace@example.com
+telephonenumber: +1 408 555 0319
+facsimiletelephonenumber: +1 408 555 8473
+roomnumber: 1033
+userpassword: linear
+
+dn: uid=jwalker, ou=People, ou=password tests,  o=Pwd Storage Tests, dc=example,dc=com
+cn: John Walker
+sn: Walker
+givenname: John
+objectclass: top
+objectclass: person
+objectclass: organizationalPerson
+objectclass: inetOrgPerson
+ou: Product Testing
+ou: People
+l: Cupertino
+uid: jwalker
+mail: jwalker@example.com
+telephonenumber: +1 408 555 1476
+facsimiletelephonenumber: +1 408 555 1992
+roomnumber: 3915
+userpassword: dogleg
+
+dn: uid=tclow, ou=People, ou=password tests,  o=Pwd Storage Tests, dc=example,dc=com
+cn: Torrey Clow
+sn: Clow
+givenname: Torrey
+objectclass: top
+objectclass: person
+objectclass: organizationalPerson
+objectclass: inetOrgPerson
+ou: Human Resources
+ou: People
+l: Santa Clara
+uid: tclow
+mail: tclow@example.com
+telephonenumber: +1 408 555 8825
+facsimiletelephonenumber: +1 408 555 1992
+roomnumber: 4376
+userpassword: cardreader
+
+dn: uid=rdaugherty, ou=People, ou=password tests,  o=Pwd Storage Tests, dc=example,dc=com
+cn: Robert Daugherty
+sn: Daugherty
+givenname: Robert
+objectclass: top
+objectclass: person
+objectclass: organizationalPerson
+objectclass: inetOrgPerson
+ou: Human Resources
+ou: People
+l: Sunnyvale
+uid: rdaugherty
+mail: rdaugherty@example.com
+telephonenumber: +1 408 555 1296
+facsimiletelephonenumber: +1 408 555 1992
+roomnumber: 0194
+userpassword: apples
+
+dn: uid=jreuter, ou=People, ou=password tests,  o=Pwd Storage Tests, dc=example,dc=com
+cn: Jayne Reuter
+sn: Reuter
+givenname: Jayne
+objectclass: top
+objectclass: person
+objectclass: organizationalPerson
+objectclass: inetOrgPerson
+ou: Product Testing
+ou: People
+l: Cupertino
+uid: jreuter
+mail: jreuter@example.com
+telephonenumber: +1 408 555 1122
+facsimiletelephonenumber: +1 408 555 8721
+roomnumber: 2942
+userpassword: destroy
+
+dn: uid=tmason, ou=People, ou=password tests,  o=Pwd Storage Tests, dc=example,dc=com
+cn: Torrey Mason
+sn: Mason
+givenname: Torrey
+objectclass: top
+objectclass: person
+objectclass: organizationalPerson
+objectclass: inetOrgPerson
+ou: Human Resources
+ou: People
+l: Sunnyvale
+uid: tmason
+mail: tmason@example.com
+telephonenumber: +1 408 555 1596
+facsimiletelephonenumber: +1 408 555 9751
+roomnumber: 1124
+userpassword: squatted
+
+dn: uid=bhall, ou=People, ou=password tests,  o=Pwd Storage Tests, dc=example,dc=com
+cn: Benjamin Hall
+sn: Hall
+givenname: Benjamin
+objectclass: top
+objectclass: person
+objectclass: organizationalPerson
+objectclass: inetOrgPerson
+ou: Product Development
+ou: People
+l: Santa Clara
+uid: bhall
+mail: bhall@example.com
+telephonenumber: +1 408 555 6067
+facsimiletelephonenumber: +1 408 555 0111
+roomnumber: 2511
+userpassword: oranges
+
diff --git a/opends/tests/functional-tests/shared/data/security/pwd_storage/user_change_pwd_BASE64.ldif b/opends/tests/functional-tests/shared/data/security/pwd_storage/user_change_pwd_BASE64.ldif
new file mode 100644
index 0000000..c035538
--- /dev/null
+++ b/opends/tests/functional-tests/shared/data/security/pwd_storage/user_change_pwd_BASE64.ldif
@@ -0,0 +1,29 @@
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License").  You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE
+# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
+# add the following below this CDDL HEADER, with the fields enclosed
+# by brackets "[]" replaced with your own identifying * information:
+#      Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#      Portions Copyright 2006 Sun Microsystems, Inc.
+#
+
+dn: uid=jwallace,ou=People,ou=password tests,o=Pwd Storage Tests,dc=example,dc=com
+changetype: modify
+replace: userpassword
+userpassword: BASE64linear
diff --git a/opends/tests/functional-tests/shared/data/security/pwd_storage/user_change_pwd_CLEAR.ldif b/opends/tests/functional-tests/shared/data/security/pwd_storage/user_change_pwd_CLEAR.ldif
new file mode 100644
index 0000000..7afe7d9
--- /dev/null
+++ b/opends/tests/functional-tests/shared/data/security/pwd_storage/user_change_pwd_CLEAR.ldif
@@ -0,0 +1,29 @@
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License").  You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE
+# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
+# add the following below this CDDL HEADER, with the fields enclosed
+# by brackets "[]" replaced with your own identifying * information:
+#      Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#      Portions Copyright 2006 Sun Microsystems, Inc.
+#
+
+dn: uid=jwalker,ou=People,ou=password tests,o=Pwd Storage Tests,dc=example,dc=com
+changetype: modify
+replace: userpassword
+userpassword: CLEARdogleg
diff --git a/opends/tests/functional-tests/shared/data/security/pwd_storage/user_change_pwd_MD5.ldif b/opends/tests/functional-tests/shared/data/security/pwd_storage/user_change_pwd_MD5.ldif
new file mode 100644
index 0000000..8904f95
--- /dev/null
+++ b/opends/tests/functional-tests/shared/data/security/pwd_storage/user_change_pwd_MD5.ldif
@@ -0,0 +1,29 @@
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License").  You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE
+# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
+# add the following below this CDDL HEADER, with the fields enclosed
+# by brackets "[]" replaced with your own identifying * information:
+#      Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#      Portions Copyright 2006 Sun Microsystems, Inc.
+#
+
+dn: uid=kwinters,ou=People,ou=password tests,o=Pwd Storage Tests,dc=example,dc=com
+changetype: modify
+replace: userpassword
+userpassword: MD5forsook
diff --git a/opends/tests/functional-tests/shared/data/security/pwd_storage/user_change_pwd_SHA.ldif b/opends/tests/functional-tests/shared/data/security/pwd_storage/user_change_pwd_SHA.ldif
new file mode 100644
index 0000000..2bc3ccc
--- /dev/null
+++ b/opends/tests/functional-tests/shared/data/security/pwd_storage/user_change_pwd_SHA.ldif
@@ -0,0 +1,29 @@
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License").  You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE
+# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
+# add the following below this CDDL HEADER, with the fields enclosed
+# by brackets "[]" replaced with your own identifying * information:
+#      Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#      Portions Copyright 2006 Sun Microsystems, Inc.
+#
+
+dn: uid=tmorris,ou=People,ou=password tests,o=Pwd Storage Tests,dc=example,dc=com
+changetype: modify
+replace: userpassword
+userpassword: SHAirrefutable
diff --git a/opends/tests/functional-tests/shared/data/security/pwd_storage/user_change_pwd_SMD5.ldif b/opends/tests/functional-tests/shared/data/security/pwd_storage/user_change_pwd_SMD5.ldif
new file mode 100644
index 0000000..9d144a7
--- /dev/null
+++ b/opends/tests/functional-tests/shared/data/security/pwd_storage/user_change_pwd_SMD5.ldif
@@ -0,0 +1,29 @@
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License").  You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE
+# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
+# add the following below this CDDL HEADER, with the fields enclosed
+# by brackets "[]" replaced with your own identifying * information:
+#      Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#      Portions Copyright 2006 Sun Microsystems, Inc.
+#
+
+dn: uid=trigden,ou=People,ou=password tests,o=Pwd Storage Tests,dc=example,dc=com
+changetype: modify
+replace: userpassword
+userpassword: SMD5sensitive
diff --git a/opends/tests/functional-tests/shared/data/security/pwd_storage/user_change_pwd_SSHA.ldif b/opends/tests/functional-tests/shared/data/security/pwd_storage/user_change_pwd_SSHA.ldif
new file mode 100644
index 0000000..1fa4df6
--- /dev/null
+++ b/opends/tests/functional-tests/shared/data/security/pwd_storage/user_change_pwd_SSHA.ldif
@@ -0,0 +1,29 @@
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License").  You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE
+# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
+# add the following below this CDDL HEADER, with the fields enclosed
+# by brackets "[]" replaced with your own identifying * information:
+#      Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#      Portions Copyright 2006 Sun Microsystems, Inc.
+#
+
+dn: uid=scarter,ou=People,ou=password tests,o=Pwd Storage Tests,dc=example,dc=com
+changetype: modify
+replace: userpassword
+userpassword: SSHAsprain
diff --git a/opends/tests/functional-tests/shared/data/security/pwd_storage/user_change_pwd_SSHA256.ldif b/opends/tests/functional-tests/shared/data/security/pwd_storage/user_change_pwd_SSHA256.ldif
new file mode 100644
index 0000000..8ef19e0
--- /dev/null
+++ b/opends/tests/functional-tests/shared/data/security/pwd_storage/user_change_pwd_SSHA256.ldif
@@ -0,0 +1,29 @@
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License").  You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE
+# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
+# add the following below this CDDL HEADER, with the fields enclosed
+# by brackets "[]" replaced with your own identifying * information:
+#      Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#      Portions Copyright 2006 Sun Microsystems, Inc.
+#
+
+dn: uid=kvaughan,ou=People,ou=password tests,o=Pwd Storage Tests,dc=example,dc=com
+changetype: modify
+replace: userpassword
+userpassword: SSHA256bribery
diff --git a/opends/tests/functional-tests/shared/data/security/pwd_storage/user_change_pwd_SSHA384.ldif b/opends/tests/functional-tests/shared/data/security/pwd_storage/user_change_pwd_SSHA384.ldif
new file mode 100644
index 0000000..e87f9be
--- /dev/null
+++ b/opends/tests/functional-tests/shared/data/security/pwd_storage/user_change_pwd_SSHA384.ldif
@@ -0,0 +1,29 @@
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License").  You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE
+# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
+# add the following below this CDDL HEADER, with the fields enclosed
+# by brackets "[]" replaced with your own identifying * information:
+#      Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#      Portions Copyright 2006 Sun Microsystems, Inc.
+#
+
+dn: uid=dmiller,ou=People,ou=password tests,o=Pwd Storage Tests,dc=example,dc=com
+changetype: modify
+replace: userpassword
+userpassword: SSHA384gosling
diff --git a/opends/tests/functional-tests/shared/data/security/pwd_storage/user_change_pwd_SSHA512.ldif b/opends/tests/functional-tests/shared/data/security/pwd_storage/user_change_pwd_SSHA512.ldif
new file mode 100644
index 0000000..bf134ac
--- /dev/null
+++ b/opends/tests/functional-tests/shared/data/security/pwd_storage/user_change_pwd_SSHA512.ldif
@@ -0,0 +1,29 @@
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License").  You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE
+# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
+# add the following below this CDDL HEADER, with the fields enclosed
+# by brackets "[]" replaced with your own identifying * information:
+#      Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#      Portions Copyright 2006 Sun Microsystems, Inc.
+#
+
+dn: uid=gfarmer,ou=People,ou=password tests,o=Pwd Storage Tests,dc=example,dc=com
+changetype: modify
+replace: userpassword
+userpassword: SSHA512ruling
diff --git a/opends/tests/functional-tests/testcases/security/pwd_storage/security_pwd_BASE64.xml b/opends/tests/functional-tests/testcases/security/pwd_storage/security_pwd_BASE64.xml
new file mode 100755
index 0000000..837b17f
--- /dev/null
+++ b/opends/tests/functional-tests/testcases/security/pwd_storage/security_pwd_BASE64.xml
@@ -0,0 +1,150 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE stax SYSTEM "stax.dtd">
+<!---
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License").  You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE
+ * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
+ * add the following below this CDDL HEADER, with the fields enclosed
+ * by brackets "[]" replaced with your own identifying * information:
+ *      Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ *
+ *
+ *      Portions Copyright 2006 Sun Microsystems, Inc.
+ -->
+<stax>
+
+  <defaultcall function="pwd_BASE64"/>
+
+  <function name="pwd_BASE64">
+
+      <sequence>
+
+        <!--- Test case: Admin Change To BASE64 Storage Scheme -->
+        <testcase name="'Security: Pwd Storage BASE64: Preamble'">
+          <sequence>
+            <message>
+               'Security: Pwd Storage BASE64: Preamble - Admin Changing to BASE64 Storage Scheme'
+            </message>
+
+            <call function="'modifyEntry'">
+              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                'entryToBeModified'   : '%s/security/pwd_storage/admin_change_BASE64.ldif' % STAGED_DATA_DIR }
+            </call>
+
+            <call function="'checktestRC'">
+                { 'returncode' : RC ,
+                  'result'     : STAXResult }
+            </call>
+          </sequence>
+        </testcase>
+
+        <!--- Test Case : User Change Password BASE64 Scheme-->
+        <testcase name="'Security: Pwd Storage BASE64: Pwd Change'">
+          <sequence>
+            <message>
+               'Security: Pwd Storage BASE64: User Changing Password'
+            </message>
+
+            <call function="'modifyEntry'">
+              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                'dsInstanceDn'     : 'uid=jwallace,ou=people,ou=password tests,o=Pwd Storage Tests,dc=example,dc=com' ,
+                'dsInstancePswd'   : 'linear' ,
+                'entryToBeModified'   : '%s/security/pwd_storage/user_change_pwd_BASE64.ldif' % STAGED_DATA_DIR }
+            </call>
+
+            <if expr="RC != 0">
+                <tcstatus result="'fail'"/>
+            </if>
+
+            <message>
+               'Security: Pwd Storage BASE64: User Binding With New Password'
+            </message>
+
+            <call function="'SearchObject'">
+              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                'dsInstanceDn'     : 'uid=jwallace,ou=people,ou=password tests,o=Pwd Storage Tests,dc=example,dc=com' ,
+                'dsInstancePswd'   : 'BASE64linear' ,
+                'dsBaseDN'   : 'dc=example,dc=com' ,
+                'dsFilter'         : 'objectclass=*'  ,
+                'extraParams'      : '-s base' }
+            </call>
+
+            <if expr="RC != 0">
+                <tcstatus result="'fail'"/>
+            </if>
+
+            <message>
+               'Security: Pwd Storage BASE64: Checking for BASE64 Scheme On New Password'
+            </message>
+
+            <call function="'SearchObject'">
+              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                'dsBaseDN'         : 'uid=jwallace,ou=people,ou=password tests,o=Pwd Storage Tests,dc=example,dc=com' ,
+                'dsFilter'         : 'objectclass=*'  ,
+                'attributes'      : 'userpassword' }
+            </call>
+
+            <script> 
+             returnString = STAXResult[0][1]
+            </script> 
+
+            <call function="'checktestString'">
+                { 'returnString'       : returnString ,
+                  'expectedString'     : '{BASE64}' }
+            </call>
+          
+          </sequence>
+        </testcase>
+
+        <!--- Test case: Admin Reset To SSHA Storage Scheme -->
+        <testcase name="'Security: Pwd Storage BASE64: Postamble'">
+          <sequence>
+            <message>
+               'Security: Pwd Storage BASE64: Postamble - Admin Resetting to SSHA Storage Scheme'
+            </message>
+
+            <call function="'modifyEntry'">
+              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                'entryToBeModified'   : '%s/security/pwd_storage/admin_reset_SSHA.ldif' % STAGED_DATA_DIR }
+            </call>
+
+            <call function="'checktestRC'">
+                { 'returncode' : RC ,
+                  'result'     : STAXResult }
+            </call>
+          </sequence>
+        </testcase>
+
+        <return>RC</return>
+
+     </sequence>
+
+  </function>
+
+</stax>
diff --git a/opends/tests/functional-tests/testcases/security/pwd_storage/security_pwd_CLEAR.xml b/opends/tests/functional-tests/testcases/security/pwd_storage/security_pwd_CLEAR.xml
new file mode 100755
index 0000000..fa5b1b6
--- /dev/null
+++ b/opends/tests/functional-tests/testcases/security/pwd_storage/security_pwd_CLEAR.xml
@@ -0,0 +1,150 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE stax SYSTEM "stax.dtd">
+<!---
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License").  You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE
+ * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
+ * add the following below this CDDL HEADER, with the fields enclosed
+ * by brackets "[]" replaced with your own identifying * information:
+ *      Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ *
+ *
+ *      Portions Copyright 2006 Sun Microsystems, Inc.
+ -->
+<stax>
+
+  <defaultcall function="pwd_CLEAR"/>
+
+  <function name="pwd_CLEAR">
+
+      <sequence>
+
+        <!--- Test case: Admin Change To CLEAR Storage Scheme -->
+        <testcase name="'Security: Pwd Storage CLEAR: Preamble'">
+          <sequence>
+            <message>
+               'Security: Pwd Storage CLEAR: Preamble - Admin Changing to CLEAR Storage Scheme'
+            </message>
+
+            <call function="'modifyEntry'">
+              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                'entryToBeModified'   : '%s/security/pwd_storage/admin_change_CLEAR.ldif' % STAGED_DATA_DIR }
+            </call>
+
+            <call function="'checktestRC'">
+                { 'returncode' : RC ,
+                  'result'     : STAXResult }
+            </call>
+          </sequence>
+        </testcase>
+
+        <!--- Test Case : User Change Password CLEAR Scheme-->
+        <testcase name="'Security: Pwd Storage CLEAR: Pwd Change'">
+          <sequence>
+            <message>
+               'Security: Pwd Storage CLEAR: User Changing Password'
+            </message>
+
+            <call function="'modifyEntry'">
+              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                'dsInstanceDn'     : 'uid=jwalker,ou=people,ou=password tests,o=Pwd Storage Tests,dc=example,dc=com' ,
+                'dsInstancePswd'   : 'dogleg' ,
+                'entryToBeModified'   : '%s/security/pwd_storage/user_change_pwd_CLEAR.ldif' % STAGED_DATA_DIR }
+            </call>
+
+            <if expr="RC != 0">
+                <tcstatus result="'fail'"/>
+            </if>
+
+            <message>
+               'Security: Pwd Storage CLEAR: User Binding With New Password'
+            </message>
+
+            <call function="'SearchObject'">
+              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                'dsInstanceDn'     : 'uid=jwalker,ou=people,ou=password tests,o=Pwd Storage Tests,dc=example,dc=com' ,
+                'dsInstancePswd'   : 'CLEARdogleg' ,
+                'dsBaseDN'   : 'dc=example,dc=com' ,
+                'dsFilter'         : 'objectclass=*'  ,
+                'extraParams'      : '-s base' }
+            </call>
+
+            <if expr="RC != 0">
+                <tcstatus result="'fail'"/>
+            </if>
+
+            <message>
+               'Security: Pwd Storage CLEAR: Checking for CLEAR Scheme On New Password'
+            </message>
+
+            <call function="'SearchObject'">
+              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                'dsBaseDN'         : 'uid=jwalker,ou=people,ou=password tests,o=Pwd Storage Tests,dc=example,dc=com' ,
+                'dsFilter'         : 'objectclass=*'  ,
+                'attributes'      : 'userpassword' }
+            </call>
+
+            <script> 
+             returnString = STAXResult[0][1]
+            </script> 
+
+            <call function="'checktestString'">
+                { 'returnString'       : returnString ,
+                  'expectedString'     : '{CLEAR}' }
+            </call>
+          
+          </sequence>
+        </testcase>
+
+        <!--- Test case: Admin Reset To SSHA Storage Scheme -->
+        <testcase name="'Security: Pwd Storage CLEAR: Postamble'">
+          <sequence>
+            <message>
+               'Security: Pwd Storage CLEAR: Postamble - Admin Resetting to SSHA Storage Scheme'
+            </message>
+
+            <call function="'modifyEntry'">
+              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                'entryToBeModified'   : '%s/security/pwd_storage/admin_reset_SSHA.ldif' % STAGED_DATA_DIR }
+            </call>
+
+            <call function="'checktestRC'">
+                { 'returncode' : RC ,
+                  'result'     : STAXResult }
+            </call>
+          </sequence>
+        </testcase>
+
+        <return>RC</return>
+
+     </sequence>
+
+  </function>
+
+</stax>
diff --git a/opends/tests/functional-tests/testcases/security/pwd_storage/security_pwd_MD5.xml b/opends/tests/functional-tests/testcases/security/pwd_storage/security_pwd_MD5.xml
new file mode 100755
index 0000000..ded013b
--- /dev/null
+++ b/opends/tests/functional-tests/testcases/security/pwd_storage/security_pwd_MD5.xml
@@ -0,0 +1,150 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE stax SYSTEM "stax.dtd">
+<!---
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License").  You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE
+ * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
+ * add the following below this CDDL HEADER, with the fields enclosed
+ * by brackets "[]" replaced with your own identifying * information:
+ *      Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ *
+ *
+ *      Portions Copyright 2006 Sun Microsystems, Inc.
+ -->
+<stax>
+
+  <defaultcall function="pwd_MD5"/>
+
+  <function name="pwd_MD5">
+
+      <sequence>
+
+        <!--- Test case: Admin Change To MD5 Storage Scheme -->
+        <testcase name="'Security: Pwd Storage MD5: Preamble'">
+          <sequence>
+            <message>
+               'Security: Pwd Storage MD5: Preamble - Admin Changing to MD5 Storage Scheme'
+            </message>
+
+            <call function="'modifyEntry'">
+              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                'entryToBeModified'   : '%s/security/pwd_storage/admin_change_MD5.ldif' % STAGED_DATA_DIR }
+            </call>
+
+            <call function="'checktestRC'">
+                { 'returncode' : RC ,
+                  'result'     : STAXResult }
+            </call>
+          </sequence>
+        </testcase>
+
+        <!--- Test Case : User Change Password MD5 Scheme-->
+        <testcase name="'Security: Pwd Storage MD5: Pwd Change'">
+          <sequence>
+            <message>
+               'Security: Pwd Storage MD5: User Changing Password'
+            </message>
+
+            <call function="'modifyEntry'">
+              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                'dsInstanceDn'     : 'uid=kwinters,ou=people,ou=password tests,o=Pwd Storage Tests,dc=example,dc=com' ,
+                'dsInstancePswd'   : 'forsook' ,
+                'entryToBeModified'   : '%s/security/pwd_storage/user_change_pwd_MD5.ldif' % STAGED_DATA_DIR }
+            </call>
+
+            <if expr="RC != 0">
+                <tcstatus result="'fail'"/>
+            </if>
+
+            <message>
+               'Security: Pwd Storage MD5: User Binding With New Password'
+            </message>
+
+            <call function="'SearchObject'">
+              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                'dsInstanceDn'     : 'uid=kwinters,ou=people,ou=password tests,o=Pwd Storage Tests,dc=example,dc=com' ,
+                'dsInstancePswd'   : 'MD5forsook' ,
+                'dsBaseDN'   : 'dc=example,dc=com' ,
+                'dsFilter'         : 'objectclass=*'  ,
+                'extraParams'      : '-s base' }
+            </call>
+
+            <if expr="RC != 0">
+                <tcstatus result="'fail'"/>
+            </if>
+
+            <message>
+               'Security: Pwd Storage MD5: Checking for MD5 Scheme On New Password'
+            </message>
+
+            <call function="'SearchObject'">
+              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                'dsBaseDN'         : 'uid=kwinters,ou=people,ou=password tests,o=Pwd Storage Tests,dc=example,dc=com' ,
+                'dsFilter'         : 'objectclass=*'  ,
+                'attributes'      : 'userpassword' }
+            </call>
+
+            <script> 
+             returnString = STAXResult[0][1]
+            </script> 
+
+            <call function="'checktestString'">
+                { 'returnString'       : returnString ,
+                  'expectedString'     : '{MD5}' }
+            </call>
+          
+          </sequence>
+        </testcase>
+
+        <!--- Test case: Admin Reset To SSHA Storage Scheme -->
+        <testcase name="'Security: Pwd Storage MD5: Postamble'">
+          <sequence>
+            <message>
+               'Security: Pwd Storage MD5: Postamble - Admin Resetting to SSHA Storage Scheme'
+            </message>
+
+            <call function="'modifyEntry'">
+              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                'entryToBeModified'   : '%s/security/pwd_storage/admin_reset_SSHA.ldif' % STAGED_DATA_DIR }
+            </call>
+
+            <call function="'checktestRC'">
+                { 'returncode' : RC ,
+                  'result'     : STAXResult }
+            </call>
+          </sequence>
+        </testcase>
+
+        <return>RC</return>
+
+     </sequence>
+
+  </function>
+
+</stax>
diff --git a/opends/tests/functional-tests/testcases/security/pwd_storage/security_pwd_SHA.xml b/opends/tests/functional-tests/testcases/security/pwd_storage/security_pwd_SHA.xml
new file mode 100755
index 0000000..9f31ad6
--- /dev/null
+++ b/opends/tests/functional-tests/testcases/security/pwd_storage/security_pwd_SHA.xml
@@ -0,0 +1,150 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE stax SYSTEM "stax.dtd">
+<!---
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License").  You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE
+ * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
+ * add the following below this CDDL HEADER, with the fields enclosed
+ * by brackets "[]" replaced with your own identifying * information:
+ *      Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ *
+ *
+ *      Portions Copyright 2006 Sun Microsystems, Inc.
+ -->
+<stax>
+
+  <defaultcall function="pwd_SHA"/>
+
+  <function name="pwd_SHA">
+
+      <sequence>
+
+        <!--- Test case: Admin Change To SHA Storage Scheme -->
+        <testcase name="'Security: Pwd Storage SHA: Preamble'">
+          <sequence>
+            <message>
+               'Security: Pwd Storage SHA: Preamble - Admin Changing to SHA Storage Scheme'
+            </message>
+
+            <call function="'modifyEntry'">
+              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                'entryToBeModified'   : '%s/security/pwd_storage/admin_change_SHA.ldif' % STAGED_DATA_DIR }
+            </call>
+
+            <call function="'checktestRC'">
+                { 'returncode' : RC ,
+                  'result'     : STAXResult }
+            </call>
+          </sequence>
+        </testcase>
+
+        <!--- Test Case : User Change Password SHA Scheme-->
+        <testcase name="'Security: Pwd Storage SHA: Pwd Change'">
+          <sequence>
+            <message>
+               'Security: Pwd Storage SHA: User Changing Password'
+            </message>
+
+            <call function="'modifyEntry'">
+              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                'dsInstanceDn'     : 'uid=tmorris,ou=people,ou=password tests,o=Pwd Storage Tests,dc=example,dc=com' ,
+                'dsInstancePswd'   : 'irrefutable' ,
+                'entryToBeModified'   : '%s/security/pwd_storage/user_change_pwd_SHA.ldif' % STAGED_DATA_DIR }
+            </call>
+
+            <if expr="RC != 0">
+                <tcstatus result="'fail'"/>
+            </if>
+
+            <message>
+               'Security: Pwd Storage SHA: User Binding With New Password'
+            </message>
+
+            <call function="'SearchObject'">
+              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                'dsInstanceDn'     : 'uid=tmorris,ou=people,ou=password tests,o=Pwd Storage Tests,dc=example,dc=com' ,
+                'dsInstancePswd'   : 'SHAirrefutable' ,
+                'dsBaseDN'   : 'dc=example,dc=com' ,
+                'dsFilter'         : 'objectclass=*'  ,
+                'extraParams'      : '-s base' }
+            </call>
+
+            <if expr="RC != 0">
+                <tcstatus result="'fail'"/>
+            </if>
+
+            <message>
+               'Security: Pwd Storage SHA: Checking for SHA Scheme On New Password'
+            </message>
+
+            <call function="'SearchObject'">
+              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                'dsBaseDN'         : 'uid=tmorris,ou=people,ou=password tests,o=Pwd Storage Tests,dc=example,dc=com' ,
+                'dsFilter'         : 'objectclass=*'  ,
+                'attributes'      : 'userpassword' }
+            </call>
+
+            <script> 
+             returnString = STAXResult[0][1]
+            </script> 
+
+            <call function="'checktestString'">
+                { 'returnString'       : returnString ,
+                  'expectedString'     : '{SHA}' }
+            </call>
+          
+          </sequence>
+        </testcase>
+
+        <!--- Test case: Admin Reset To SSHA Storage Scheme -->
+        <testcase name="'Security: Pwd Storage SHA: Postamble'">
+          <sequence>
+            <message>
+               'Security: Pwd Storage SHA: Postamble - Admin Resetting to SSHA Storage Scheme'
+            </message>
+
+            <call function="'modifyEntry'">
+              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                'entryToBeModified'   : '%s/security/pwd_storage/admin_reset_SSHA.ldif' % STAGED_DATA_DIR }
+            </call>
+
+            <call function="'checktestRC'">
+                { 'returncode' : RC ,
+                  'result'     : STAXResult }
+            </call>
+          </sequence>
+        </testcase>
+
+        <return>RC</return>
+
+     </sequence>
+
+  </function>
+
+</stax>
diff --git a/opends/tests/functional-tests/testcases/security/pwd_storage/security_pwd_SMD5.xml b/opends/tests/functional-tests/testcases/security/pwd_storage/security_pwd_SMD5.xml
new file mode 100755
index 0000000..cf269cc
--- /dev/null
+++ b/opends/tests/functional-tests/testcases/security/pwd_storage/security_pwd_SMD5.xml
@@ -0,0 +1,150 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE stax SYSTEM "stax.dtd">
+<!---
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License").  You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE
+ * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
+ * add the following below this CDDL HEADER, with the fields enclosed
+ * by brackets "[]" replaced with your own identifying * information:
+ *      Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ *
+ *
+ *      Portions Copyright 2006 Sun Microsystems, Inc.
+ -->
+<stax>
+
+  <defaultcall function="pwd_SMD5"/>
+
+  <function name="pwd_SMD5">
+
+      <sequence>
+
+        <!--- Test case: Admin Change To SMD5 Storage Scheme -->
+        <testcase name="'Security: Pwd Storage SMD5: Preamble'">
+          <sequence>
+            <message>
+               'Security: Pwd Storage SMD5: Preamble - Admin Changing to SMD5 Storage Scheme'
+            </message>
+
+            <call function="'modifyEntry'">
+              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                'entryToBeModified'   : '%s/security/pwd_storage/admin_change_SMD5.ldif' % STAGED_DATA_DIR }
+            </call>
+
+            <call function="'checktestRC'">
+                { 'returncode' : RC ,
+                  'result'     : STAXResult }
+            </call>
+          </sequence>
+        </testcase>
+
+        <!--- Test Case : User Change Password SMD5 Scheme-->
+        <testcase name="'Security: Pwd Storage SMD5: Pwd Change'">
+          <sequence>
+            <message>
+               'Security: Pwd Storage SMD5: User Changing Password'
+            </message>
+
+            <call function="'modifyEntry'">
+              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                'dsInstanceDn'     : 'uid=trigden,ou=people,ou=password tests,o=Pwd Storage Tests,dc=example,dc=com' ,
+                'dsInstancePswd'   : 'sensitive' ,
+                'entryToBeModified'   : '%s/security/pwd_storage/user_change_pwd_SMD5.ldif' % STAGED_DATA_DIR }
+            </call>
+
+            <if expr="RC != 0">
+                <tcstatus result="'fail'"/>
+            </if>
+
+            <message>
+               'Security: Pwd Storage SMD5: User Binding With New Password'
+            </message>
+
+            <call function="'SearchObject'">
+              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                'dsInstanceDn'     : 'uid=trigden,ou=people,ou=password tests,o=Pwd Storage Tests,dc=example,dc=com' ,
+                'dsInstancePswd'   : 'SMD5sensitive' ,
+                'dsBaseDN'   : 'dc=example,dc=com' ,
+                'dsFilter'         : 'objectclass=*'  ,
+                'extraParams'      : '-s base' }
+            </call>
+
+            <if expr="RC != 0">
+                <tcstatus result="'fail'"/>
+            </if>
+
+            <message>
+               'Security: Pwd Storage SMD5: Checking for SMD5 Scheme On New Password'
+            </message>
+
+            <call function="'SearchObject'">
+              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                'dsBaseDN'         : 'uid=trigden,ou=people,ou=password tests,o=Pwd Storage Tests,dc=example,dc=com' ,
+                'dsFilter'         : 'objectclass=*'  ,
+                'attributes'      : 'userpassword' }
+            </call>
+
+            <script> 
+             returnString = STAXResult[0][1]
+            </script> 
+
+            <call function="'checktestString'">
+                { 'returnString'       : returnString ,
+                  'expectedString'     : '{SMD5}' }
+            </call>
+          
+          </sequence>
+        </testcase>
+
+        <!--- Test case: Admin Reset To SSHA Storage Scheme -->
+        <testcase name="'Security: Pwd Storage SMD5: Postamble'">
+          <sequence>
+            <message>
+               'Security: Pwd Storage SMD5: Postamble - Admin Resetting to SSHA Storage Scheme'
+            </message>
+
+            <call function="'modifyEntry'">
+              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                'entryToBeModified'   : '%s/security/pwd_storage/admin_reset_SSHA.ldif' % STAGED_DATA_DIR }
+            </call>
+
+            <call function="'checktestRC'">
+                { 'returncode' : RC ,
+                  'result'     : STAXResult }
+            </call>
+          </sequence>
+        </testcase>
+
+        <return>RC</return>
+
+     </sequence>
+
+  </function>
+
+</stax>
diff --git a/opends/tests/functional-tests/testcases/security/pwd_storage/security_pwd_SSHA.xml b/opends/tests/functional-tests/testcases/security/pwd_storage/security_pwd_SSHA.xml
new file mode 100755
index 0000000..74425c7
--- /dev/null
+++ b/opends/tests/functional-tests/testcases/security/pwd_storage/security_pwd_SSHA.xml
@@ -0,0 +1,180 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE stax SYSTEM "stax.dtd">
+<!---
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License").  You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE
+ * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
+ * add the following below this CDDL HEADER, with the fields enclosed
+ * by brackets "[]" replaced with your own identifying * information:
+ *      Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ *
+ *
+ *      Portions Copyright 2006 Sun Microsystems, Inc.
+ -->
+<stax>
+
+  <defaultcall function="pwd_SSHA"/>
+
+  <function name="pwd_SSHA">
+
+      <sequence>
+
+        <!--- Admin Check Existence of ds-cfg-default-password-storage-scheme Attr -->
+        <testcase name="'Security: Pwd Storage SSHA: Preamble'">
+          <sequence>
+            <message>
+               'Security: Pwd Storage SSHA: Preamble - Checking existence of ds-cfg-default-password-storage-scheme'
+            </message>
+
+            <call function="'compareEntry'">
+              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                'attrToBeCompared'   : 'ds-cfg-default-password-storage-scheme:SSHA',
+                'entryToBeCompared'   : 'cn=Default Password Policy,cn=Password Policies,cn=config' }
+            </call>
+
+            <call function="'checktestRC'">
+                { 'returncode' : RC ,
+                  'result'     : STAXResult }
+            </call>
+          </sequence>
+        </testcase>
+
+        <!--- Test Case : Default SSHA Scheme-->
+        <testcase name="'Security: Pwd Storage SSHA: Default SSHA Scheme'">
+          <sequence>
+            <message>
+               'Security: Pwd Storage SSHA: Default SSHA Scheme'
+            </message>
+
+            <call function="'SearchObject'">
+              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                'dsBaseDN'         : 'uid=scarter,ou=people,ou=password tests,o=Pwd Storage Tests,dc=example,dc=com' ,
+                'dsFilter'         : 'objectclass=*'  ,
+                'attributes'      : 'userpassword' }
+            </call>
+
+            <script> 
+             returnString = STAXResult[0][1]
+            </script> 
+
+            <call function="'checktestString'">
+                { 'returnString'       : returnString ,
+                  'expectedString'     : '{SSHA}' }
+            </call>
+          </sequence>
+        </testcase>
+
+        <!--- Test Case : User Change Password SSHA Scheme-->
+        <testcase name="'Security: Pwd Storage SSHA: Pwd Change'">
+          <sequence>
+            <message>
+               'Security: Pwd Storage SSHA: User Changing Password'
+            </message>
+
+            <call function="'modifyEntry'">
+              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                'dsInstanceDn'     : 'uid=scarter,ou=people,ou=password tests,o=Pwd Storage Tests,dc=example,dc=com' ,
+                'dsInstancePswd'   : 'sprain' ,
+                'entryToBeModified'   : '%s/security/pwd_storage/user_change_pwd_SSHA.ldif' % STAGED_DATA_DIR }
+            </call>
+
+            <if expr="RC != 0">
+                <tcstatus result="'fail'"/>
+            </if>
+
+            <message>
+               'Security: Pwd Storage SSHA: User Binding With New Password'
+            </message>
+
+            <call function="'SearchObject'">
+              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                'dsInstanceDn'     : 'uid=scarter,ou=people,ou=password tests,o=Pwd Storage Tests,dc=example,dc=com' ,
+                'dsInstancePswd'   : 'SSHAsprain' ,
+                'dsBaseDN'   : 'dc=example,dc=com' ,
+                'dsFilter'         : 'objectclass=*'  ,
+                'extraParams'      : '-s base' }
+            </call>
+
+            <if expr="RC != 0">
+                <tcstatus result="'fail'"/>
+            </if>
+
+            <message>
+               'Security: Pwd Storage SSHA: Checking for SSHA Scheme On New Password'
+            </message>
+
+            <call function="'SearchObject'">
+              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                'dsBaseDN'         : 'uid=scarter,ou=people,ou=password tests,o=Pwd Storage Tests,dc=example,dc=com' ,
+                'dsFilter'         : 'objectclass=*'  ,
+                'attributes'      : 'userpassword' }
+            </call>
+
+            <script> 
+             returnString = STAXResult[0][1]
+            </script> 
+
+            <call function="'checktestString'">
+                { 'returnString'       : returnString ,
+                  'expectedString'     : '{SSHA}' }
+            </call>
+          
+          </sequence>
+        </testcase>
+
+        <!--- Test Case : User Change Password SSHA Scheme-->
+        <testcase name="'Security: Pwd Storage SSHA: Unsupported Scheme'">
+          <sequence>
+            <message>
+               'Security: Pwd Storage SSHA: Admin Changing to Unsupported Scheme'
+            </message>
+
+            <call function="'modifyEntry'">
+              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                'entryToBeModified'   : '%s/security/pwd_storage/admin_change_BAD.ldif' % STAGED_DATA_DIR }
+            </call>
+
+            <call function="'checktestRC'">
+                { 'returncode' : RC ,
+                  'result'     : STAXResult ,
+                  'expected'   : 53 }
+            </call>
+          </sequence>
+        </testcase>
+
+        <return>RC</return>
+
+     </sequence>
+
+  </function>
+
+</stax>
diff --git a/opends/tests/functional-tests/testcases/security/pwd_storage/security_pwd_SSHA256.xml b/opends/tests/functional-tests/testcases/security/pwd_storage/security_pwd_SSHA256.xml
new file mode 100755
index 0000000..41c06c4
--- /dev/null
+++ b/opends/tests/functional-tests/testcases/security/pwd_storage/security_pwd_SSHA256.xml
@@ -0,0 +1,150 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE stax SYSTEM "stax.dtd">
+<!---
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License").  You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE
+ * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
+ * add the following below this CDDL HEADER, with the fields enclosed
+ * by brackets "[]" replaced with your own identifying * information:
+ *      Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ *
+ *
+ *      Portions Copyright 2006 Sun Microsystems, Inc.
+ -->
+<stax>
+
+  <defaultcall function="pwd_SSHA256"/>
+
+  <function name="pwd_SSHA256">
+
+      <sequence>
+
+        <!--- Test case: Admin Change To SSHA256 Storage Scheme -->
+        <testcase name="'Security: Pwd Storage SSHA256: Preamble'">
+          <sequence>
+            <message>
+               'Security: Pwd Storage SSHA256: Preamble - Admin Changing to SSHA256 Storage Scheme'
+            </message>
+
+            <call function="'modifyEntry'">
+              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                'entryToBeModified'   : '%s/security/pwd_storage/admin_change_SSHA256.ldif' % STAGED_DATA_DIR }
+            </call>
+
+            <call function="'checktestRC'">
+                { 'returncode' : RC ,
+                  'result'     : STAXResult }
+            </call>
+          </sequence>
+        </testcase>
+
+        <!--- Test Case : User Change Password SSHA256 Scheme-->
+        <testcase name="'Security: Pwd Storage SSHA256: Pwd Change'">
+          <sequence>
+            <message>
+               'Security: Pwd Storage SSHA256: User Changing Password'
+            </message>
+
+            <call function="'modifyEntry'">
+              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                'dsInstanceDn'     : 'uid=kvaughan,ou=people,ou=password tests,o=Pwd Storage Tests,dc=example,dc=com' ,
+                'dsInstancePswd'   : 'bribery' ,
+                'entryToBeModified'   : '%s/security/pwd_storage/user_change_pwd_SSHA256.ldif' % STAGED_DATA_DIR }
+            </call>
+
+            <if expr="RC != 0">
+                <tcstatus result="'fail'"/>
+            </if>
+
+            <message>
+               'Security: Pwd Storage SSHA256: User Binding With New Password'
+            </message>
+
+            <call function="'SearchObject'">
+              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                'dsInstanceDn'     : 'uid=kvaughan,ou=people,ou=password tests,o=Pwd Storage Tests,dc=example,dc=com' ,
+                'dsInstancePswd'   : 'SSHA256bribery' ,
+                'dsBaseDN'   : 'dc=example,dc=com' ,
+                'dsFilter'         : 'objectclass=*'  ,
+                'extraParams'      : '-s base' }
+            </call>
+
+            <if expr="RC != 0">
+                <tcstatus result="'fail'"/>
+            </if>
+
+            <message>
+               'Security: Pwd Storage SSHA256: Checking for SSHA256 Scheme On New Password'
+            </message>
+
+            <call function="'SearchObject'">
+              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                'dsBaseDN'         : 'uid=kvaughan,ou=people,ou=password tests,o=Pwd Storage Tests,dc=example,dc=com' ,
+                'dsFilter'         : 'objectclass=*'  ,
+                'attributes'      : 'userpassword' }
+            </call>
+
+            <script> 
+             returnString = STAXResult[0][1]
+            </script> 
+
+            <call function="'checktestString'">
+                { 'returnString'       : returnString ,
+                  'expectedString'     : '{SSHA256}' }
+            </call>
+          
+          </sequence>
+        </testcase>
+
+        <!--- Test case: Admin Reset To SSHA Storage Scheme -->
+        <testcase name="'Security: Pwd Storage SSHA256: Postamble'">
+          <sequence>
+            <message>
+               'Security: Pwd Storage SSHA256: Postamble - Admin Resetting to SSHA Storage Scheme'
+            </message>
+
+            <call function="'modifyEntry'">
+              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                'entryToBeModified'   : '%s/security/pwd_storage/admin_reset_SSHA.ldif' % STAGED_DATA_DIR }
+            </call>
+
+            <call function="'checktestRC'">
+                { 'returncode' : RC ,
+                  'result'     : STAXResult }
+            </call>
+          </sequence>
+        </testcase>
+
+        <return>RC</return>
+
+     </sequence>
+
+  </function>
+
+</stax>
diff --git a/opends/tests/functional-tests/testcases/security/pwd_storage/security_pwd_SSHA384.xml b/opends/tests/functional-tests/testcases/security/pwd_storage/security_pwd_SSHA384.xml
new file mode 100755
index 0000000..22451c0
--- /dev/null
+++ b/opends/tests/functional-tests/testcases/security/pwd_storage/security_pwd_SSHA384.xml
@@ -0,0 +1,150 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE stax SYSTEM "stax.dtd">
+<!---
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License").  You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE
+ * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
+ * add the following below this CDDL HEADER, with the fields enclosed
+ * by brackets "[]" replaced with your own identifying * information:
+ *      Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ *
+ *
+ *      Portions Copyright 2006 Sun Microsystems, Inc.
+ -->
+<stax>
+
+  <defaultcall function="pwd_SSHA384"/>
+
+  <function name="pwd_SSHA384">
+
+      <sequence>
+
+        <!--- Test case: Admin Change To SSHA384 Storage Scheme -->
+        <testcase name="'Security: Pwd Storage SSHA384: Preamble'">
+          <sequence>
+            <message>
+               'Security: Pwd Storage SSHA384: Preamble - Admin Changing to SSHA384 Storage Scheme'
+            </message>
+
+            <call function="'modifyEntry'">
+              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                'entryToBeModified'   : '%s/security/pwd_storage/admin_change_SSHA384.ldif' % STAGED_DATA_DIR }
+            </call>
+
+            <call function="'checktestRC'">
+                { 'returncode' : RC ,
+                  'result'     : STAXResult }
+            </call>
+          </sequence>
+        </testcase>
+
+        <!--- Test Case : User Change Password SSHA384 Scheme-->
+        <testcase name="'Security: Pwd Storage SSHA384: Pwd Change'">
+          <sequence>
+            <message>
+               'Security: Pwd Storage SSHA384: User Changing Password'
+            </message>
+
+            <call function="'modifyEntry'">
+              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                'dsInstanceDn'     : 'uid=dmiller,ou=people,ou=password tests,o=Pwd Storage Tests,dc=example,dc=com' ,
+                'dsInstancePswd'   : 'gosling' ,
+                'entryToBeModified'   : '%s/security/pwd_storage/user_change_pwd_SSHA384.ldif' % STAGED_DATA_DIR }
+            </call>
+
+            <if expr="RC != 0">
+                <tcstatus result="'fail'"/>
+            </if>
+
+            <message>
+               'Security: Pwd Storage SSHA384: User Binding With New Password'
+            </message>
+
+            <call function="'SearchObject'">
+              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                'dsInstanceDn'     : 'uid=dmiller,ou=people,ou=password tests,o=Pwd Storage Tests,dc=example,dc=com' ,
+                'dsInstancePswd'   : 'SSHA384gosling' ,
+                'dsBaseDN'   : 'dc=example,dc=com' ,
+                'dsFilter'         : 'objectclass=*'  ,
+                'extraParams'      : '-s base' }
+            </call>
+
+            <if expr="RC != 0">
+                <tcstatus result="'fail'"/>
+            </if>
+
+            <message>
+               'Security: Pwd Storage SSHA384: Checking for SSHA384 Scheme On New Password'
+            </message>
+
+            <call function="'SearchObject'">
+              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                'dsBaseDN'         : 'uid=dmiller,ou=people,ou=password tests,o=Pwd Storage Tests,dc=example,dc=com' ,
+                'dsFilter'         : 'objectclass=*'  ,
+                'attributes'      : 'userpassword' }
+            </call>
+
+            <script> 
+             returnString = STAXResult[0][1]
+            </script> 
+
+            <call function="'checktestString'">
+                { 'returnString'       : returnString ,
+                  'expectedString'     : '{SSHA384}' }
+            </call>
+          
+          </sequence>
+        </testcase>
+
+        <!--- Test case: Admin Reset To SSHA Storage Scheme -->
+        <testcase name="'Security: Pwd Storage SSHA384: Postamble'">
+          <sequence>
+            <message>
+               'Security: Pwd Storage SSHA384: Postamble - Admin Resetting to SSHA Storage Scheme'
+            </message>
+
+            <call function="'modifyEntry'">
+              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                'entryToBeModified'   : '%s/security/pwd_storage/admin_reset_SSHA.ldif' % STAGED_DATA_DIR }
+            </call>
+
+            <call function="'checktestRC'">
+                { 'returncode' : RC ,
+                  'result'     : STAXResult }
+            </call>
+          </sequence>
+        </testcase>
+
+        <return>RC</return>
+
+     </sequence>
+
+  </function>
+
+</stax>
diff --git a/opends/tests/functional-tests/testcases/security/pwd_storage/security_pwd_SSHA512.xml b/opends/tests/functional-tests/testcases/security/pwd_storage/security_pwd_SSHA512.xml
new file mode 100755
index 0000000..a92ae58
--- /dev/null
+++ b/opends/tests/functional-tests/testcases/security/pwd_storage/security_pwd_SSHA512.xml
@@ -0,0 +1,150 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE stax SYSTEM "stax.dtd">
+<!---
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License").  You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE
+ * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
+ * add the following below this CDDL HEADER, with the fields enclosed
+ * by brackets "[]" replaced with your own identifying * information:
+ *      Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ *
+ *
+ *      Portions Copyright 2006 Sun Microsystems, Inc.
+ -->
+<stax>
+
+  <defaultcall function="pwd_SSHA512"/>
+
+  <function name="pwd_SSHA512">
+
+      <sequence>
+
+        <!--- Test case: Admin Change To SSHA512 Storage Scheme -->
+        <testcase name="'Security: Pwd Storage SSHA512: Preamble'">
+          <sequence>
+            <message>
+               'Security: Pwd Storage SSHA512: Preamble - Admin Changing to SSHA512 Storage Scheme'
+            </message>
+
+            <call function="'modifyEntry'">
+              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                'entryToBeModified'   : '%s/security/pwd_storage/admin_change_SSHA512.ldif' % STAGED_DATA_DIR }
+            </call>
+
+            <call function="'checktestRC'">
+                { 'returncode' : RC ,
+                  'result'     : STAXResult }
+            </call>
+          </sequence>
+        </testcase>
+
+        <!--- Test Case : User Change Password SSHA512 Scheme-->
+        <testcase name="'Security: Pwd Storage SSHA512: Pwd Change'">
+          <sequence>
+            <message>
+               'Security: Pwd Storage SSHA512: User Changing Password'
+            </message>
+
+            <call function="'modifyEntry'">
+              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                'dsInstanceDn'     : 'uid=gfarmer,ou=people,ou=password tests,o=Pwd Storage Tests,dc=example,dc=com' ,
+                'dsInstancePswd'   : 'ruling' ,
+                'entryToBeModified'   : '%s/security/pwd_storage/user_change_pwd_SSHA512.ldif' % STAGED_DATA_DIR }
+            </call>
+
+            <if expr="RC != 0">
+                <tcstatus result="'fail'"/>
+            </if>
+
+            <message>
+               'Security: Pwd Storage SSHA512: User Binding With New Password'
+            </message>
+
+            <call function="'SearchObject'">
+              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                'dsInstanceDn'     : 'uid=gfarmer,ou=people,ou=password tests,o=Pwd Storage Tests,dc=example,dc=com' ,
+                'dsInstancePswd'   : 'SSHA512ruling' ,
+                'dsBaseDN'   : 'dc=example,dc=com' ,
+                'dsFilter'         : 'objectclass=*'  ,
+                'extraParams'      : '-s base' }
+            </call>
+
+            <if expr="RC != 0">
+                <tcstatus result="'fail'"/>
+            </if>
+
+            <message>
+               'Security: Pwd Storage SSHA512: Checking for SSHA512 Scheme On New Password'
+            </message>
+
+            <call function="'SearchObject'">
+              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                'dsBaseDN'         : 'uid=gfarmer,ou=people,ou=password tests,o=Pwd Storage Tests,dc=example,dc=com' ,
+                'dsFilter'         : 'objectclass=*'  ,
+                'attributes'      : 'userpassword' }
+            </call>
+
+            <script> 
+             returnString = STAXResult[0][1]
+            </script> 
+
+            <call function="'checktestString'">
+                { 'returnString'       : returnString ,
+                  'expectedString'     : '{SSHA512}' }
+            </call>
+          
+          </sequence>
+        </testcase>
+
+        <!--- Test case: Admin Reset To SSHA Storage Scheme -->
+        <testcase name="'Security: Pwd Storage SSHA512: Postamble'">
+          <sequence>
+            <message>
+               'Security: Pwd Storage SSHA512: Postamble - Admin Resetting to SSHA Storage Scheme'
+            </message>
+
+            <call function="'modifyEntry'">
+              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                'entryToBeModified'   : '%s/security/pwd_storage/admin_reset_SSHA.ldif' % STAGED_DATA_DIR }
+            </call>
+
+            <call function="'checktestRC'">
+                { 'returncode' : RC ,
+                  'result'     : STAXResult }
+            </call>
+          </sequence>
+        </testcase>
+
+        <return>RC</return>
+
+     </sequence>
+
+  </function>
+
+</stax>
diff --git a/opends/tests/functional-tests/testcases/security/pwd_storage/security_pwd_storage.xml b/opends/tests/functional-tests/testcases/security/pwd_storage/security_pwd_storage.xml
new file mode 100755
index 0000000..eead1c4
--- /dev/null
+++ b/opends/tests/functional-tests/testcases/security/pwd_storage/security_pwd_storage.xml
@@ -0,0 +1,140 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE stax SYSTEM "stax.dtd">
+<!---
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License").  You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE
+ * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
+ * add the following below this CDDL HEADER, with the fields enclosed
+ * by brackets "[]" replaced with your own identifying * information:
+ *      Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ *
+ *
+ *      Portions Copyright 2006 Sun Microsystems, Inc.
+ -->
+<stax>
+
+  <defaultcall function="security_pwd_storage"/>
+
+  <function name="security_pwd_storage">
+
+      <sequence>
+
+<parallel>
+    <block name="'Block DS Process Active'">
+
+      <!--- Start DS -->
+      <sequence>
+        <message>
+           'Start DS to run on port %s' % (DIRECTORY_INSTANCE_PORT)
+        </message>
+
+        <!--- Start DS -->
+        <call function="'startDS'">
+          { 'dsbinpath' : '%s' % (OPENDS_BINPATH) }
+        </call>
+
+        <call function="'checkRC'">
+            { 'returncode' : RC ,
+              'result'     : STAXResult }
+        </call>
+
+      </sequence>
+
+     <!--- End Block DS Process Active -->
+     </block>
+
+     <block name="'Block Clients'">
+
+      <sequence>
+
+        <!--- Check that DS started -->
+        <call function="'isAlive'">
+          { 'noOfLoops'        : 5 ,
+            'noOfMilliSeconds' : 2000 }
+        </call>
+
+        <import machine="'%s' % (STAF_LOCAL_HOSTNAME)"
+          file="'%s/testcases/security/pwd_storage/security_setup_pwd_storage.xml' % (TESTS_DIR)"/>
+        <call function="'setup_pwd_storage'" />
+
+        <import machine="'%s' % (STAF_LOCAL_HOSTNAME)"
+          file="'%s/testcases/security/pwd_storage/security_pwd_SSHA.xml' % (TESTS_DIR)"/>
+        <call function="'pwd_SSHA'" />
+
+        <import machine="'%s' % (STAF_LOCAL_HOSTNAME)"
+          file="'%s/testcases/security/pwd_storage/security_pwd_SHA.xml' % (TESTS_DIR)"/>
+        <call function="'pwd_SHA'" />
+
+        <import machine="'%s' % (STAF_LOCAL_HOSTNAME)"
+          file="'%s/testcases/security/pwd_storage/security_pwd_SSHA256.xml' % (TESTS_DIR)"/>
+        <call function="'pwd_SSHA256'" />
+
+        <import machine="'%s' % (STAF_LOCAL_HOSTNAME)"
+          file="'%s/testcases/security/pwd_storage/security_pwd_SSHA384.xml' % (TESTS_DIR)"/>
+        <call function="'pwd_SSHA384'" />
+
+        <import machine="'%s' % (STAF_LOCAL_HOSTNAME)"
+          file="'%s/testcases/security/pwd_storage/security_pwd_SSHA512.xml' % (TESTS_DIR)"/>
+        <call function="'pwd_SSHA512'" />
+
+        <import machine="'%s' % (STAF_LOCAL_HOSTNAME)"
+          file="'%s/testcases/security/pwd_storage/security_pwd_MD5.xml' % (TESTS_DIR)"/>
+        <call function="'pwd_MD5'" />
+
+        <import machine="'%s' % (STAF_LOCAL_HOSTNAME)"
+          file="'%s/testcases/security/pwd_storage/security_pwd_SMD5.xml' % (TESTS_DIR)"/>
+        <call function="'pwd_SMD5'" />
+
+        <import machine="'%s' % (STAF_LOCAL_HOSTNAME)"
+          file="'%s/testcases/security/pwd_storage/security_pwd_BASE64.xml' % (TESTS_DIR)"/>
+        <call function="'pwd_BASE64'" />
+
+        <import machine="'%s' % (STAF_LOCAL_HOSTNAME)"
+          file="'%s/testcases/security/pwd_storage/security_pwd_CLEAR.xml' % (TESTS_DIR)"/>
+        <call function="'pwd_CLEAR'" />
+
+        <!--- Stop DS -->
+        <sequence>
+          <message>
+             'Stop DS running on port %s' % (DIRECTORY_INSTANCE_PORT)
+          </message>
+
+          <call function="'stopDS'">
+            { 'dsInstancePort' : '%s' % (DIRECTORY_INSTANCE_PORT) }
+          </call>
+
+          <call function="'checkRC'">
+              { 'returncode' : RC ,
+                'result'     : STAXResult }
+          </call>
+        </sequence>
+
+        <return>RC</return>
+
+        </sequence>
+
+       <!--- End Block Clients -->
+       </block>
+
+</parallel>
+
+     </sequence>
+
+  </function>
+
+</stax>
diff --git a/opends/tests/functional-tests/testcases/security/pwd_storage/security_setup_pwd_storage.xml b/opends/tests/functional-tests/testcases/security/pwd_storage/security_setup_pwd_storage.xml
new file mode 100755
index 0000000..eb306e8
--- /dev/null
+++ b/opends/tests/functional-tests/testcases/security/pwd_storage/security_setup_pwd_storage.xml
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE stax SYSTEM "stax.dtd">
+<!---
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License").  You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE
+ * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
+ * add the following below this CDDL HEADER, with the fields enclosed
+ * by brackets "[]" replaced with your own identifying * information:
+ *      Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ *
+ *
+ *      Portions Copyright 2006 Sun Microsystems, Inc.
+ -->
+<stax>
+
+  <defaultcall function="setup_pwd_storage"/>
+
+  <function name="setup_pwd_storage">
+
+      <sequence>
+
+        <!--- Test Case : Add Entries for Password Storage Tests -->
+        <testcase name="'Security: Pwd Storage: Add Initial Entries'">
+          <sequence>
+            <message>
+               'Security: Pwd Storage: Adding Initial Entries'
+            </message>
+
+            <call function="'addEntry'">
+              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                'entryToBeAdded'   : '%s/security/pwd_storage/pwd_storage_startup.ldif' % STAGED_DATA_DIR }
+            </call>
+
+            <call function="'checktestRC'">
+                { 'returncode' : RC ,
+                  'result'     : STAXResult }
+            </call>
+          </sequence>
+        </testcase>
+
+        <return>RC</return>
+
+     </sequence>
+
+  </function>
+
+</stax>
diff --git a/opends/tests/functional-tests/testcases/security/security.xml b/opends/tests/functional-tests/testcases/security/security.xml
index 77dbb81..f22a4ca 100755
--- a/opends/tests/functional-tests/testcases/security/security.xml
+++ b/opends/tests/functional-tests/testcases/security/security.xml
@@ -55,6 +55,10 @@
 	<call function="'security_pwd_validator'" />
 
         <import machine="'%s' % (STAF_LOCAL_HOSTNAME)"
+          file="'%s/testcases/security/pwd_storage/security_pwd_storage.xml' % (TESTS_DIR)"/>
+	<call function="'security_pwd_storage'" />
+
+        <import machine="'%s' % (STAF_LOCAL_HOSTNAME)"
           file="'%s/testcases/security/bind_no_pwd/security_bind_no_pwd.xml' % (TESTS_DIR)"/>
 	<call function="'security_bind_no_pwd'" />
 

--
Gitblit v1.10.0