<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM "/shared/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
!
! Copyright 2010 Sun Microsystems, Inc.
! -->
<stax>
<defaultcall function="clus_starttls_ldapcompare"/>
<function name="clus_starttls_ldapcompare" scope="local">
<sequence>
<block name="'clus_starttls_ldapcompare'">
<sequence>
<!--- Test Suite information
#@TestSuiteName StartTLS ldapcompare check behaviors
#@TestSuitePurpose Test the results of StartTLS ldapcompare command.
#@TestSuiteGroup ldapcompare check behavior tests
#@TestScript clus_startTLS_ldapcompare.xml
-->
<script>
if not CurrentTestPath.has_key('group'):
CurrentTestPath['group'] = 'clu_secure'
CurrentTestPath['suite'] = STAXCurrentBlock
</script>
<call function="'testSuite_Preamble'"/>
<!--- Test Case information
#@TestMarker StartTLS ldapcompare check behavior tests
#@TestName Client use blind trust : ldapcompare successful
#@TestPurpose Verify that the operation is successful and
that the comparison is successful when client
trust all server certificates.
#@TestPreamble none
#@TestStep Do an ldapcompare with correct options.
#@TestPostamble none
#@TestResult Success if ldapcompare return true
-->
<testcase name="getTestCaseName ('Client use blind trust : ldapcompare successful')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Security: StartTLS Check behaviors : ldapcompare, client trustall\
server cert'
</message>
<script>
dncompare = 'uid=user.310,ou=people,dc=com'
</script>
<call function="'ldapCompareWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsUseStartTLS' : ' ' ,
'dsTrustAll' : ' ' ,
'dsDn' : ['postalCode:6728' ,'%s' %dncompare],
'expectedRC' : 'noCheck'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'checktestString'">
{
'returnString' : returnString ,
'expectedString' : 'Compare operation returned false'
}
</call>
<call function="'ldapCompareWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsUseStartTLS' : ' ' ,
'dsTrustAll' : ' ' ,
'dsDn' : ['postalCode:67258' ,'%s' %dncompare],
'expectedRC' : 'noCheck'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'checktestString'">
{
'returnString' : returnString ,
'expectedString' : 'Compare operation returned true'
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker StartTLS ldapcompare check behaviors
#@TestName Client use TrustStore file :
ldapcompare successful
#@TestPurpose Verify that the operation is successful and
that the comparison is successful when client
uses TrustStore file.
#@TestPreamble none
#@TestStep Do an ldapcompare with correct options.
#@TestPostamble none
#@TestResult Success if ldapcompare return true
-->
<testcase name="getTestCaseName ('Client use TrustStore file : ldapcompare successful')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Security:startTLS Check behaviors: ldapcompare, client trust \
store file'
</message>
<script>
dncompare2 = 'uid=user.311,ou=people,dc=com'
</script>
<call function="'ldapCompareWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsUseStartTLS' : ' ' ,
'dsTrustStorePath' : '%s/client_cert/clientruststore' \
% InstanceInstallDir,
'dsTrustStorePassword': 'clientruststorepass',
'dsDn' : ['description: This is for Amber Arbuckle.',\
'%s' %dncompare2] ,
'expectedRC' : 'noCheck'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'checktestString'">
{
'returnString' : returnString ,
'expectedString' : 'Compare operation returned false'
}
</call>
<call function="'ldapCompareWithScript'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsUseStartTLS' : ' ' ,
'dsTrustStorePath': '%s/client_cert/clientruststore' \
% InstanceInstallDir,
'dsTrustStorePassword': 'clientruststorepass',
'dsDn' : ['description: This is the description for \
Amber Arbuckle.' ,'%s' %dncompare2] ,
'expectedRC' : 'noCheck'
}
</call>
<script>
returnString = STAXResult[0][1]
</script>
<call function="'checktestString'">
{
'returnString' : returnString ,
'expectedString' : 'Compare operation returned true'
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<call function="'testSuite_Postamble'"/>
</sequence>
</block>
</sequence>
</function>
</stax>